add engines for esm support (#415)
This commit is contained in:
parent
c74ba4bece
commit
ab2972be83
10 changed files with 33 additions and 3 deletions
12
.changeset/healthy-poems-enjoy.md
Normal file
12
.changeset/healthy-poems-enjoy.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
'@astrojs/parser': patch
|
||||||
|
'@astrojs/prism': patch
|
||||||
|
'create-astro': patch
|
||||||
|
'@astrojs/renderer-preact': patch
|
||||||
|
'@astrojs/renderer-react': patch
|
||||||
|
'@astrojs/renderer-svelte': patch
|
||||||
|
'@astrojs/renderer-vue': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Update package.json engines for esm support
|
|
@ -18,7 +18,7 @@
|
||||||
"astro-scripts": "0.0.1"
|
"astro-scripts": "0.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0",
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0",
|
||||||
"npm": ">=6.14.0"
|
"npm": ">=6.14.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,5 +15,8 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prismjs": "^1.23.0"
|
"prismjs": "^1.23.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
"is-windows": "^1.0.2"
|
"is-windows": "^1.0.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14.0.0",
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0",
|
||||||
"npm": ">=6.14.0"
|
"npm": ">=6.14.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
const currentVersion = process.versions.node;
|
const currentVersion = process.versions.node;
|
||||||
const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10);
|
const requiredMajorVersion = parseInt(currentVersion.split('.')[0], 10);
|
||||||
const minimumMajorVersion = 10;
|
const minimumMajorVersion = 12;
|
||||||
|
|
||||||
if (requiredMajorVersion < minimumMajorVersion) {
|
if (requiredMajorVersion < minimumMajorVersion) {
|
||||||
console.error(`Node.js v${currentVersion} is out of date and unsupported!`);
|
console.error(`Node.js v${currentVersion} is out of date and unsupported!`);
|
||||||
|
|
|
@ -27,5 +27,8 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"uvu": "^0.5.1"
|
"uvu": "^0.5.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"preact": "^10.5.13",
|
"preact": "^10.5.13",
|
||||||
"preact-render-to-string": "^5.1.18"
|
"preact-render-to-string": "^5.1.18"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-dom": "^17.0.2"
|
"react-dom": "^17.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,5 +11,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"svelte": "^3.35.0",
|
"svelte": "^3.35.0",
|
||||||
"@snowpack/plugin-svelte": "^3.7.0"
|
"@snowpack/plugin-svelte": "^3.7.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,5 +12,8 @@
|
||||||
"vue": "^3.0.10",
|
"vue": "^3.0.10",
|
||||||
"@vue/server-renderer": "^3.0.10",
|
"@vue/server-renderer": "^3.0.10",
|
||||||
"@snowpack/plugin-vue": "^2.6.1"
|
"@snowpack/plugin-vue": "^2.6.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue