Skip to content

chore(core): bump yargs-parser from 21.1.1 to ^22.0.0#35506

Draft
FrozenPandaz wants to merge 1 commit intomasterfrom
chore/bump-yargs-parser-to-22
Draft

chore(core): bump yargs-parser from 21.1.1 to ^22.0.0#35506
FrozenPandaz wants to merge 1 commit intomasterfrom
chore/bump-yargs-parser-to-22

Conversation

@FrozenPandaz
Copy link
Copy Markdown
Contributor

Current Behavior

pnpm-workspace.yaml catalogs yargs-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 in pnpm-workspace.yaml propagates to all 6 importers via the catalog mechanism.

⚠️ Drafting because: ESM-only switch

yargs-parser@22.0.0 drops the v21 dual-format build:

v21 v22
"type" "module" (with CJS build) "module"
"main" build/index.cjs build/lib/index.js
"exports" import + require import only
"engines" >=12 ^20.19.0 || ^22.12.0 || >=23

The 6 source-level call sites in packages/nx/ and packages/devkit/ use import yargs from 'yargs-parser' — TypeScript compiles this to require("yargs-parser") in CJS output. With v22 being ESM-only, this require() call only works on Node versions with require(esm) support — namely the engines listed above.

Drafting because Nx's published package.json files don't declare an engines field, so users on older Node versions (18, ≤20.19, ≤22.11) would hit a runtime ERR_REQUIRE_ESM. Either:

  1. Land alongside an engines bump committing Nx to node >= 20.19 || >= 22.12, mirroring yargs-parser's floor.
  2. Wait for Nx's stated Node-floor bump to settle (per the queue context, the user's working assumption is Nx's floor is now ≥22.12, but it's not declared in package.json).
  3. Pin yargs-parser to 21.x indefinitely (no good reason — 21 is unmaintained).

Local pnpm nx run-many -t build,test -p devkit,nx could not be cleanly verified — master's devkit:test is currently failing due to a missing nx.darwin-arm64.node native binding that's unrelated to this change. CI verdict will be authoritative.

Related Issue(s)

Part of NXC-4329 bulk-dependency-update sweep.

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.
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 30, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit c36110b
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69f2fc6888a7b4000823c65a
😎 Deploy Preview https://deploy-preview-35506--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 Apr 30, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit c36110b
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69f2fc68de967600090b0b6b
😎 Deploy Preview https://deploy-preview-35506--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 Apr 30, 2026

View your CI Pipeline Execution ↗ for commit c36110b

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ❌ Failed 11m 32s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 17s View ↗
nx build workspace-plugin ✅ Succeeded 3m 42s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 23s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-30 07:12:27 UTC

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 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:

Rerun CI

Nx Cloud View detailed reasoning on 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

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.

1 participant