Skip to content

fix: Preserve baseUrl when writing paths in library tsconfig update#2305

Closed
Copilot wants to merge 2 commits intov12.0.0from
copilot/sub-pr-2302
Closed

fix: Preserve baseUrl when writing paths in library tsconfig update#2305
Copilot wants to merge 2 commits intov12.0.0from
copilot/sub-pr-2302

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 11, 2026

TypeScript requires baseUrl to be set whenever paths mappings are used — without it, path aliases are silently ignored. The updateTsConfig function was deleting baseUrl while still writing paths, producing an invalid config.

Changes

  • library.factory.ts: Replace delete tsconfig.compilerOptions.baseUrl with tsconfig.compilerOptions.baseUrl = './' to ensure paths mappings are valid
  • library.factory.test.ts: Update affected test assertions to expect baseUrl: "./" rather than undefined

Before:

{
  "compilerOptions": {
    "paths": {
      "app/my-lib": ["./libs/my-lib/src"],
      "app/my-lib/*": ["./libs/my-lib/src/*"]
    }
  }
}

After:

{
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "app/my-lib": ["./libs/my-lib/src"],
      "app/my-lib/*": ["./libs/my-lib/src/*"]
    }
  }
}

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: kamilmysliwiec <23244943+kamilmysliwiec@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from PR #2302 for v12.0.0 release fix: Preserve baseUrl when writing paths in library tsconfig update Mar 11, 2026
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