add engines for esm support (#415)

This commit is contained in:
Fred K. Schott 2021-06-14 05:20:14 -07:00 committed by GitHub
parent c74ba4bece
commit ab2972be83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 3 deletions

View 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

View file

@ -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"
} }
} }

View file

@ -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"
} }
} }

View file

@ -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"
} }
} }

View file

@ -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!`);

View file

@ -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"
} }
} }

View file

@ -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"
} }
} }

View file

@ -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"
} }
} }

View file

@ -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"
} }
} }

View file

@ -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"
} }
} }