build(deps): bump nx 21.2.0 → 21.6.11 to fix fesm2022 source-map regression (ACE-7218) - #8
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe package metadata removes ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
157a238 to
10a8187
Compare
10a8187 to
35f1e76
Compare
|
🤖 GoBuilders classification: L2 / R1 — pattern-clear build-toolchain dependency bump (nx 21.2.0 → 21.6.11), no application code and no product-behavior judgment; failure modes surface at build/link time and are reversible via revert, so no risk override fires. |
mattwang44
left a comment
There was a problem hiding this comment.
🤖 Suggested verdict: REQUEST_CHANGES
I reviewed this as a dependency-only PR. The nx 21.6.11 bump itself is a mature in-major release (published 2026-04-17), CI is fully green across build, lint, unit and e2e, and lockfile provenance checks out: every entry resolves to registry.npmjs.org with an integrity hash, and the only new install-script packages are unrs-resolver and nested fsevents, both expected. The blocker is scope: the committed package-lock.json was regenerated wholesale, changing 539 top-level entries where a minimal update needs 113, see the inline comment. Redoing the lockfile as a targeted update should be quick, and I'd expect to approve right after.
…ression [why] nx 21.2.0's @nx/angular:package executor emits fesm2022 source maps whose `sources` point at the ng-packagr `tmp-esm2022/*.js` intermediate instead of chaining back to the original `.ts`/external `.html` template. For components with an external template (datepicker), Angular's Ivy linker (`@angular/compiler-cli` linker/babel `tryExternalTemplate`) then fails to locate the template source and throws `Cannot read properties of undefined (reading 'contents')`, which cascades into hundreds of linker errors in consumers building with the partial-compilation linker (e.g. fms Angular 20). nx 21.6.11 fixes the source-map handling; rebuilt fesm2022 maps chain back to `.ts` + the external `.html`, and all 25 entry points link cleanly on the unpatched Angular 20.3.26 linker. [how] - Bump `nx` + all `@nx/*` deps 21.2.0 -> 21.6.11 IN PLACE (no dependencies <-> devDependencies moves; @nx/angular and @nx/node stay in `dependencies`). ng-packagr unchanged at 20.0.0. - Add `ts-node@10.9.1` to devDependencies: it was previously in the tree only transitively (at this exact version) via the nx 21.2.0 toolchain and is required by jest's `jest.config.ts` loader; the 21.6.11 tree no longer provides it transitively, so unit tests failed with "'ts-node' is required for the TypeScript configuration files". - Lockfile is a MINIMAL update: restored the base package-lock.json and ran a plain `npm install`. App-facing deps (jest 29.7.0, webpack 5.99.8, sass-embedded, @types/node, ts-jest, jest-preset-angular) are unchanged; the touched entries are the nx-21.6.11 + ts-node transitive closure only. - No workspace/nx.json migration required. Refs: ACE-7218 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35f1e76 to
1d3b63f
Compare
mattwang44
left a comment
There was a problem hiding this comment.
🤖 Suggested verdict: APPROVE
I re-verified both of my earlier findings against 1d3b63f empirically, not just from the replies. The lockfile is now exactly the minimal update: 113 changed top-level entries, matching my own npm install --package-lock-only replay of base lockfile + new package.json, with jest, webpack, sass-embedded, @types/node and friends unchanged at base versions; provenance is still clean (all registry.npmjs.org with integrity, no new install scripts beyond unrs-resolver and nested fsevents). The deps/devDeps move is undone and ts-node@10.9.1 is disclosed with a clear why in the commit body. Unit tests and e2e smoke were still running at review time; everything that has finished is green, and this head is a strict reduction of the previously all-green diff.
Superseded by my updated review (suggested verdict: APPROVE).
Reason
nx@21.2.0's@nx/angular:packageexecutor emits fesm2022 source maps whosesourcespoint at the ng-packagrtmp-esm2022/*.jsintermediate instead of chaining back to the original.ts/ external.htmltemplate.For components with an external template (datepicker), Angular's Ivy linker (
@angular/compiler-clilinker/babeltryExternalTemplate) then can't locate the template source and throwsCannot read properties of undefined (reading 'contents'). In a consumer building with the partial-compilation linker (fms Angular 20), the shared linker state leaks and this cascades into ~232 errors.Change
nx+ all@nx/*devDeps 21.2.0 → 21.6.11 (nx fixed the source-map handling).ng-packagrunchanged at 20.0.0.nx.json/ workspace migration required.Verification
.ts+ the external.html(zerotmp-esm2022residue)..tsmaps, so the fix is exactly the nx bump.Refs: ACE-7218