Skip to content

fix(js): pass configName to typecheck command in TS plugin#34989

Merged
FrozenPandaz merged 1 commit into
masterfrom
gh-34274
Mar 24, 2026
Merged

fix(js): pass configName to typecheck command in TS plugin#34989
FrozenPandaz merged 1 commit into
masterfrom
gh-34274

Conversation

@leosvelperez
Copy link
Copy Markdown
Member

Current Behavior

The @nx/js TypeScript plugin ignores the configName option when constructing the typecheck target command. It always runs tsc --build --emitDeclarationOnly without specifying which tsconfig to use, defaulting to whatever tsc resolves on its own. This means custom configName values (e.g. tsconfig.lib.json) have no effect on typechecking.

Expected Behavior

The typecheck target should pass configName to the tsc --build command, matching how the build target already works: tsc --build <configName> --emitDeclarationOnly.

Related Issue(s)

Fixes #34274

The typecheck target was ignoring the `configName` option, always
using the default tsconfig. The build target already passed
`configName` correctly — apply the same pattern to typecheck.
@leosvelperez leosvelperez requested a review from a team as a code owner March 24, 2026 16:29
@leosvelperez leosvelperez self-assigned this Mar 24, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 24, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 3b98122
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69c2bbf0b49de600088f0054
😎 Deploy Preview https://deploy-preview-34989--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 24, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 3b98122
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69c2bbf006a05a0008569a4e
😎 Deploy Preview https://deploy-preview-34989--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Mar 24, 2026

View your CI Pipeline Execution ↗ for commit 3b98122

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 45m 18s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 7s View ↗
nx-cloud record -- pnpm nx conformance:check ✅ Succeeded 9s View ↗
nx build workspace-plugin ✅ Succeeded 2m 6s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-24 17:21:57 UTC

@FrozenPandaz FrozenPandaz merged commit 9cca97f into master Mar 24, 2026
24 checks passed
@FrozenPandaz FrozenPandaz deleted the gh-34274 branch March 24, 2026 19:43
FrozenPandaz pushed a commit that referenced this pull request Mar 26, 2026
## Current Behavior

The `@nx/js` TypeScript plugin ignores the `configName` option when
constructing the typecheck target command. It always runs `tsc --build
--emitDeclarationOnly` without specifying which tsconfig to use,
defaulting to whatever `tsc` resolves on its own. This means custom
`configName` values (e.g. `tsconfig.lib.json`) have no effect on
typechecking.

## Expected Behavior

The typecheck target should pass `configName` to the `tsc --build`
command, matching how the build target already works: `tsc --build
<configName> --emitDeclarationOnly`.

## Related Issue(s)

Fixes #34274

(cherry picked from commit 9cca97f)
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@nx/js typecheck does not align with documented TS workspace/ref setup

2 participants