Skip to content

fix: Upgrade storage dependencies to corresponding Node 22 versions for core, handwritten and generated libraries - #9135

Merged
danieljbruce merged 2 commits into
mainfrom
node-22-storage
Aug 14, 2026
Merged

fix: Upgrade storage dependencies to corresponding Node 22 versions for core, handwritten and generated libraries#9135
danieljbruce merged 2 commits into
mainfrom
node-22-storage

Conversation

@danieljbruce

@danieljbruce danieljbruce commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

https://github.com/googleapis/google-cloud-node/pull/9079/changes upgrades storage to node v22, but this pull request upgrades the dependencies for this library as well so that they correspond to the latest Node 22 versions of their corresponding libraries.

We didn't upgrade gaxios and auth because doing so introduces compiler errors. We should address upgrading them separately.

Impact

Ensures the library will receive the latest patches because the dependencies are on the latest major version.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates dependency versions across various packages, including updates to google-gax, gapic-tools, and other related dependencies, while also standardizing the minimum Node.js version to 18. Additionally, a one-off script upgrade_storage.cjs was introduced to automate these dependency updates. The review feedback suggests either removing this script if it is a one-time utility or moving it to a dedicated scripts/ directory with proper documentation. Furthermore, it is recommended to use the semver package for more robust version parsing instead of manual regex-based comparison in the script.

I am having trouble creating individual review comments. Click here to see my feedback.

upgrade_storage.cjs (1-87)

medium

This script appears to be a one-off utility for upgrading dependencies. Committing such scripts can add clutter to the repository if they are not intended for regular use.

  • If this was for a one-time upgrade, please consider removing it from the pull request. The changes it generated are already included.
  • If this is a tool that will be used again, it would be more maintainable to place it in a dedicated scripts/ or tools/ directory and add documentation explaining its purpose and usage.

upgrade_storage.cjs (66-70)

medium

Using regular expressions to parse and compare semantic versions can be brittle, as it may not handle all valid semver ranges correctly (e.g., >1.0.0, 1.x.x).

For more robust version parsing and comparison, I recommend using the semver package.

For example:

const semver = require('semver');
// ...
if (latestVer && semver.valid(semver.coerce(latestVer)) && semver.validRange(ver)) {
  const currentMajor = semver.minVersion(ver).major;
  const latestMajor = semver.coerce(latestVer).major;
  if (latestMajor > currentMajor) {
    // ... your update logic
  }
}

This would make the script more reliable against different version string formats.

@danieljbruce danieljbruce changed the title Node 22 storage fix: Upgrade storage dependencies to corresponding Node 22 versions for core, handwritten and generated libraries Aug 12, 2026
@danieljbruce
danieljbruce marked this pull request as ready for review August 12, 2026 17:41
@danieljbruce
danieljbruce requested a review from a team as a code owner August 12, 2026 17:41
@danieljbruce
danieljbruce merged commit a3d9092 into main Aug 14, 2026
45 checks passed
@danieljbruce
danieljbruce deleted the node-22-storage branch August 14, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants