Skip to content

Bump yargs to ^18.0.0 #46578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Bump yargs to ^18.0.0 #46578

wants to merge 4 commits into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 20, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
yargs (source) ^17.7.2 -> ^18.0.0 age adoption passing confidence

Release Notes

yargs/yargs (yargs)

v18.0.0

Compare Source

⚠ BREAKING CHANGES
  • command names are not derived from modules passed to command.
  • singleton usage of yargs yargs.foo, yargs().argv, has been removed.
  • minimum node.js versions now ^20.19.0 || ^22.12.0 || >=23.
  • yargs is now ESM first
Features
Bug Fixes
  • addDirectory do not support absolute command dir (#​2465) (3a40a78)
  • allows ESM modules commands to be extensible using visit option (#​2468) (200e1aa)
  • browser: fix shims so that yargs continues working in browser context (#​2457) (4ae5f57)
  • build: address problems with typescript compilation (#​2445) (8d72fb3)
  • coerce should play well with parser configuration (#​2308) (8343c66)
  • deps: update dependency yargs-parser to v22 (#​2470) (639130d)
  • exit after async handler done (#​2313) (e326cde)
  • handle spaces in bash completion (#​2452) (83b7788)
  • parser-configuration should work well with generated completion script (#​2332) (888db19)
  • propagate Dictionary including undefined in value type (#​2393) (2b2f7f5)
  • zsh: completion no longer requires double tab when using autoloaded (0dd8fe4)
Code Refactoring
  • command names are not derived from modules passed to command. (d90af45)
  • singleton usage of yargs yargs.foo, yargs().argv, has been removed. (d90af45)
Build System
  • minimum node.js versions now ^20.19.0 || ^22.12.0 || >=23. (d90af45)

Configuration

📅 Schedule: Branch creation - "on sunday before 6:00am" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the dependencies Update of dependencies label Jul 20, 2025
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 21, 2025
@renovate renovate bot force-pushed the renovate/yargs-18.x branch from e02dad9 to ce96e26 Compare July 21, 2025 05:54
@mui-bot
Copy link

mui-bot commented Jul 21, 2025

Netlify deploy preview

https://deploy-preview-46578--material-ui.netlify.app/

Bundle size report

Bundle Parsed Size Gzip Size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against e5c3f35

@renovate renovate bot force-pushed the renovate/yargs-18.x branch from ce96e26 to 317eb7f Compare July 21, 2025 06:06
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Jul 21, 2025
@renovate renovate bot force-pushed the renovate/yargs-18.x branch from 317eb7f to a6be826 Compare July 21, 2025 07:52
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 21, 2025
Copy link
Contributor Author

renovate bot commented Jul 21, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented Jul 21, 2025

@LukasTy @Janpot Could you please review this? yargs v18 now only supports usage as a function (yargs()), and I also refactored formattedTSDemos.js to ESM because yargs now only supports ESM.

@ZeeshanTamboli ZeeshanTamboli requested review from LukasTy and Janpot July 21, 2025 10:41
Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

LGTM overall.
On mui-x this major has been used for quite a while.
However, I've checked that we didn't account for this being a direct dependency on the codemod package.
The minimum supported Node version is 20.19, whereas we declare support for >14.00 om the package. 🙈
So, technically, @mui/x-codemod is already lying about this...

"engines": {
"node": ">=14.0.0"
}

WDYT @Janpot, should we avoid bumping this and potentially even downgrade the yargs package on mui-x? 🤔

@ZeeshanTamboli
Copy link
Member

@Janpot Can you take a look?

@Janpot
Copy link
Member

Janpot commented Jul 29, 2025

WDYT @Janpot, should we avoid bumping this and potentially even downgrade the yargs package on mui-x? 🤔

👍 I'm ok with bumping the engines field to match yargs.

@ZeeshanTamboli ZeeshanTamboli requested a review from LukasTy July 30, 2025 04:20
Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

👍 I'm ok with bumping the engines field to match yargs.

Ain't it a breaking change? 🤔
AFAIK, Olivier was adamant about keeping the engines.node as lenient as possible, but this is just about the codemod package. 🤷‍♂️

@@ -36,7 +36,7 @@
"jscodeshift-add-imports": "^1.0.11",
"postcss": "^8.5.6",
"postcss-cli": "^11.0.1",
"yargs": "^17.7.2"
"yargs": "^18.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

If we are fine with this slight BC, then this package engines.node field needs to be updated to >=20.19.

@Janpot
Copy link
Member

Janpot commented Jul 30, 2025

Ain't it a breaking change? 🤔

Not if it's already broken in practice. When did we upgrade to the yargs version that requires Node.js 20.

AFAIK, Olivier was adamant about keeping the engines.node as lenient as possible, but this is just about the codemod package. 🤷‍♂️

Personally, I don't see why we even put a restriction at all on our components packages. On our CLI tools I think it is desired to only support maintained versions of node.js. Even the most trivial dependency trees would have at least one dependency that restricts it to this version anyway. Note that technically, for packages like that we should also configure the corresponding @types/node version, but ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Update of dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants