Remove .js extensions from all import statements#284
Open
rulkens wants to merge 2 commits into
Open
Conversation
The repo uses moduleResolution: "bundler" and writes extension-less relative imports everywhere (src/ has zero .js suffixes). The tools/ tree had drifted to NodeNext-style .js specifiers on 131 imports across 24 files. Strip the suffix to match the project convention; these all resolved to local .ts files (no real .js files exist in tools/ or src/). Typecheck (both tsconfigs) and the full 2209-test suite stay green.
Finish the consistency pass started in tools/: strip the NodeNext-style .js suffix from the 6 remaining relative imports under tests/ so the whole repo matches the moduleResolution: "bundler" convention. Typecheck and the full 2209-test suite stay green.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
skymap | c442407 | Commit Preview URL Branch Preview URL |
Jun 01 2026, 07:04 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change removes
.jsfile extensions from all ES module import statements across the codebase. This aligns with TypeScript and Node.js best practices for ESM imports, where the file extension is optional and omitting it improves readability and maintainability.Changes
Removed
.jsextensions from allimportandexportstatements in:tools/catalog/,tools/clusters/,tools/famous/,tools/filaments/)tools/parsers/)tools/curation/,tools/fetch/)tests/tools/)Affected file categories:
buildAllBins.ts,buildClusters.ts,buildFamous.ts,buildFilaments.tsexport.ts,process.ts,processAlphaOnly.ts,galaxies.ts,paths.ts,resolve.tsglade.ts,sdssCsv.ts,milliquas.ts,twoMrs.ts,common.ts,parseMcxc.ts,parseMscc.tsexpandFamousFromCatalogs.ts,fetchFamousImages.ts,copyHiResToPublic.ts,subsampleByAbsMag.ts,crossMatch.ts,dedupeByProximity.ts,fetchClusterCatalogs.tsdedupeByProximity.test.ts,writeMetaSidecar.test.ts,cropExtract.test.ts,process.deproject.test.ts,process.test.tsImplementation Details
'../parsers/sdssCsv.js'→'../parsers/sdssCsv') and absolute imports fromsrc/were updated consistentlyimport type { ... })export { ... } from './module.js'→export { ... } from './module')This change improves code consistency with modern TypeScript/ESM conventions and reduces visual noise in import statements.
https://claude.ai/code/session_01NPgAWpowSi9a9m5jUtSJhx