refactor!: bump required node version to 20.19+, 22.12+

This commit is contained in:
alex8088 2025-06-27 23:10:23 +08:00
parent d2e8b1271b
commit 3fd16d0c23
4 changed files with 9 additions and 4 deletions

View File

@ -22,6 +22,11 @@ export default tseslint.config(
...globals.node ...globals.node
} }
}, },
settings: {
node: {
version: '^20.19.0 || >=22.12.0'
}
},
rules: { rules: {
'prettier/prettier': 'warn', 'prettier/prettier': 'warn',
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }], '@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],

View File

@ -26,7 +26,7 @@
"node.d.ts" "node.d.ts"
], ],
"engines": { "engines": {
"node": "^18.0.0 || >=20.0.0" "node": "^20.19.0 || >=22.12.0"
}, },
"packageManager": "pnpm@10.12.4", "packageManager": "pnpm@10.12.4",
"author": "Alex Wei<https://github.com/alex8088>", "author": "Alex Wei<https://github.com/alex8088>",

View File

@ -343,7 +343,7 @@ async function bundleConfigFile(fileName: string, isESM: boolean): Promise<{ cod
absWorkingDir: process.cwd(), absWorkingDir: process.cwd(),
entryPoints: [fileName], entryPoints: [fileName],
write: false, write: false,
target: ['node18'], target: ['node20'],
platform: 'node', platform: 'node',
bundle: true, bundle: true,
format: isESM ? 'esm' : 'cjs', format: isESM ? 'esm' : 'cjs',

View File

@ -1,13 +1,13 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "ES2022", "target": "ES2023",
"module": "ESNext", "module": "ESNext",
"lib": ["ESNext"], "lib": ["ESNext"],
"sourceMap": false, "sourceMap": false,
"strict": true, "strict": true,
"allowJs": true, "allowJs": true,
"esModuleInterop": true, "esModuleInterop": true,
"moduleResolution": "Node", "moduleResolution": "bundler",
"resolveJsonModule": true, "resolveJsonModule": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"skipLibCheck": true, "skipLibCheck": true,