mirror of
https://github.com/facebook/docusaurus.git
synced 2025-04-28 17:57:48 +02:00
chore: update node engine version 18 (#9348)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
a178654446
commit
bde9cfd84d
46 changed files with 54 additions and 64 deletions
2
.github/workflows/argos.yml
vendored
2
.github/workflows/argos.yml
vendored
|
@ -36,7 +36,7 @@ jobs:
|
|||
- name: Use Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
|
2
.github/workflows/build-blog-only.yml
vendored
2
.github/workflows/build-blog-only.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
|||
- name: Set up Node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
2
.github/workflows/build-perf.yml
vendored
2
.github/workflows/build-perf.yml
vendored
|
@ -40,7 +40,7 @@ jobs:
|
|||
- name: Set up Node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Track build size changes
|
||||
uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 # v2
|
||||
|
|
2
.github/workflows/canary-release.yml
vendored
2
.github/workflows/canary-release.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
- name: Set up Node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Prepare git
|
||||
run: |
|
||||
|
|
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
- name: Set up Node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
14
.github/workflows/tests-e2e.yml
vendored
14
.github/workflows/tests-e2e.yml
vendored
|
@ -38,7 +38,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['16.14', '16', '18']
|
||||
node: ['18.0', '18', '20']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
||||
|
@ -76,10 +76,10 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
||||
- name: Use Node.js 16
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
@ -130,10 +130,10 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
||||
- name: Use Node.js 16
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
@ -160,10 +160,10 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
||||
- name: Use Node.js 16
|
||||
- name: Use Node.js 18
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
2
.github/workflows/tests-swizzle.yml
vendored
2
.github/workflows/tests-swizzle.yml
vendored
|
@ -30,7 +30,7 @@ jobs:
|
|||
- name: Set up Node
|
||||
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3
|
||||
with:
|
||||
node-version: '16'
|
||||
node-version: '18'
|
||||
cache: yarn
|
||||
- name: Installation
|
||||
run: yarn
|
||||
|
|
2
.github/workflows/tests-windows.yml
vendored
2
.github/workflows/tests-windows.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['16.14', '16', '18']
|
||||
node: ['18.0', '18', '20']
|
||||
steps:
|
||||
- name: Support longpaths
|
||||
run: git config --system core.longpaths true
|
||||
|
|
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node: ['16.14', '16', '18']
|
||||
node: ['18.0', '18', '20']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
||||
|
|
|
@ -10,16 +10,6 @@
|
|||
import fs from 'fs-extra';
|
||||
import shell from 'shelljs';
|
||||
|
||||
const NODE_MAJOR_VERSION = parseInt(
|
||||
/** @type {string} */ (process.versions.node.split('.')[0]),
|
||||
10,
|
||||
);
|
||||
if (NODE_MAJOR_VERSION < 16) {
|
||||
throw new Error(
|
||||
'This generateExamples Docusaurus script requires at least Node.js 16 and npm 7. See why here: https://github.com/facebook/docusaurus/pull/5722#issuecomment-948847891',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate one example per init template
|
||||
* We use those generated examples as CodeSandbox projects
|
||||
|
@ -78,9 +68,9 @@ async function generateTemplateExample(template) {
|
|||
hardReloadOnChange: true,
|
||||
view: 'browser',
|
||||
template: 'docusaurus',
|
||||
node: '16',
|
||||
node: '18',
|
||||
container: {
|
||||
node: '16',
|
||||
node: '18',
|
||||
},
|
||||
};
|
||||
await fs.writeFile(
|
||||
|
|
|
@ -37,6 +37,6 @@
|
|||
"@types/supports-color": "^8.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,6 +41,6 @@
|
|||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,6 +38,6 @@
|
|||
]
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new
|
|||
|
||||
### What you'll need
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above:
|
||||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Generate a new site
|
||||
|
|
|
@ -26,6 +26,6 @@
|
|||
"to-vfile": "^6.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/supports-color": "^8.1.1"
|
||||
|
|
|
@ -63,6 +63,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"description": "A CLI tool to migrate from older versions of Docusaurus.",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
|
|
|
@ -36,6 +36,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,6 +47,6 @@
|
|||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
"to-vfile": "^6.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,6 +42,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,6 @@
|
|||
"lodash": "^4.17.21"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,6 @@
|
|||
}
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"webpack": "^5.88.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/types": "3.0.0-beta.0",
|
||||
|
|
|
@ -125,6 +125,6 @@
|
|||
"react-dom": "^18.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,6 @@
|
|||
"eslint": ">=6"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
"tslib": "^2.6.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.14"
|
||||
"node": ">=18.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/file-loader": "^5.0.1"
|
||||
|
|
|
@ -21,7 +21,7 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
|
|||
|
||||
## Requirements {#requirements}
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed.
|
||||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed.
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Scaffold project website {#scaffold-project-website}
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
|
||||
[build.environment]
|
||||
NETLIFY_USE_YARN = "true"
|
||||
YARN_VERSION = "1.22.5"
|
||||
NODE_VERSION = "16"
|
||||
YARN_VERSION = "1.22.19"
|
||||
NODE_VERSION = "18"
|
||||
NODE_OPTIONS = "--max_old_space_size=8192"
|
||||
|
||||
[context.production]
|
||||
|
|
|
@ -21,7 +21,7 @@ Use **[docusaurus.new](https://docusaurus.new)** to test Docusaurus immediately
|
|||
|
||||
## Requirements {#requirements}
|
||||
|
||||
- [Node.js](https://nodejs.org/en/download/) version 16.14 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed.
|
||||
- [Node.js](https://nodejs.org/en/download/) version 18.0 or above (which can be checked by running `node -v`). You can use [nvm](https://github.com/nvm-sh/nvm) for managing multiple Node versions on a single machine installed.
|
||||
- When installing Node.js, you are recommended to check all checkboxes related to dependencies.
|
||||
|
||||
## Scaffold project website {#scaffold-project-website}
|
||||
|
|
Loading…
Add table
Reference in a new issue