chore: fix TS5055 by mapping paths to source and adding project references

This commit is contained in:
Sandy Tao
2026-01-15 15:22:06 +08:00
parent fd7b6bf40a
commit c9d6f9b226
6 changed files with 19 additions and 6 deletions

View File

@@ -7,5 +7,6 @@
"types": ["node", "vitest/globals"]
},
"include": ["index.ts", "src/**/*.ts", "src/**/*.json"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist"],
"references": [{ "path": "../core" }]
}

View File

@@ -14,5 +14,5 @@
"./package.json"
],
"exclude": ["node_modules", "dist"],
"references": [{ "path": "../core" }]
"references": [{ "path": "../core" }, { "path": "../test-utils" }]
}

View File

@@ -7,14 +7,13 @@
import * as fs from 'node:fs/promises';
import * as fsSync from 'node:fs';
import * as path from 'node:path';
import { homedir } from 'node:os';
import { bfsFileSearch } from './bfsFileSearch.js';
import { getAllGeminiMdFilenames } from '../tools/memoryTool.js';
import type { FileDiscoveryService } from '../services/fileDiscoveryService.js';
import { processImports } from './memoryImportProcessor.js';
import type { FileFilteringOptions } from '../config/constants.js';
import { DEFAULT_MEMORY_FILE_FILTERING_OPTIONS } from '../config/constants.js';
import { GEMINI_DIR } from './paths.js';
import { GEMINI_DIR, homedir } from './paths.js';
import type { ExtensionLoader } from './extensionLoader.js';
import { debugLogger } from './debugLogger.js';
import type { Config } from '../config/config.js';

View File

@@ -8,6 +8,7 @@ import path from 'node:path';
import os from 'node:os';
import * as crypto from 'node:crypto';
export const homedir = os.homedir;
export const GEMINI_DIR = '.gemini';
export const GOOGLE_ACCOUNTS_FILENAME = 'google_accounts.json';

View File

@@ -7,5 +7,6 @@
"types": ["node", "vitest/globals"]
},
"include": ["index.ts", "src/**/*.ts", "src/**/*.json"],
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist"],
"references": [{ "path": "../test-utils" }]
}

View File

@@ -26,6 +26,17 @@
"moduleResolution": "nodenext",
"target": "es2022",
"types": ["node", "vitest/globals"],
"jsx": "react-jsx"
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@google/gemini-cli-core": ["./packages/core/index.ts"],
"@google/gemini-cli-core/*": ["./packages/core/*"],
"@google/gemini-cli-a2a-server": ["./packages/a2a-server/index.ts"],
"@google/gemini-cli-a2a-server/*": ["./packages/a2a-server/*"],
"@google/gemini-cli": ["./packages/cli/index.ts"],
"@google/gemini-cli/*": ["./packages/cli/*"],
"@google/gemini-cli-test-utils": ["./packages/test-utils/src/index.ts"],
"@google/gemini-cli-test-utils/*": ["./packages/test-utils/src/*"]
}
}
}