chore(core): bump yargs-parser from 21.1.1 to ^22.0.0#35506
chore(core): bump yargs-parser from 21.1.1 to ^22.0.0#35506FrozenPandaz wants to merge 1 commit intomasterfrom
Conversation
Updates the pnpm-workspace.yaml catalog entry, which propagates to @nx/devkit, @nx/nx, and the workspace root. yargs-parser@22 is ESM-only (drops the v21 dual-format build) — the existing CJS call sites in packages/nx/ rely on Node's unflagged require(esm) support (Node ^20.19 || ^22.12 || >=23 per the v22 engines field). Part of NXC-4329.
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit c36110b
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Nx Cloud has identified a possible root cause for your failed CI:
We reviewed all 72+ failing tasks and found they share a common pre-existing infrastructure failure — Cannot find module '../../tasks-runner/pseudo-terminal' — which occurs at Jest initialization before any test code runs. This error has no connection to the yargs-parser catalog bump and is consistent with the pre-existing master instability the PR author already flagged. Our changes are not the root cause of these failures.
No code changes were suggested for this issue.
Trigger a rerun:
🔔 Heads up, your workspace has pending recommendations ↗ to auto-apply fixes for similar failures.
🎓 Learn more about Self-Healing CI on nx.dev
Current Behavior
pnpm-workspace.yamlcatalogsyargs-parser: 21.1.1. The catalog entry resolves to@nx/devkit,@nx/nx, and the workspace root (all use"yargs-parser": "catalog:"). Per the bulk-dependency-update sweep (NXC-4329), this is due for a major bump.Expected Behavior
Catalog bumped to
^22.0.0. Single-line change inpnpm-workspace.yamlpropagates to all 6 importers via the catalog mechanism.yargs-parser@22.0.0drops the v21 dual-format build:"type""module"(with CJS build)"module""main"build/index.cjsbuild/lib/index.js"exports"import+requireimportonly"engines">=12^20.19.0 || ^22.12.0 || >=23The 6 source-level call sites in
packages/nx/andpackages/devkit/useimport yargs from 'yargs-parser'— TypeScript compiles this torequire("yargs-parser")in CJS output. With v22 being ESM-only, thisrequire()call only works on Node versions withrequire(esm)support — namely the engines listed above.Drafting because Nx's published
package.jsonfiles don't declare anenginesfield, so users on older Node versions (18, ≤20.19, ≤22.11) would hit a runtimeERR_REQUIRE_ESM. Either:node >= 20.19 || >= 22.12, mirroring yargs-parser's floor.package.json).Local
pnpm nx run-many -t build,test -p devkit,nxcould not be cleanly verified — master'sdevkit:testis currently failing due to a missingnx.darwin-arm64.nodenative binding that's unrelated to this change. CI verdict will be authoritative.Related Issue(s)
Part of NXC-4329 bulk-dependency-update sweep.