chore: fix c8 dependency breakage on node <= 18#8958
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a workaround in .pnpmfile.cjs to override the c8 dependency to ^9.1.0 when running on Node.js versions 18 or below, ensuring CI compatibility. The review feedback suggests using context.log instead of console.log to prevent stdout pollution and recommends simplifying the Node.js major version extraction by parsing process.versions.node directly.
danieljbruce
approved these changes
Jul 23, 2026
Contributor
Author
|
This contributes to unblocking #8904 . |
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.
The Issue
The error blocking release:
The Fix
Here is the exact dependency chain that triggered the failure:
As a result, we need to pin to an older version of C8 for versions of Node older than 18. Rather that implementing a global override, updating the .pnpmfile.cjs enables us to do a targeted override ONLY for Node 18. That means that as we upgrade to Node 22, every other package can continue to use 10+ like they do currently.
Why this works
Note, this works because in our CI we explicitly set the PNPM file on install: https://github.com/googleapis/google-cloud-node/blob/main/ci/run_single_test.sh#L45