Skip to content

fix(typescript): set rootDir for TS 6.0 build partials#226

Merged
jhnns merged 2 commits into
mainfrom
fix/typescript-rootdir-ts6
Jun 27, 2026
Merged

fix(typescript): set rootDir for TS 6.0 build partials#226
jhnns merged 2 commits into
mainfrom
fix/typescript-rootdir-ts6

Conversation

@jhnns

@jhnns jhnns commented Jun 27, 2026

Copy link
Copy Markdown
Member

Summary

  • Set rootDir to ${configDir}/src in typescript/lib and typescript/js-lib build partials so emit output stays flat in dist/ under TypeScript 6.0
  • Override rootDir to . in this repo's root tsconfig.json for its flat source layout
  • Document the default and override guidance in typescript/README.md

Test plan

  • tsc --noEmit passes locally
  • tsc build emits declarations to dist/ only (no source-tree .d.ts pollution)
  • CI passes on PR

Default lib/js-lib builds to src/ so dist/ output is flat under TypeScript 6.0.
Override rootDir in this repo's flat layout.
Copilot AI review requested due to automatic review settings June 27, 2026 13:18
@pkg-pr-new

pkg-pr-new Bot commented Jun 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@peerigon/configs@226

commit: c6c54b8

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.rootDir to ${configDir}/src in typescript/lib.json and typescript/js-lib.json to prevent dist/src/... output under TS 6.0.
  • Override rootDir to . in the repo’s root tsconfig.json to 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.

Comment thread typescript/README.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@jhnns jhnns merged commit 8fd80c2 into main Jun 27, 2026
2 checks passed
@jhnns jhnns deleted the fix/typescript-rootdir-ts6 branch June 27, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants