chore: consistently import node modules with prefix (#3013)

Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
Pascal Birchler 2025-08-25 22:11:27 +02:00 committed by GitHub
parent 415d3413c4
commit ee4feea006
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
168 changed files with 420 additions and 405 deletions

View file

@ -23,9 +23,9 @@ import { createMockCommandContext } from '../../test-utils/mockCommandContext.js
import { Content } from '@google/genai';
import { GeminiClient } from '@google/gemini-cli-core';
import * as fsPromises from 'fs/promises';
import * as fsPromises from 'node:fs/promises';
import { chatCommand } from './chatCommand.js';
import { Stats } from 'fs';
import { Stats } from 'node:fs';
import { HistoryItemWithoutId } from '../types.js';
vi.mock('fs/promises', () => ({

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
import * as fsPromises from 'fs/promises';
import * as fsPromises from 'node:fs/promises';
import React from 'react';
import { Text } from 'ink';
import { Colors } from '../colors.js';
@ -16,7 +16,7 @@ import {
SlashCommandActionReturn,
} from './types.js';
import { decodeTagName } from '@google/gemini-cli-core';
import path from 'path';
import path from 'node:path';
import { HistoryItemWithoutId, MessageType } from '../types.js';
interface ChatDetail {

View file

@ -9,8 +9,8 @@ import { directoryCommand, expandHomeDir } from './directoryCommand.js';
import { Config, WorkspaceContext } from '@google/gemini-cli-core';
import { CommandContext } from './types.js';
import { MessageType } from '../types.js';
import * as os from 'os';
import * as path from 'path';
import * as os from 'node:os';
import * as path from 'node:path';
describe('directoryCommand', () => {
let mockContext: CommandContext;

View file

@ -6,8 +6,8 @@
import { SlashCommand, CommandContext, CommandKind } from './types.js';
import { MessageType } from '../types.js';
import * as os from 'os';
import * as path from 'path';
import * as os from 'node:os';
import * as path from 'node:path';
import { loadServerHierarchicalMemory } from '@google/gemini-cli-core';
export function expandHomeDir(p: string): string {

View file

@ -5,8 +5,8 @@
*/
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import { initCommand } from './initCommand.js';
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';
import { type CommandContext } from './types.js';

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
import * as fs from 'fs';
import * as path from 'path';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {
CommandContext,
SlashCommand,

View file

@ -5,9 +5,9 @@
*/
import { vi, describe, it, expect, beforeEach, afterEach } from 'vitest';
import * as fs from 'fs/promises';
import * as os from 'os';
import * as path from 'path';
import * as fs from 'node:fs/promises';
import * as os from 'node:os';
import * as path from 'node:path';
import { restoreCommand } from './restoreCommand.js';
import { type CommandContext } from './types.js';
import { createMockCommandContext } from '../../test-utils/mockCommandContext.js';

View file

@ -4,8 +4,8 @@
* SPDX-License-Identifier: Apache-2.0
*/
import * as fs from 'fs/promises';
import path from 'path';
import * as fs from 'node:fs/promises';
import path from 'node:path';
import {
type CommandContext,
type SlashCommand,