Commit a03c1e66 authored by xuchentao's avatar xuchentao

fix: support Node.js 20 deployment

parent 8a0972f4
Pipeline #411 failed with stages
in 44 seconds
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
"type": "module", "type": "module",
"version": "1.0.0", "version": "1.0.0",
"private": true, "private": true,
"engines": {
"node": ">=20.20.0 <21"
},
"scripts": { "scripts": {
"dev": "node --env-file=.env ./node_modules/astro/bin/astro.mjs dev", "dev": "node --env-file=.env ./node_modules/astro/astro.js dev",
"build": "node scripts/build-site.mjs", "build": "node scripts/build-site.mjs",
"build:inside-lock": "node scripts/build-site.mjs --inside-lock", "build:inside-lock": "node scripts/build-site.mjs --inside-lock",
"build:astro": "astro check && astro build", "build:astro": "astro check && astro build",
...@@ -15,9 +18,9 @@ ...@@ -15,9 +18,9 @@
"serve": "npm run build && npm start" "serve": "npm run build && npm start"
}, },
"dependencies": { "dependencies": {
"@astrojs/node": "^11.0.2", "@astrojs/node": "9.5.5",
"@astrojs/sitemap": "^3.7.3", "@astrojs/sitemap": "^3.7.3",
"astro": "^7.1.3", "astro": "5.18.2",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"marked": "^14.1.4" "marked": "^14.1.4"
}, },
......
...@@ -11,7 +11,7 @@ const DEFAULT_LOCK = process.env.CMS_DATA_DIR ...@@ -11,7 +11,7 @@ const DEFAULT_LOCK = process.env.CMS_DATA_DIR
: path.join(RUNTIME_DIR, "site-build.lock"); : path.join(RUNTIME_DIR, "site-build.lock");
const LOCK_FILE = path.resolve(process.env.CMS_BUILD_LOCK || DEFAULT_LOCK); const LOCK_FILE = path.resolve(process.env.CMS_BUILD_LOCK || DEFAULT_LOCK);
const RECOVERY_LOCK_FILE = `${LOCK_FILE}.recovery`; const RECOVERY_LOCK_FILE = `${LOCK_FILE}.recovery`;
const ASTRO_BIN = path.join(ROOT, "node_modules", "astro", "bin", "astro.mjs"); const ASTRO_BIN = path.join(ROOT, "node_modules", "astro", "astro.js");
const DIST_DIR = path.join(ROOT, "dist"); const DIST_DIR = path.join(ROOT, "dist");
const MAX_LOG_LENGTH = 2 * 1024 * 1024; const MAX_LOG_LENGTH = 2 * 1024 * 1024;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment