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
168 changed files with 420 additions and 405 deletions

View File

@@ -8,7 +8,7 @@ import { renderWithProviders } from '../../test-utils/render.js';
import { waitFor } from '@testing-library/react';
import { vi } from 'vitest';
import { FolderTrustDialog, FolderTrustChoice } from './FolderTrustDialog.js';
import * as process from 'process';
import * as process from 'node:process';
vi.mock('process', async () => {
const actual = await vi.importActual('process');

View File

@@ -12,7 +12,7 @@ import {
RadioSelectItem,
} from './shared/RadioButtonSelect.js';
import { useKeypress } from '../hooks/useKeypress.js';
import * as process from 'process';
import * as process from 'node:process';
export enum FolderTrustChoice {
TRUST_FOLDER = 'trust_folder',

View File

@@ -9,7 +9,7 @@ import { waitFor } from '@testing-library/react';
import { InputPrompt, InputPromptProps } from './InputPrompt.js';
import type { TextBuffer } from './shared/text-buffer.js';
import { Config } from '@google/gemini-cli-core';
import * as path from 'path';
import * as path from 'node:path';
import {
CommandContext,
SlashCommand,

View File

@@ -25,7 +25,7 @@ import {
saveClipboardImage,
cleanupOldClipboardImages,
} from '../utils/clipboardUtils.js';
import * as path from 'path';
import * as path from 'node:path';
import { SCREEN_READER_USER_PREFIX } from '../constants.js';
export interface InputPromptProps {

View File

@@ -9,7 +9,7 @@ import { render } from 'ink-testing-library';
import { DiffRenderer } from './DiffRenderer.js';
import * as CodeColorizer from '../../utils/CodeColorizer.js';
import { vi } from 'vitest';
import { EOL } from 'os';
import { EOL } from 'node:os';
describe('<OverflowProvider><DiffRenderer /></OverflowProvider>', () => {
const mockColorizeCode = vi.spyOn(CodeColorizer, 'colorizeCode');

View File

@@ -6,9 +6,9 @@
import React from 'react';
import { Box, Text } from 'ink';
import { EOL } from 'os';
import { EOL } from 'node:os';
import { Colors } from '../../colors.js';
import crypto from 'crypto';
import crypto from 'node:crypto';
import { colorizeCode, colorizeLine } from '../../utils/CodeColorizer.js';
import { MaxSizedBox } from '../shared/MaxSizedBox.js';
import { theme } from '../../semantic-colors.js';

View File

@@ -4,10 +4,10 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { spawnSync } from 'child_process';
import fs from 'fs';
import os from 'os';
import pathMod from 'path';
import { spawnSync } from 'node:child_process';
import fs from 'node:fs';
import os from 'node:os';
import pathMod from 'node:path';
import { useState, useCallback, useEffect, useMemo, useReducer } from 'react';
import stringWidth from 'string-width';
import { unescapePath } from '@google/gemini-cli-core';