chore: update uuid package to ^11.1.0 across samples (b/508686791)#4309
chore: update uuid package to ^11.1.0 across samples (b/508686791)#4309angelcaamal wants to merge 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the uuid dependency to version 11.1.0 across numerous packages and introduces reformatting in iam/deny/package.json. The review feedback correctly identifies that uuid v11 requires Node.js 18 or higher, which creates compatibility issues with several packages that specify older Node.js versions in their engines field. Furthermore, the indentation changes in iam/deny/package.json are noted as out-of-scope for a dependency update PR.
| "chai": "^4.5.0", | ||
| "mocha": "^10.0.0", | ||
| "uuid": "^10.0.0", | ||
| "uuid": "^11.1.0", |
There was a problem hiding this comment.
The uuid package version 11.x requires Node.js 18 or higher. This package specifies node: >=16.0.0 in its engines field (line 7). Upgrading to ^11.1.0 will break compatibility for users on Node.js 16. This issue is present across most package.json files updated in this PR where the engine requirement is less than 18.
| "uuid": "^11.1.0", | |
| "uuid": "^10.0.0", |
| "proxyquire": "^2.1.3", | ||
| "supertest": "^6.3.3", | ||
| "uuid": "^9.0.0" | ||
| "uuid": "^11.1.0" |
There was a problem hiding this comment.
This sample is explicitly intended for Node.js 16, as indicated by the directory name and the engines field ("node": "16.x.x" on line 9). Upgrading to uuid v11 (which requires Node.js 18+) is a breaking change for this sample's target environment.
| "uuid": "^11.1.0" | |
| "uuid": "^10.0.0" |
| "@google-cloud/storage": "^7.19.0", | ||
| "node-fetch": "^2.6.7", | ||
| "uuid": "^8.0.0", | ||
| "uuid": "^11.1.0", |
There was a problem hiding this comment.
uuid is listed as a production dependency here. Version 11.x dropped support for Node.js versions earlier than 18. This package specifies node: >=12 in its engines field (line 7). This update will prevent the sample from running on Node.js 12, 14, and 16. Please either update the engines requirement or use a compatible version of uuid (e.g., ^9.0.0 for Node 12+ or ^10.0.0 for Node 14+).
| "uuid": "^11.1.0", | |
| "uuid": "^9.0.0", |
| "dependencies": { | ||
| "@google-cloud/iam": "^1.0.0" | ||
| }, | ||
| "devDependencies": { |
There was a problem hiding this comment.
This file has been entirely reformatted, changing indentation from 4 spaces to 2 spaces. While 2-space indentation is standard for this repository, this change is out of scope for a dependency update. Per the general rules, pull requests should remain focused on a single concern.
References
- Keep pull requests focused on a single concern. Defer out-of-scope changes to a separate pull request.
Description
Fixes Internal: b/508686791
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
npm test(see Testing)npm run lint(see Style)GoogleCloudPlatform/nodejs-docs-samples. Not a fork.