fix(typescript): set rootDir for TS 6.0 build partials#226
Merged
Conversation
Default lib/js-lib builds to src/ so dist/ output is flat under TypeScript 6.0. Override rootDir in this repo's flat layout.
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the published TypeScript build partials to behave correctly under TypeScript 6.0, keeping emitted outputs stable (flat under dist/) while documenting how consumers can override defaults for non-src/ layouts.
Changes:
- Set
compilerOptions.rootDirto${configDir}/srcintypescript/lib.jsonandtypescript/js-lib.jsonto preventdist/src/...output under TS 6.0. - Override
rootDirto.in the repo’s roottsconfig.jsonto support this repo’s non-src/source layout. - Document the new default + override guidance in
typescript/README.md.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| typescript/README.md | Documents the new rootDir default and when to override it. |
| typescript/lib.json | Sets rootDir so TS library builds emit flat into dist/. |
| typescript/js-lib.json | Sets rootDir so JS+JSDoc library builds emit flat into dist/. |
| tsconfig.json | Overrides rootDir for this repo’s multi-folder source layout. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.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.
Summary
rootDirto${configDir}/srcintypescript/libandtypescript/js-libbuild partials so emit output stays flat indist/under TypeScript 6.0rootDirto.in this repo's roottsconfig.jsonfor its flat source layouttypescript/README.mdTest plan
tsc --noEmitpasses locallytscbuild emits declarations todist/only (no source-tree.d.tspollution)