chore(deps): pin dependencies and enforce 14-day update cooldown (#27948)

This commit is contained in:
Gal Zahavi
2026-06-18 16:58:35 -07:00
committed by GitHub
parent c427d18fea
commit 93844dfa10
71 changed files with 4647 additions and 1457 deletions
+48 -48
View File
@@ -30,60 +30,60 @@
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.49.0-nightly.20260617.g4d3dcdce1"
},
"dependencies": {
"@agentclientprotocol/sdk": "^0.16.1",
"@agentclientprotocol/sdk": "0.16.1",
"@google/gemini-cli-core": "file:../core",
"@google/genai": "1.30.0",
"@iarna/toml": "^2.2.5",
"@modelcontextprotocol/sdk": "^1.23.0",
"ansi-escapes": "^7.3.0",
"ansi-regex": "^6.2.2",
"chalk": "^4.1.2",
"cli-spinners": "^2.9.2",
"clipboardy": "~5.2.0",
"color-convert": "^2.0.1",
"command-exists": "^1.2.9",
"comment-json": "^4.2.5",
"diff": "^8.0.3",
"dotenv": "^17.1.0",
"extract-zip": "^2.0.1",
"fzf": "^0.5.2",
"glob": "^12.0.0",
"highlight.js": "^11.11.1",
"@iarna/toml": "2.2.5",
"@modelcontextprotocol/sdk": "1.23.0",
"ansi-escapes": "7.3.0",
"ansi-regex": "6.2.2",
"chalk": "4.1.2",
"cli-spinners": "2.9.2",
"clipboardy": "5.2.0",
"color-convert": "2.0.1",
"command-exists": "1.2.9",
"comment-json": "4.2.5",
"diff": "8.0.3",
"dotenv": "17.1.0",
"extract-zip": "2.0.1",
"fzf": "0.5.2",
"glob": "12.0.0",
"highlight.js": "11.11.1",
"ink": "npm:@jrichman/ink@6.6.9",
"ink-gradient": "^3.0.0",
"ink-spinner": "^5.0.0",
"latest-version": "^9.0.0",
"lowlight": "^3.3.0",
"mnemonist": "^0.40.3",
"open": "^10.1.2",
"prompts": "^2.4.2",
"proper-lockfile": "^4.1.2",
"react": "^19.2.0",
"shell-quote": "^1.8.3",
"simple-git": "^3.28.0",
"string-width": "^8.1.0",
"strip-ansi": "^7.1.0",
"strip-json-comments": "^3.1.1",
"tar": "^7.5.8",
"tinygradient": "^1.1.5",
"undici": "^7.10.0",
"ws": "^8.16.0",
"yargs": "^17.7.2",
"zod": "^3.23.8"
"ink-gradient": "3.0.0",
"ink-spinner": "5.0.0",
"latest-version": "9.0.0",
"lowlight": "3.3.0",
"mnemonist": "0.40.3",
"open": "10.1.2",
"prompts": "2.4.2",
"proper-lockfile": "4.1.2",
"react": "19.2.4",
"shell-quote": "1.8.3",
"simple-git": "3.28.0",
"string-width": "8.1.0",
"strip-ansi": "7.1.0",
"strip-json-comments": "3.1.1",
"tar": "7.5.8",
"tinygradient": "1.1.5",
"undici": "7.10.0",
"ws": "8.16.0",
"yargs": "17.7.2",
"zod": "3.25.76"
},
"devDependencies": {
"@google/gemini-cli-test-utils": "file:../test-utils",
"@types/command-exists": "^1.2.3",
"@types/hast": "^3.0.4",
"@types/node": "^20.11.24",
"@types/react": "^19.2.0",
"@types/semver": "^7.7.0",
"@types/shell-quote": "^1.7.5",
"@types/ws": "^8.5.10",
"@types/yargs": "^17.0.32",
"@xterm/headless": "^5.5.0",
"typescript": "^5.3.3",
"vitest": "^3.1.1"
"@types/command-exists": "1.2.3",
"@types/hast": "3.0.4",
"@types/node": "20.11.24",
"@types/react": "19.2.0",
"@types/semver": "7.7.0",
"@types/shell-quote": "1.7.5",
"@types/ws": "8.5.10",
"@types/yargs": "17.0.32",
"@xterm/headless": "5.5.0",
"typescript": "5.8.3",
"vitest": "3.2.4"
},
"engines": {
"node": ">=20"
+6 -3
View File
@@ -278,7 +278,8 @@ describe('Session', () => {
void,
unknown
> {
yield* [];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
yield* [] as any;
throw error;
}
return errorGen();
@@ -303,7 +304,8 @@ describe('Session', () => {
void,
unknown
> {
yield* [];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
yield* [] as any;
throw error;
}
return errorGen();
@@ -473,7 +475,8 @@ describe('Session', () => {
void,
unknown
> {
yield* [];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
yield* [] as any;
throw customError;
}
return errorGen();
@@ -5,7 +5,7 @@
"type": "module",
"main": "example.js",
"dependencies": {
"@modelcontextprotocol/sdk": "^1.23.0",
"zod": "^3.22.4"
"@modelcontextprotocol/sdk": "1.23.0",
"zod": "3.22.4"
}
}
@@ -71,7 +71,7 @@ describe('ExtensionEnablementManager', () => {
vi.spyOn(fs, 'writeFileSync').mockImplementation(
(
path: fs.PathOrFileDescriptor,
data: string | ArrayBufferView<ArrayBufferLike>,
data: string | NodeJS.ArrayBufferView,
) => {
inMemoryFs[path.toString()] = data.toString(); // Convert ArrayBufferView to string for inMemoryFs
},
+19 -18
View File
@@ -156,25 +156,26 @@ export async function updateAllUpdatableExtensions(
dispatch: (action: ExtensionUpdateAction) => void,
enableExtensionReloading?: boolean,
): Promise<ExtensionUpdateInfo[]> {
return (
await Promise.all(
extensions
.filter(
(extension) =>
extensionsState.get(extension.name)?.status ===
ExtensionUpdateState.UPDATE_AVAILABLE,
)
.map((extension) =>
updateExtension(
extension,
extensionManager,
extensionsState.get(extension.name)!.status,
dispatch,
enableExtensionReloading,
),
const results = await Promise.all(
extensions
.filter(
(extension) =>
extensionsState.get(extension.name)?.status ===
ExtensionUpdateState.UPDATE_AVAILABLE,
)
.map((extension) =>
updateExtension(
extension,
extensionManager,
extensionsState.get(extension.name)!.status,
dispatch,
enableExtensionReloading,
),
)
).filter((updateInfo) => !!updateInfo);
),
);
return results.filter(
(updateInfo): updateInfo is ExtensionUpdateInfo => !!updateInfo,
);
}
export interface ExtensionUpdateCheckResult {
@@ -52,9 +52,10 @@ export function validateVariables(
export function hydrateString(str: string, context: VariableContext): string {
validateVariables(context, VARIABLE_SCHEMA);
const regex = /\${(.*?)}/g;
return str.replace(regex, (match, key) =>
context[key] == null ? match : context[key],
);
return str.replace(regex, (match, key) => {
const val = context[key];
return val == null ? match : String(val);
});
}
export function recursivelyHydrateStrings<T>(
+1 -1
View File
@@ -657,7 +657,7 @@ export async function main() {
// Register SessionEnd hook to fire on graceful exit
// This runs before telemetry shutdown in runExitCleanup()
registerCleanup(async () => {
await config.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
await config?.getHookSystem()?.fireSessionEndEvent(SessionEndReason.Exit);
});
// Register ConsolePatcher cleanup last to ensure logs from shutdown hooks
+3 -4
View File
@@ -158,16 +158,15 @@ export class McpPromptLoader implements ICommandLoader {
return [];
}
const indexOfFirstSpace = invocation.raw.indexOf(' ') + 1;
let promptInputs =
const parsedInputs =
indexOfFirstSpace === 0
? {}
: this.parseArgs(
invocation.raw.substring(indexOfFirstSpace),
prompt.arguments,
);
if (promptInputs instanceof Error) {
promptInputs = {};
}
const promptInputs =
parsedInputs instanceof Error ? {} : parsedInputs;
const providedArgNames = Object.keys(promptInputs);
const unusedArguments =
+8 -6
View File
@@ -706,13 +706,13 @@ export const renderWithProviders = async (
const terminalWidth = width ?? baseState.terminalWidth;
if (!config) {
config = makeFakeConfig({
const finalConfig =
config ||
makeFakeConfig({
useAlternateBuffer: settings.merged.ui?.useAlternateBuffer,
showMemoryUsage: settings.merged.ui?.showMemoryUsage,
accessibility: settings.merged.ui?.accessibility,
});
}
const mainAreaWidth = providedUiState?.mainAreaWidth ?? terminalWidth;
@@ -742,21 +742,23 @@ export const renderWithProviders = async (
const wrapWithProviders = (comp: React.ReactElement) => (
<AppContext.Provider value={appState}>
<ConfigContext.Provider value={config}>
<ConfigContext.Provider value={finalConfig}>
<SettingsContext.Provider value={settings}>
<QuotaContext.Provider value={quotaState}>
<InputContext.Provider value={inputState}>
<UIStateContext.Provider value={finalUiState}>
<VimModeProvider>
<ShellFocusContext.Provider value={shellFocus}>
<SessionStatsProvider sessionId={config.getSessionId()}>
<SessionStatsProvider
sessionId={finalConfig.getSessionId()}
>
<StreamingContext.Provider
value={finalUiState.streamingState}
>
<UIActionsContext.Provider value={finalUIActions}>
<OverflowProvider>
<ToolActionsProvider
config={config}
config={finalConfig}
toolCalls={allToolCalls}
isExpanded={
toolActions?.isExpanded ??
+2 -2
View File
@@ -491,12 +491,12 @@ describe('AppContainer State Management', () => {
vi.spyOn(mockConfig, 'initialize').mockResolvedValue(undefined);
vi.spyOn(mockConfig, 'getDebugMode').mockReturnValue(false);
mockExtensionManager = vi.mockObject({
mockExtensionManager = {
getExtensions: vi.fn().mockReturnValue([]),
setRequestConsent: vi.fn(),
setRequestSetting: vi.fn(),
start: vi.fn(),
} as unknown as ExtensionManager);
} as unknown as MockedObject<ExtensionManager>;
vi.spyOn(mockConfig, 'getExtensionLoader').mockReturnValue(
mockExtensionManager,
);
+1 -1
View File
@@ -83,7 +83,7 @@ export function AuthDialog({
);
}
let defaultAuthType = null;
let defaultAuthType: AuthType | null = null;
const defaultAuthTypeEnv = process.env['GEMINI_DEFAULT_AUTH_TYPE'];
if (
defaultAuthTypeEnv &&
@@ -439,7 +439,8 @@ describe('extensionsCommand', () => {
}
it('should return ExtensionRegistryView custom dialog when experimental.extensionRegistry is true', async () => {
mockContext.services.settings.merged.experimental.extensionRegistry = true;
mockContext.services.settings.merged.experimental.extensionRegistry =
true;
const result = await exploreAction(mockContext, '');
@@ -455,7 +456,8 @@ describe('extensionsCommand', () => {
});
it('should handle onSelect and onClose in ExtensionRegistryView', async () => {
mockContext.services.settings.merged.experimental.extensionRegistry = true;
mockContext.services.settings.merged.experimental.extensionRegistry =
true;
const result = await exploreAction(mockContext, '');
if (result?.type !== 'custom_dialog') {
+2 -1
View File
@@ -284,7 +284,8 @@ const listAction = async (
type: MessageType.MCP_STATUS,
servers: mcpServers,
tools: mcpTools.map((tool) => ({
serverName: tool.serverName,
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
serverName: (tool as unknown as { serverName: string }).serverName,
name: tool.name,
description: tool.description,
schema: tool.schema,
@@ -30,7 +30,11 @@ const HistoryItemSchema = z
})
.passthrough();
const ToolCallDataSchema = getToolCallDataSchema(HistoryItemSchema);
/* eslint-disable @typescript-eslint/no-unsafe-type-assertion */
const ToolCallDataSchema = getToolCallDataSchema(
HistoryItemSchema as unknown as Parameters<typeof getToolCallDataSchema>[0],
);
/* eslint-enable @typescript-eslint/no-unsafe-type-assertion */
async function restoreAction(
context: CommandContext,
@@ -126,10 +126,13 @@ async function downloadFiles({
const response = await fetch(endpoint, {
method: 'GET',
dispatcher: proxy ? new ProxyAgent(proxy) : undefined,
signal: AbortSignal.any([
AbortSignal.timeout(30_000),
abortController.signal,
]),
/* eslint-disable @typescript-eslint/no-unsafe-type-assertion */
signal: (
AbortSignal as unknown as {
any: (signals: AbortSignal[]) => AbortSignal;
}
).any([AbortSignal.timeout(30_000), abortController.signal]),
/* eslint-enable @typescript-eslint/no-unsafe-type-assertion */
} as RequestInit);
if (!response.ok) {
@@ -128,7 +128,7 @@ function setNestedValue(obj: unknown, path: string[], value: unknown): unknown {
if (current[key] === undefined || current[key] === null) {
current[key] = {};
} else if (isRecord(current[key])) {
current[key] = { ...current[key] };
current[key] = { ...(current[key] as object) };
}
const next = current[key];
@@ -1427,7 +1427,8 @@ describe('handleAtCommand', () => {
const query = `@${filePath}`;
// Simulate user cancellation
const mockToolInstance = {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mockToolInstance: any = {
buildAndExecute: vi
.fn()
.mockRejectedValue(new Error('User cancelled operation')),
+5 -2
View File
@@ -44,8 +44,11 @@ export function resolveEnvVarsInString(
if (customEnv && typeof customEnv[varName] === 'string') {
return customEnv[varName];
}
if (process && process.env && typeof process.env[varName] === 'string') {
return process.env[varName];
if (process && process.env) {
const val = process.env[varName];
if (typeof val === 'string') {
return val;
}
}
if (defaultValue !== undefined) {
return defaultValue;
+7 -1
View File
@@ -69,7 +69,13 @@ export const getLatestGitHubRelease = async (
'X-GitHub-Api-Version': '2022-11-28',
},
dispatcher: proxy ? new ProxyAgent(proxy) : undefined,
signal: AbortSignal.any([AbortSignal.timeout(30_000), controller.signal]),
/* eslint-disable @typescript-eslint/no-unsafe-type-assertion */
signal: (
AbortSignal as unknown as {
any: (signals: AbortSignal[]) => AbortSignal;
}
).any([AbortSignal.timeout(30_000), controller.signal]),
/* eslint-enable @typescript-eslint/no-unsafe-type-assertion */
} as RequestInit);
if (!response.ok) {
+1 -1
View File
@@ -805,7 +805,7 @@ export async function start_sandbox(
});
return await new Promise<number>((resolve, reject) => {
sandboxProcess.on('error', (err) => {
sandboxProcess?.on('error', (err) => {
coreEvents.emitFeedback('error', 'Sandbox process error', err);
reject(err);
});