chore(build): upgrade Node CI runtimes and remove Node 18 pnpmfile patch - #9055
chore(build): upgrade Node CI runtimes and remove Node 18 pnpmfile patch#9055quirogas wants to merge 3 commits into
Conversation
Upgrade legacy Node 14 and Node 18 matrix configurations across GitHub Actions workflows to modern Node 20 and Node 22 LTS runtimes, update generator engine constraints, and remove the transitional root `.pnpmfile.cjs` compatibility patch. With Node 18 officially reaching end-of-life (EOL), retaining test matrices targeting older runtime versions creates unnecessary maintenance friction and prevents modernizing shared development dependencies. Furthermore, the root `.pnpmfile.cjs` hook—introduced specifically to dynamically override `yargs` to v17 on Node 18 due to CommonJS/ESM require limitations in test runners—is no longer required under Node 20 and Node 22 (which support native ES module requiring). Removing this file and stripping `--pnpmfile` injection flags from `ci/run_single_test.sh` simplifies execution scripts and restores deterministic standard pnpm resolution. For googleapis/librarian#5095 For googleapis/librarian#6353
There was a problem hiding this comment.
Code Review
This pull request removes the .pnpmfile.cjs file, simplifies the dependency installation in ci/run_single_test.sh by removing the --pnpmfile flag, and updates the Node.js engine requirements in several package.json files. The reviewer notes that duplicate_methods_test-esm/package.json is an auto-generated baseline file and should not be edited manually; instead, the engine constraints should be updated upstream in the generator or templates.
| "engines": { | ||
| "node": ">=18" | ||
| "node": ">=22" | ||
| } |
There was a problem hiding this comment.
This file appears to be an auto-generated baseline file. Manually editing auto-generated files is discouraged as these changes will be overwritten during the next regeneration. Please apply the engine constraint updates upstream in the generator or templates, and then regenerate the baselines using the appropriate generation script.
References
- Do not manually edit auto-generated files to fix typos or make other changes, as these edits will be overwritten during the next regeneration. Instead, apply the fixes upstream in the generator or templates.
Update Node 14 and 18 matrix configurations across GitHub Actions workflows to
Node 20 and 22 , update generator engine constraints, and remove the transitional root
.pnpmfile.cjscompatibility patch.With Node 18 officially removed from the Node repo retaining test matrices targeting older runtime
versions creates unnecessary maintenance friction and prevents modernizing shared development
dependencies. Furthermore, the root
.pnpmfile.cjshook is no longer required. Removing this file andstripping
--pnpmfileinjection flags fromci/run_single_test.shsimplifies execution scripts.For googleapis/librarian#5095
For googleapis/librarian#6353