Repository navigation
Rename the remaining index files - #185
Merged
Merged
Conversation
The project does not use index files, so these get names that say what they hold: - src/index.ts and src/index.d.ts become src/replot.ts and src/replot.d.ts, the package entry. The published specifiers are unchanged; only the dist paths in package.json move, to dist/esm/replot.js and dist/types/replot.d.ts. - src/scales/index.js and src/scales/index.d.ts become src/scales/registry.js and src/scales/registry.d.ts, after the scale registry and kind symbols they define. Upstream still calls this file scales/index.js, so a re-sync has to map it across. - test/plots/index.ts becomes test/plots/registry.ts, the snapshot test registry. test/plots/index.html stays, as it is the page the Vite dev server serves at the root, not a module. Also drops the skip for src/react/index.d.ts from copy-declarations, since that file no longer exists, and corrects the note in CONTRIBUTING.md on how the tests resolve the package. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Follows #154. The project rule is no index files, and these were the last ones:
src/index.ts/src/index.d.ts→src/replot.ts/src/replot.d.tssrc/scales/index.js/src/scales/index.d.ts→src/scales/registry.js/src/scales/registry.d.ts(upstream still calls itscales/index.js, so a re-sync has to map it across)test/plots/index.ts→test/plots/registry.tstest/plots/index.htmlstays, because it is the page the dev server serves at/, not a module.Consumers see no change: the
replotandreplot/reactspecifiers are the same. Only the internal dist paths move, and package.jsonmain,module,types,exportsandsideEffectspoint atdist/esm/replot.jsanddist/types/replot.d.ts. The tsconfig paths, the Vite and docs aliases,bundle.js,docs/data/api.data.tsand CONTRIBUTING.md are updated to match. CONTRIBUTING.md also said tests resolvereplottosrc/index.js, which was wrong, and it now says what the tsconfig paths do.This also carries the
copy-declarationsdead-skip removal from #184. The change is identical, so whichever merges second applies cleanly.Checks: tsc, eslint and prettier are clean, mocha gives 1818 passing, 2 pending with no snapshot changes, and the smoke test passes (pack, install, and import both entries through a bundler, TypeScript and UMD). publint --strict and attw pass, and the docs build works. The regenerated
api-index.jsonis byte-identical.🤖 Generated with Claude Code