mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-16 04:50:29 -07:00
feat(core): Bump node google-auth-library version to 10.9.0 (#28385)
Co-authored-by: Jerry Lin <jerrysf@google.com>
This commit is contained in:
@@ -72,17 +72,29 @@ if (invalidPackages.length > 0) {
|
||||
console.log('Lockfile check passed.');
|
||||
}
|
||||
|
||||
// Check that gaxios v7+ is NOT resolved in any workspace node_modules.
|
||||
// gaxios v7.x has a bug where Array.toString() joins stream chunks with
|
||||
// Check that gaxios v7+ with stream corruption bug is NOT resolved in any workspace node_modules.
|
||||
// gaxios v7.x (versions < 7.1.6) has a bug where Array.toString() joins stream chunks with
|
||||
// commas, corrupting error response JSON at TCP chunk boundaries.
|
||||
// See: https://github.com/google-gemini/gemini-cli/pull/21884
|
||||
function isCorruptedGaxios(version) {
|
||||
if (!version) return false;
|
||||
const match = version.match(/^7\.(\d+)\.(\d+)/);
|
||||
if (match) {
|
||||
const minor = parseInt(match[1], 10);
|
||||
const patch = parseInt(match[2], 10);
|
||||
if (minor < 1 || (minor === 1 && patch < 6)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const gaxiosViolations = [];
|
||||
for (const [location, details] of Object.entries(packages)) {
|
||||
if (
|
||||
location.match(/(^|\/)node_modules\/gaxios$/) &&
|
||||
!location.includes('@google/genai/node_modules') &&
|
||||
details.version &&
|
||||
parseInt(details.version.split('.')[0], 10) >= 7
|
||||
isCorruptedGaxios(details.version)
|
||||
) {
|
||||
gaxiosViolations.push(`${location} (v${details.version})`);
|
||||
}
|
||||
@@ -90,12 +102,12 @@ for (const [location, details] of Object.entries(packages)) {
|
||||
|
||||
if (gaxiosViolations.length > 0) {
|
||||
console.error(
|
||||
'\nError: gaxios v7+ detected in workspace node_modules. This version has a stream corruption bug.',
|
||||
'\nError: gaxios versions with stream corruption bug (v7.x < 7.1.6) detected in workspace node_modules.',
|
||||
);
|
||||
console.error('See: https://github.com/google-gemini/gemini-cli/pull/21884');
|
||||
gaxiosViolations.forEach((v) => console.error(`- ${v}`));
|
||||
console.error(
|
||||
'\nDo NOT upgrade @google/genai or google-auth-library until the gaxios v7 bug is fixed upstream.',
|
||||
'\nPlease ensure gaxios resolves to a version containing the fix (>= 7.1.6).',
|
||||
);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user