mirror of
https://github.com/Azure/k8s-set-context.git
synced 2026-06-26 16:59:27 +08:00
Migrate to ESM with esbuild, vitest (#227)
* Migrate to ESM, esbuild, vitest, and update actions/* to latest - Update @actions/core to 3.x, @actions/exec to 3.x, @actions/io to 3.x - Replace @vercel/ncc + babel with esbuild (build.mjs) targeting Node 20 ESM - Replace jest/babel-jest/ts-jest with vitest and @vitest/coverage-v8 - Update tsconfig to NodeNext module resolution with strict mode - Add explicit .js extensions to all relative imports (NodeNext requirement) - Fix implicit any index signatures in parseCluster and parseMethod - Migrate all test files from jest to vi.mock/vi.mocked APIs - Fix ESM module spying limitations using vi.mock() at module level - Fix env var test pollution in default.test.ts with afterEach cleanup * remove build.mjs and update build script * update pkg lock * update pkg lock
This commit is contained in:
+9
-10
@@ -1,15 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext", // or "NodeNext" depending on your setup
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES2020",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"noImplicitAny": false,
|
||||
"skipLibCheck": true,
|
||||
"paths": {
|
||||
"@actions/core": ["node_modules/@actions/core"],
|
||||
"@kubernetes/client-node": ["node_modules/@kubernetes/client-node"]
|
||||
}
|
||||
"noEmit": true,
|
||||
"types": ["node", "vitest/globals"]
|
||||
},
|
||||
"exclude": ["node_modules", "tests", "src/**/*.test.ts"]
|
||||
"exclude": ["node_modules", "**/*.test.ts", "vitest.config.ts", "tests/"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user