chore: update dependency yargs to v18 #4432#4686
Merged
Merged
Conversation
1 task
9c07126 to
2799909
Compare
- Fix singleton pattern in pkg-check.js (use yargs(process.argv.slice(2))) - Use parseSync() instead of .argv in pkg-check.js - Keep @types/yargs (v18 doesn't ship own types yet) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ca44d80 to
965e17f
Compare
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one. |
yargs v18 requires Node ^20.19.0 || ^22.12.0 || >=23. Tighten the v21.0.0 envelope to match the strictest direct runtime dep so the published metadata reflects actual support. Drop the non-standard leading 'v' in the engine string while we're touching the field. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4432.
yargs v18 requires Node
^20.19.0 || ^22.12.0 || >=23, which is nowsatisfied after the Node 22 minimum bump (#4679). Per the
v18 migration notes, the singleton import pattern is
removed — callers must use the factory form
yargs(process.argv.slice(2))and prefer
.parseSync()over the dual-typed.argvgetter.Changes
@commitlint/cli/package.json— bumpyargs^17.0.0→^18.0.0.@packages/utils/package.json— bumpyargs^17.0.0→^18.0.0.@packages/utils/pkg-check.jsyargswith factoryyargs(process.argv.slice(2))..argvwith.parseSync()for explicit sync parsing.Engine tightening
yargsv18 declaresengines.node: "^20.19.0 || ^22.12.0 || >=23".The previously merged Node 22 PR (#4679) set
engines.nodeto">=v22",which allows 22.0.0–22.11.x — versions where yargs v18 will refuse to
install. This PR tightens the entire monorepo (root + 39 sub-packages)
to
">=22.12.0"so the published v21.0.0 metadata matches actual runtimesupport, and drops the non-standard leading
vin the engine string atthe same time. The README's
Version Support and Releasesline isupdated for consistency.
Not changed
@commitlint/cli/src/cli.tsalready uses the factory form(
yargs(process.argv.slice(2))). It still callscli.argvratherthan
cli.parseSync(), but with no async middleware in the CLI'syargs chain,
.argvreturns the synchronousArguments<T>and isfine. If CI surfaces a typing or runtime issue here, the one-line
fix is
main(cli.parseSync()).@types/yargsis kept; yargs v18 does not yet ship its owntype declarations.