From 729a0cbd40c9a2821371361bf3f04b7100ae6456 Mon Sep 17 00:00:00 2001 From: pengzhanbo Date: Mon, 28 Apr 2025 10:39:43 +0800 Subject: [PATCH] feat!: drop `node18` support, close #574 (#575) --- docs/en/notes/theme/guide/quick-start/usage.md | 5 ++++- docs/notes/theme/guide/quick-start/usage.md | 3 +-- package.json | 2 +- plugins/plugin-fonts/tsup.config.ts | 2 +- plugins/plugin-md-power/tsup.config.ts | 2 +- plugins/plugin-replace-assets/tsup.config.ts | 2 +- plugins/plugin-search/tsup.config.ts | 2 +- theme/package.json | 2 +- theme/tsup.config.ts | 2 +- tsconfig.base.json | 2 +- 10 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/en/notes/theme/guide/quick-start/usage.md b/docs/en/notes/theme/guide/quick-start/usage.md index f4770740..5de077c7 100644 --- a/docs/en/notes/theme/guide/quick-start/usage.md +++ b/docs/en/notes/theme/guide/quick-start/usage.md @@ -14,9 +14,12 @@ const vuepressVersion = __VUEPRESS_VERSION__ ## Dependency Environment -- [Node.js v20.6.0+](https://nodejs.org/) +- [Node.js](https://nodejs.org/) : **^20.6.0 或 >= 22.0.0** [+node-versions] - [npm 8+](https://www.npmjs.com/) or [pnpm 8+](https://pnpm.io/zh/) or [Yarn 2+](https://yarnpkg.com/) +[+node-versions]: **^20.6.0:** Versions `20.6.0` and above but not higher than `21.0.0` +[+node-versions]: **>= 22.0.0:** Versions `22.0.0` and above + :::: details How to install the dependency environment? ::: steps diff --git a/docs/notes/theme/guide/quick-start/usage.md b/docs/notes/theme/guide/quick-start/usage.md index 14be08be..b45da680 100644 --- a/docs/notes/theme/guide/quick-start/usage.md +++ b/docs/notes/theme/guide/quick-start/usage.md @@ -10,10 +10,9 @@ tags: ## 依赖环境 -- [Node.js](https://nodejs.org/) : **^18.19.0 或 ^20.6.0 或 >= 22.0.0** [+node-versions] +- [Node.js](https://nodejs.org/) : **^20.6.0 或 >= 22.0.0** [+node-versions] - [npm 8+](https://www.npmjs.com/) 或 [pnpm 8+](https://pnpm.io/zh/) 或 [Yarn 2+](https://yarnpkg.com/) -[+node-versions]: **^18.19.0:** `18.19.0` 及以上但不高于 `19.0.0` 的版本 [+node-versions]: **^20.6.0:** `20.6.0` 及以上但不高于 `21.0.0` 的版本 [+node-versions]: **>= 22.0.0:** `22.0.0` 及以上的版本 diff --git a/package.json b/package.json index d5fa68cb..dfe08c14 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "vuepress-theme-plume" ], "engines": { - "node": "^18.19.0 || ^20.9.0 || >=22.1.0", + "node": "^20.9.0 || >=22.1.0", "pnpm": ">=9" }, "scripts": { diff --git a/plugins/plugin-fonts/tsup.config.ts b/plugins/plugin-fonts/tsup.config.ts index 1ad32a02..1368098a 100644 --- a/plugins/plugin-fonts/tsup.config.ts +++ b/plugins/plugin-fonts/tsup.config.ts @@ -21,7 +21,7 @@ export default defineConfig(() => { ...DEFAULT_OPTIONS, entry: ['./src/node/index.ts'], outDir: './lib/node', - target: 'node18', + target: 'node20.6.0', }) } diff --git a/plugins/plugin-md-power/tsup.config.ts b/plugins/plugin-md-power/tsup.config.ts index 96bc85f6..3a136c85 100644 --- a/plugins/plugin-md-power/tsup.config.ts +++ b/plugins/plugin-md-power/tsup.config.ts @@ -37,7 +37,7 @@ export default defineConfig(() => { ...DEFAULT_OPTIONS, entry: ['./src/node/index.ts'], outDir: './lib/node', - target: 'node18', + target: 'node20.6.0', external: ['markdown-it', /^@?vuepress/], }) } diff --git a/plugins/plugin-replace-assets/tsup.config.ts b/plugins/plugin-replace-assets/tsup.config.ts index 2aa72f86..cf0ae11f 100644 --- a/plugins/plugin-replace-assets/tsup.config.ts +++ b/plugins/plugin-replace-assets/tsup.config.ts @@ -16,7 +16,7 @@ export default defineConfig(() => { ...DEFAULT_OPTIONS, entry: ['./src/index.ts'], outDir: './lib', - target: 'node18', + target: 'node20.6.0', }) } diff --git a/plugins/plugin-search/tsup.config.ts b/plugins/plugin-search/tsup.config.ts index 20652e48..a7f4c1c7 100644 --- a/plugins/plugin-search/tsup.config.ts +++ b/plugins/plugin-search/tsup.config.ts @@ -36,7 +36,7 @@ export default defineConfig(() => { entry: ['./src/node/index.ts'], outDir: './lib/node', external: sharedExternal, - target: 'node18', + target: 'node20.6.0', }) } diff --git a/theme/package.json b/theme/package.json index c4f8d793..e87a4d28 100644 --- a/theme/package.json +++ b/theme/package.json @@ -53,7 +53,7 @@ "templates" ], "engines": { - "node": "^18.19.0 || ^20.6.0 || >=22.0.0" + "node": "^20.6.0 || >=22.0.0" }, "scripts": { "dev": "pnpm '/(copy|tsup):watch/'", diff --git a/theme/tsup.config.ts b/theme/tsup.config.ts index 31f9b417..16eb1440 100644 --- a/theme/tsup.config.ts +++ b/theme/tsup.config.ts @@ -47,7 +47,7 @@ export default defineConfig((cli) => { entry: ['./src/node/index.ts'], outDir: './lib/node', external: sharedExternal, - target: 'node18', + target: 'node20.6.0', watch: false, }) } diff --git a/tsconfig.base.json b/tsconfig.base.json index b906cc0c..32bfad92 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,7 +1,7 @@ { "extends": "tsconfig-vuepress/base.json", "compilerOptions": { - "target": "ES2022", + "target": "ES2023", "lib": ["DOM", "ES2024"], "module": "ESNext", "moduleResolution": "Bundler",