refactor(ensnode-sdk): make Indexing Status a top-level module#1635
refactor(ensnode-sdk): make Indexing Status a top-level module#1635
Conversation
Moves `./ensindexer/indexing-status` to `./indexing-status`. This update enables sharing base Indexing Status data model between ENSApi and ENSIndexer response data models.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
📝 WalkthroughWalkthroughThis PR refactors the module structure by relocating indexing-status types and exports from the central ensindexer barrel to dedicated submodules, and updates all affected import paths throughout the codebase accordingly. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
tk-o
left a comment
There was a problem hiding this comment.
Self-review completed.
Greptile SummaryThis PR moves the
Confidence Score: 5/5
Important Files Changed
Flowchartflowchart TD
subgraph "Before (src/)"
A1["index.ts"] -->|"export *"| B1["ensindexer/index.ts"]
B1 -->|"export *"| C1["ensindexer/indexing-status/"]
B1 -->|"export *"| D1["ensindexer/config/"]
end
subgraph "After (src/)"
A2["index.ts"] -->|"export *"| B2["ensindexer/index.ts"]
A2 -->|"export * (new)"| C2["indexing-status/"]
B2 -->|"export *"| D2["ensindexer/config/"]
end
subgraph "Consumers (unchanged public API)"
E["ensapi/api/indexing-status/"]
F["ensapi/api/name-tokens/"]
G["ensapi/api/registrar-actions/"]
H["ensapi/api/types.ts"]
I["client.test.ts"]
end
C2 --> E
C2 --> F
C2 --> G
C2 --> H
C2 --> I
Last reviewed commit: 94dd0c5 |
There was a problem hiding this comment.
Pull request overview
This pull request refactors the indexing-status module from being a submodule of ENSIndexer (./ensindexer/indexing-status) to a general-purpose module (./indexing-status). This architectural change enables future work to introduce separate API clients for ENSApi and ENSIndexer, as outlined in issue #1252.
Changes:
- Moved indexing-status module from
./ensindexer/indexing-statusto./indexing-status - Updated all import paths throughout the codebase to reflect the new module location
- Added new test files for indexing-status functionality
- Updated package exports to expose the indexing-status module at the top level
Reviewed changes
Copilot reviewed 31 out of 38 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/ensnode-sdk/src/indexing-status/index.ts | New index file exporting all indexing-status submodules |
| packages/ensnode-sdk/src/indexing-status/zod-schema/*.ts | Import paths updated from ../../../shared to ../../shared |
| packages/ensnode-sdk/src/indexing-status/validate/*.ts | Import paths updated from ../../../shared to ../../shared |
| packages/ensnode-sdk/src/indexing-status/serialize/*.ts | Import paths updated from ../../../shared to ../../shared; added new cross-chain serialization file |
| packages/ensnode-sdk/src/indexing-status/deserialize/*.ts | Import paths updated from ../../../shared to ../../shared |
| packages/ensnode-sdk/src/indexing-status/*.ts | Import paths updated from ../../shared to ../shared |
| packages/ensnode-sdk/src/indexing-status/*.test.ts | New test files added with correct relative imports |
| packages/ensnode-sdk/src/index.ts | Added export for ./indexing-status module |
| packages/ensnode-sdk/src/ensindexer/index.ts | Removed export for ./indexing-status |
| packages/ensnode-sdk/src/ensapi/api/**/*.ts | Import paths updated from ../../ensindexer/indexing-status to ../../indexing-status |
| packages/ensnode-sdk/src/client.test.ts | Import paths updated to use new module structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lightwalker-eth
left a comment
There was a problem hiding this comment.
@tk-o Looks good, thanks 👍
Lite PR
Tip: Review docs on the ENSNode PR process
Summary
./ensindexer/indexing-statushas been moved to./indexing-status.Why
./ensapi/api) and one for ENSIndexer (./ensindexer/api). Each of those separate API modules will be able to use shared Indexing Status data model.ENSNodeClientwhich works with ENSApi. However, to achieve goals of issue ENSApi: Persist ENSIndexerPublicConfig to the database #1252, we'll also needENSIndexerClientthat will use data model distinct fromENSNodeClient.Testing
Notes for Reviewer (Optional)
ENSNodeClientfrom./clientto./ensapi/client. After that update, we'll be able to introduce a newENSIndexerClientat./ensindexer/clientand use it while solving for issue ENSApi: Persist ENSIndexerPublicConfig to the database #1252.Pre-Review Checklist (Blocking)