Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@google-cloud/pubsub": "4.0.0",
"yargs": "11.1.1"
"yargs": "13.1.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

critical

This upgrade to yargs@13.1.0 introduces a critical compatibility issue.

  1. Node.js Version Support: yargs@13.x drops support for Node.js versions below 6. However, this project's package.json still specifies "node": ">=4.3.2" in the engines field. This will cause installation failures or runtime errors for users on Node.js 4 or 5. The engines field should be updated to ">=6" to reflect this new requirement.

  2. Security Fix Version: The security vulnerability this PR aims to fix is in the yargs-parser sub-dependency. yargs@13.1.0 has a dependency on yargs-parser: '^13.0.0'. The vulnerability is fixed in yargs-parser@13.1.2. While a fresh npm install might resolve to the fixed version, it's not guaranteed.

To ensure the security fix is applied and to be more explicit, I recommend upgrading to yargs@13.3.2, which is the last release in the v13 series and depends on the fixed yargs-parser@^13.1.2.

Please also update the engines field in package.json to ">=6" to avoid breaking the package for users on older Node.js versions.

Suggested change
"yargs": "13.1.0"
"yargs": "13.3.2"

},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "3.3.0",
Expand Down
Loading