Support Node v14.15+ (#2202)

* Support Node v14.15+

* changeset

* Update .changeset/new-hats-design.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Update .changeset/new-hats-design.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Update .changeset/new-hats-design.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* ES2020

* update yarn.lock

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
This commit is contained in:
Jonathan Neal 2021-12-16 18:53:22 -05:00 committed by GitHub
parent 810aeb321a
commit 45cea6aec5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 74 additions and 70 deletions

View file

@ -0,0 +1,17 @@
---
'astro': minor
'@astrojs/parser': minor
'@astrojs/prism': minor
'create-astro': minor
'@astrojs/renderer-preact': minor
'@astrojs/renderer-react': minor
'@astrojs/renderer-solid': minor
'@astrojs/renderer-svelte': minor
'@astrojs/renderer-vue': minor
'@astrojs/astro-test-builtins-dep': minor
'@astrojs/test-custom-element-renderer': minor
'@astrojs/markdown-remark': minor
'@astrojs/renderer-lit': minor
---
Support for Node v14.15+, dropping Node v12.

View file

@ -11,7 +11,7 @@ body:
Thank you for taking the time to file a bug report! Please fill out this form as completely as possible.
✅ I am using the **latest version of Astro** and all plugins.
✅ I am using a version of Node that supports ESM (`v12.20.0+`, `v14.13.1+`, or `v16.0.0+`)
✅ I am using a version of Node that supports ESM (`v14.15.0+`, or `v16.0.0+`)
- type: input
attributes:
label: What version of `astro` are you using?

View file

@ -116,7 +116,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node_version: [12, 14, 16]
node_version: [14, 16]
include:
- os: windows-latest
node_version: 16

View file

@ -10,7 +10,7 @@ We welcome contributions of any size and skill level. As an open source project,
### Prerequisite
```shell
node: "^12.20.0 || ^14.13.1 || >=16.0.0"
node: "^14.15.0 || >=16.0.0"
yarn: "^1.22.10"
# otherwise, your build will fail
```

View file

@ -8,7 +8,7 @@ Es gibt verschiedene Möglichkeiten Astro mit einem neuen Projekt zu installiere
## Vorbereitungen
- **Node.js** - `v12.20.0`, `v14.13.1`, `v16.0.0` oder höher
- **Node.js** - `v14.15.0`, `v16.0.0` oder höher
- **Texteditor** - Wir empfehlen [VS Code](https://code.visualstudio.com/) mit unserer [offiziellen Astro-Erweiterung](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode)
- **Terminal** - Astro wird im Wesentlichen über die Befehlszeile des Terminals gesteuert

View file

@ -5,7 +5,7 @@ description: Die einfachste Weg schnell mit Astro loszulegen.
---
```shell
# Vorbereitung: Überprüfe, ob Node.js die Version 12.20.0+, 14.13.1+, oder 16+ ist
# Vorbereitung: Überprüfe, ob Node.js die Version 14.15.0+, oder 16+ ist
node --version
# Erstelle einen neues Projektverzeichnis und navigiere direkt dorthin

View file

@ -8,7 +8,7 @@ Hay diferentes formas de instalar Astro en un nuevo proyecto.
## Prerrequisitos
- **Node.js** - `v12.20.0`, `v14.13.1`, `v16.0.0`, o mayor.
- **Node.js** - `v14.15.0`, `v16.0.0`, o mayor.
- **Editor de texto** - Te recomendamos [VS Code](https://code.visualstudio.com/) con nuestra [extensión oficial de Astro](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode).
- **Terminal** - Principalmente, puedes ingresar a Astro por medio de linea de comando del terminal.

View file

@ -5,7 +5,7 @@ lang: es
---
```shell
# prerrequisitos: revisa que Node.js está en la versión 12.20.0+, 14.13.1+, ó 16+
# prerrequisitos: revisa que Node.js está en la versión 14.15.0+, ó 16+
node --version
# crea un nuevo proyecto en el directorio y entra a él

View file

@ -8,7 +8,7 @@ Astron voi asentaa parilla eri tavalla uuteen projektiin.
## Vaatimukset
- **Node.js** - `v12.20.0`, `v14.13.1`, `v16.0.0` tai uudempi.
- **Node.js** - `v14.15.0`, `v16.0.0` tai uudempi.
- **Tekstieditori** - Suosittelemme [VS Codea](https://code.visualstudio.com/) yhdessä [Astro-laajennoksen](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode) kanssa.
- **Terminaali** - Astroa käytetään pääasiassa komentorivin kautta.

View file

@ -5,7 +5,7 @@ lang: fi
---
```shell
# vaatimukset: varmista että Node.js on vähintään versiota 12.20.0+, 14.13.1+ tai 16+
# vaatimukset: varmista että Node.js on vähintään versiota 14.15.0+ tai 16+
node --version
# luo uuden projektin hakemisto ja siirry siihen

View file

@ -8,7 +8,7 @@ Il y a plusieurs façons d'installer Astro dans un nouveau projet.
## Prérequis
- **Node.js** - `v12.20.0`, `v14.13.1`, `v16.0.0`, or plus.
- **Node.js** - `v14.15.0`, `v16.0.0`, or plus.
- **Éditeur de texte** - Privilégiez [VS Code](https://code.visualstudio.com/) et [l'extension Astro officielle](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode).
- **Terminal** - Astro s'utilise principalement en ligne de commande.

View file

@ -5,7 +5,7 @@ lang: fr
---
```shell
# Prérequis : vérifiez que Node.js est en version 12.20.0+, 14.13.1+, ou 16+
# Prérequis : vérifiez que Node.js est en version 14.15.0+, ou 16+
node --version
# Créez un nouveau dossier, et placez-vous dedans

View file

@ -8,7 +8,7 @@ There are a few different ways to install Astro in a new project.
## Prerequisites
- **Node.js** - `v12.20.0`, `v14.13.1`, `v16.0.0`, or higher.
- **Node.js** - `14.15.0`, `v16.0.0`, or higher.
- **Text editor** - We recommend [VS Code](https://code.visualstudio.com/) with our [Official Astro extension](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode).
- **Terminal** - Astro is mainly accessed via the terminal's command-line.

View file

@ -9,7 +9,7 @@ lang: ja
## 事前準備
- **Node.js** - `v12.20.0`、`v14.13.1`、`v16.0.0`、またはそれ以上。
- **Node.js** -`v14.15.0`、`v16.0.0`、またはそれ以上。
- **テキストエディター** - [VS Code](https://code.visualstudio.com/) と [公式 Astro extension](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode)をオススメします。
- **ターミナル** - Astro は主にターミナルのコマンドラインからアクセスします。

View file

@ -5,7 +5,7 @@ lang: ja
---
```shell
# 必須条件: Node.jsが12.20.0+、14.13.1+、または16+であることを確認する。
# 必須条件: Node.jsが14.15.0+、または16+であることを確認する。
node --version
# 新しいプロジェクトディレクトリを作成し、その中に直接移動します

View file

@ -5,7 +5,7 @@ description: De makkelijkste manier om snel te beginnen met Astro.
---
```shell
# voorwaarde: check dat Node.js versie een van de volgende is: 12.20.0+, 14.13.1+, of 16+
# voorwaarde: check dat Node.js versie een van de volgende is: 14.15.0+, of 16+
node --version
# maak een nieuwe project folder en navigeer naar deze folder

View file

@ -5,7 +5,7 @@ description: The easiest way to get started quickly with Astro.
---
```shell
# prerequisite: check that Node.js is 12.20.0+, 14.13.1+, or 16+
# prerequisite: check that Node.js is 14.15.0+, or 16+
node --version
# Make a new project directory, and navigate directly into it

View file

@ -4,7 +4,7 @@ title: Быстрый старт
---
```shell
# Заметка: проверьте, что у вас установлена Node.js версии 12.20.0+, 14.13.1+, или 16+
# Заметка: проверьте, что у вас установлена Node.js версии 14.15.0+, или 16+
node --version
# Создайте новую директорию и перейдите в неё

View file

@ -8,7 +8,7 @@ lang: zh-CN
## 环境要求
- **Node.js** - `v12.20.0`、`v14.13.1``v16.0.0`,或更高版本。
- **Node.js** - `v14.15.0``v16.0.0`,或更高版本。
- **文本编辑器** - 我们推荐使用 [VS Code](https://code.visualstudio.com/) 搭配 [Astro 官方插件](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode)。
- **命令行终端** - Astro 主要是通过终端的命令行执行。

View file

@ -5,7 +5,7 @@ lang: zh-CN
---
```shell
# 环境要求:确保 Node.js 版本是 12.20.0+、14.13.1+ 或 16 及以上。
# 环境要求:确保 Node.js 版本是 14.15.0+ 或 16 及以上。
node --version
# 创建并进入新项目目录

View file

@ -8,7 +8,7 @@ lang: zh-Hant-TW
## 環境需求
- **Node.js** - `v12.20.0`、`v14.13.1``v16.0.0`,或更之後的版本。
- **Node.js** - `v14.15.0``v16.0.0`,或更之後的版本。
- **文字編輯器** - 我們推薦使用 [VS Code](https://code.visualstudio.com/) 和 [Astro 官方擴充套件](https://marketplace.visualstudio.com/items?itemName=astro-build.astro-vscode)。
- **終端機** - Astro 主要透過終端機指令進行。

View file

@ -5,7 +5,7 @@ lang: zh-Hant-TW
---
```shell
# 環境需求:檢查 Node.js 版本是 12.20.0+、14.13.1+ 或 16+。
# 環境需求:檢查 Node.js 版本是 14.15.0+ 或 16+。
node --version
# 開新專案資料夾,並且直接移動到該處

View file

@ -86,6 +86,6 @@
"typescript": "4.5.2"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -30,7 +30,7 @@
"astro-scripts": "0.0.1"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0",
"node": "^14.15.0 || >=16.0.0",
"npm": ">=6.14.0"
}
}

View file

@ -2,7 +2,7 @@
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"target": "ES2019",
"target": "ES2020",
"module": "CommonJS",
"outDir": "./dist"
}

View file

@ -22,6 +22,6 @@
"prismjs": "^1.23.0"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -46,7 +46,7 @@ async function main() {
// it's okay to hard-code the valid Node versions here since they will not change over time.
if (typeof require === 'undefined') {
console.error(`\nNode.js v${version} is not supported by Astro!
Please upgrade to a version of Node.js with complete ESM support: "^12.20.0 || ^14.13.1 || >=16.0.0"\n`);
Please upgrade to a version of Node.js with complete ESM support: "^14.15.0 || >=16.0.0"\n`);
}
// Not supported: Report the most helpful error message possible.

View file

@ -129,7 +129,7 @@
"vite": "^2.6.10"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0",
"node": "^14.15.0 || >=16.0.0",
"npm": ">=6.14.0"
}
}

View file

@ -11,10 +11,6 @@ before(async () => {
describe('Node builtins', () => {
it('Can be used with the node: prefix', async () => {
// node:fs/promise is not supported in Node v12. Test currently throws.
if (process.versions.node <= '13') {
return;
}
const html = await fixture.readFile('/index.html');
const $ = cheerio.load(html);

View file

@ -6,7 +6,7 @@
"declarationDir": "./dist/types",
"module": "ES2020",
"outDir": "./dist",
"target": "ES2019",
"target": "ES2020",
"types": ["vite/client"]
}
}

View file

@ -41,6 +41,6 @@
"uvu": "^0.5.1"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -3,7 +3,7 @@
"include": ["src", "index.d.ts"],
"compilerOptions": {
"allowJs": true,
"target": "ES2019",
"target": "ES2020",
"module": "ES2020",
"outDir": "./dist",
"declarationDir": "./dist/types"

View file

@ -3,7 +3,7 @@
"include": ["src"],
"compilerOptions": {
"allowJs": true,
"target": "ES2019",
"target": "ES2020",
"module": "ES2020",
"outDir": "./dist"
}

View file

@ -26,6 +26,6 @@
"preact-render-to-string": "^5.1.19"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -25,6 +25,6 @@
"react-dom": "^17.0.2"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -25,6 +25,6 @@
"solid-js": "^1.2.3"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -25,6 +25,6 @@
"svelte-preprocess": "^4.9.8"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -24,6 +24,6 @@
"vue": "^3.2.22"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.15.0 || >=16.0.0"
}
}

View file

@ -10,9 +10,7 @@ const defaultConfig = {
minify: false,
format: 'esm',
platform: 'node',
// There's an issue with 'node12.20' compiling ESM to CJS
// so use 'node13.2' instead. V8 support should be similar.
target: 'node13.2',
target: 'node14',
sourcemap: 'inline',
sourcesContent: false,
};

View file

@ -1822,9 +1822,9 @@
node-fetch "*"
"@types/node@*":
version "16.11.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.13.tgz#6b71641b81a98c6a538d89892440c06f147edddc"
integrity sha512-eUXZzHLHoZqj1frtUetNkUetYoJ6X55UmrVnFD4DMhVeAmwLjniZhtBmsRiemQh4uq4G3vUra/Ws/hs9vEvL3Q==
version "17.0.0"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.0.tgz#62797cee3b8b497f6547503b2312254d4fe3c2bb"
integrity sha512-eMhwJXc931Ihh4tkU+Y7GiLzT/y/DBNpNtr4yU9O2w3SYBsr9NaOPhQlLKRmoWtI54uNwuo0IOUFQjVOTZYRvw==
"@types/node@^12.7.1":
version "12.20.37"
@ -2559,7 +2559,7 @@ browser-stdout@1.3.1:
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==
browserslist@^4.17.5, browserslist@^4.18.1:
browserslist@^4.17.5, browserslist@^4.19.1:
version "4.19.1"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.19.1.tgz#4ac0435b35ab655896c31d53018b6dd5e9e4c9a3"
integrity sha512-u2tbbG5PdKRTUoctO3NBD8FQ5HdPh1ZXPHzp1rwaa5jTc+RV9/+RlWiAIKmjRPQF+xbGM9Kklj5bZQFa2s/38A==
@ -2668,9 +2668,9 @@ camelcase@^6.0.0:
integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==
caniuse-lite@^1.0.30001272, caniuse-lite@^1.0.30001286:
version "1.0.30001286"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001286.tgz#3e9debad420419618cfdf52dc9b6572b28a8fff6"
integrity sha512-zaEMRH6xg8ESMi2eQ3R4eZ5qw/hJiVsO/HlLwniIwErij0JDr9P+8V4dtx1l+kLq6j3yy8l8W4fst1lBnat5wQ==
version "1.0.30001287"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001287.tgz#5fab6a46ab9e47146d5dd35abfe47beaf8073c71"
integrity sha512-4udbs9bc0hfNrcje++AxBuc6PfLNHwh3PO9kbwnfCQWyqtlzg3py0YgFu8jyRTTo85VAz4U+VLxSlID09vNtWA==
ccount@^2.0.0:
version "2.0.1"
@ -2996,11 +2996,11 @@ cookies@~0.8.0:
keygrip "~1.1.0"
core-js-compat@^3.18.0, core-js-compat@^3.19.1:
version "3.19.3"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.19.3.tgz#de75e5821c5ce924a0a1e7b7d5c2cb973ff388aa"
integrity sha512-59tYzuWgEEVU9r+SRgceIGXSSUn47JknoiXW6Oq7RW8QHjXWz3/vp8pa7dbtuVu40sewz3OP3JmQEcDdztrLhA==
version "3.20.0"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.20.0.tgz#fd704640c5a213816b6d10ec0192756111e2c9d1"
integrity sha512-relrah5h+sslXssTTOkvqcC/6RURifB0W5yhYBdBkaPYa5/2KBMiog3XiD+s3TwEHWxInWVv4Jx2/Lw0vng+IQ==
dependencies:
browserslist "^4.18.1"
browserslist "^4.19.1"
semver "7.0.0"
core-util-is@~1.0.0:
@ -3385,9 +3385,9 @@ ejs@^3.1.6:
jake "^10.6.1"
electron-to-chromium@^1.4.17:
version "1.4.18"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.18.tgz#2fb282213937986a20a653315963070e8321b3f3"
integrity sha512-i7nKjGGBE1+YUIbfLObA1EZPmN7J1ITEllbhusDk+KIk6V6gUxN9PFe36v+Sd+8Cg0k3cgUv9lQhQZalr8rggw==
version "1.4.21"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.21.tgz#edf7d9477980079d840570c34ab4c4a5bef4c2bd"
integrity sha512-T04U2ciApGbm+dESFEBbewi2Xt0Dgyww8M4n4sOt9lnmFuYbaHEDWCROkx4jvAZDUWWry9YOdnAs+7468q80Qg==
emmet@^2.1.5:
version "2.3.5"
@ -8563,11 +8563,9 @@ tty-table@^2.8.10:
yargs "^15.1.0"
turbo@^1.0.0:
version "1.0.11"
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.0.11.tgz#e832459ed4ec98bdd41fa7c9a12f2720c10ad5b3"
integrity sha512-hTvO3EXaa4D7bfuKE7w2Ba1WpoS5vTfUAbA7Y8szLcmxCTpvfiDGtudl8iu82HRRRn+v1LvpgLSPr/N+ZXbYFQ==
dependencies:
zlib "^1.0.5"
version "1.0.15"
resolved "https://registry.yarnpkg.com/turbo/-/turbo-1.0.15.tgz#bcb1d0367d34836fdef76d742166249ee8860277"
integrity sha512-UfPsZ+RVuSrr1jasF8lQIpjyo0RVgFk7j2H2hvHdIOSwzTbWUrV3TT+Lkg7PJ86jir5NR6Pqseo2y9ajkWFXfA==
type-check@^0.4.0, type-check@~0.4.0:
version "0.4.0"
@ -8962,9 +8960,9 @@ vite-plugin-pwa@0.11.5:
workbox-window "^6.4.0"
vite@^2.6.10:
version "2.7.2"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.7.2.tgz#f9937114cf2e730a7e2e4c4f8c26ed0ed1c3bb6b"
integrity sha512-wMffVVdKZRZP/HwW3yttKL8X+IJePz7bUcnGm0vqljffpVwHpjWC3duZtJQHAGvy+wrTjmwU7vkULpZ1dVXY6w==
version "2.7.3"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.7.3.tgz#e983cf4f71f42c192436bfcad1b75932642da293"
integrity sha512-GAY1P+9fLJOju1SRm8+hykVnEXog+E+KXuqqyMBQDriKCUIKzWnPn142yNNhSdf/ixYGYdUa5ce3A8WaEajzGw==
dependencies:
esbuild "^0.13.12"
postcss "^8.3.11"
@ -9510,11 +9508,6 @@ yocto-queue@^0.1.0:
resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"
integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==
zlib@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/zlib/-/zlib-1.0.5.tgz#6e7c972fc371c645a6afb03ab14769def114fcc0"
integrity sha1-bnyXL8NxxkWmr7A6sUdp3vEU/MA=
zod@^3.8.1:
version "3.11.6"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.11.6.tgz#e43a5e0c213ae2e02aefe7cb2b1a6fa3d7f1f483"