Skip to content

fix(js): add {projectRoot} prefix to d.ts fileset in typescript plugin#35037

Merged
FrozenPandaz merged 3 commits intomasterfrom
fix/ts-plugin-fileset-prefix
Mar 27, 2026
Merged

fix(js): add {projectRoot} prefix to d.ts fileset in typescript plugin#35037
FrozenPandaz merged 3 commits intomasterfrom
fix/ts-plugin-fileset-prefix

Conversation

@FrozenPandaz
Copy link
Copy Markdown
Contributor

@FrozenPandaz FrozenPandaz commented Mar 27, 2026

Current Behavior

The TypeScript plugin emits a bare **/*.d.ts fileset input (without a {projectRoot}/ prefix) for dependency file tracking. This was introduced in #34968. The Nx hasher expects all filesets to start with either {projectRoot}/ or {workspaceRoot}/, so it logs a warning for every project:

NX **/*.d.ts does not start with {workspaceRoot}/. This will throw an error in Nx 20.

Expected Behavior

No warning is emitted. The fileset correctly uses {projectRoot}/**/*.d.ts so the hasher knows it's scoped to the dependency project's root.

Related Issue(s)

Fixes regression from #34968.

The typescript plugin was emitting a bare `**/*.d.ts` fileset input
without the required `{projectRoot}/` prefix, causing the Nx hasher
to warn: "**/*.d.ts does not start with {workspaceRoot}/"
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner March 27, 2026 13:37
@FrozenPandaz FrozenPandaz requested a review from AgentEnder March 27, 2026 13:37
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 47ba086
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69c6a2a6f47ba00008f6bf57
😎 Deploy Preview https://deploy-preview-35037--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.

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 47ba086
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69c6a2a6631364000828c714
😎 Deploy Preview https://deploy-preview-35037--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.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud bot commented Mar 27, 2026

View your CI Pipeline Execution ↗ for commit 47ba086

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 15m 39s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 8s View ↗
nx-cloud record -- pnpm nx conformance:check ✅ Succeeded 9s View ↗
nx build workspace-plugin ✅ Succeeded 1m 7s 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-27 15:52:31 UTC

@FrozenPandaz FrozenPandaz enabled auto-merge (squash) March 27, 2026 13:39
The typescript plugin was emitting a bare `**/*.d.ts` fileset input
without the required `{projectRoot}/` prefix, causing the Nx hasher
to warn: "**/*.d.ts does not start with {workspaceRoot}/" [Self-Healing CI Rerun]
nx-cloud[bot]

This comment was marked as outdated.

The typescript plugin was emitting a bare `**/*.d.ts` fileset input
without the required `{projectRoot}/` prefix, causing the Nx hasher
to warn: "**/*.d.ts does not start with {workspaceRoot}/" [Self-Healing CI Rerun]
Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

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

Nx Cloud has identified a flaky task in your failed CI:

🔂 Since the failure was identified as flaky, we triggered a CI rerun by adding an empty commit to this branch.

Nx Cloud View detailed reasoning in Nx Cloud ↗

🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.


🎓 Learn more about Self-Healing CI on nx.dev

@FrozenPandaz FrozenPandaz merged commit 6c92d92 into master Mar 27, 2026
23 checks passed
@FrozenPandaz FrozenPandaz deleted the fix/ts-plugin-fileset-prefix branch March 27, 2026 15:53
FrozenPandaz added a commit that referenced this pull request Mar 27, 2026
#35037)

## Current Behavior

The TypeScript plugin emits a bare `**/*.d.ts` fileset input (without a
`{projectRoot}/` prefix) for dependency file tracking. The Nx hasher
expects all filesets to start with either `{projectRoot}/` or
`{workspaceRoot}/`, so it logs a warning for every project:

```
NX **/*.d.ts does not start with {workspaceRoot}/. This will throw an error in Nx 20.
```

## Expected Behavior

No warning is emitted. The fileset correctly uses
`{projectRoot}/**/*.d.ts` so the hasher knows it's scoped to the
dependency project's root.

## Related Issue(s)

N/A — discovered while debugging e2e test failures.

(cherry picked from commit 6c92d92)
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

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 Apr 2, 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.

2 participants