Skip to content

Commit

Permalink
chore: update node engine version 18 (#9348)
Browse files Browse the repository at this point in the history
Co-authored-by: Sébastien Lorber <[email protected]>
Co-authored-by: sebastienlorber <[email protected]>
  • Loading branch information
3 people authored Sep 28, 2023
1 parent a178654 commit bde9cfd
Show file tree
Hide file tree
Showing 46 changed files with 54 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/argos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-blog-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-swizzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions admin/scripts/generateExamples.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion packages/create-docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"@types/supports-color": "^8.1.1"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/create-docusaurus/templates/classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/create-docusaurus/templates/shared/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-cssnano-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
"to-vfile": "^6.1.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"tslib": "^2.6.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
},
"devDependencies": {
"@types/supports-color": "^8.1.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-mdx-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-client-redirects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-content-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-content-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-content-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-google-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-google-gtag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-google-tag-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-ideal-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
}
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-sitemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-preset-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-remark-plugin-npm2yarn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"to-vfile": "^6.1.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-live-codeblock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-mermaid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-search-algolia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@
"react-dom": "^18.0.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-theme-translations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"lodash": "^4.17.21"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-utils-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
}
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-utils-validation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"tslib": "^2.6.0"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"webpack": "^5.88.1"
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
},
"devDependencies": {
"@docusaurus/types": "3.0.0-beta.0",
Expand Down
Loading

0 comments on commit bde9cfd

Please sign in to comment.