Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Drop Node 8 support
  • Loading branch information
ianschmitz committed May 3, 2020
commit dae7eb02bae7e2a18de3ce45882135dbcbcd2e21
8 changes: 4 additions & 4 deletions azure-pipelines-test-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ parameters:
name: ''
testScript: ''
configurations:
LinuxNode8: { vmImage: 'ubuntu-16.04', nodeVersion: 8.x }
LinuxNode10: { vmImage: 'ubuntu-16.04', nodeVersion: 10.x }
# WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x }
# WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x }
LinuxNode10: { vmImage: 'ubuntu-latest', nodeVersion: 10.x }
LinuxNode12: { vmImage: 'ubuntu-latest', nodeVersion: 12.x }
# WindowsNode10: { vmImage: 'windows-latest', nodeVersion: 10.x }
# WindowsNode12: { vmImage: 'windows-latest', nodeVersion: 12.x }

jobs:
- job: ${{ parameters.name }}
Expand Down
31 changes: 9 additions & 22 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,36 +57,23 @@ jobs:
name: Behavior
testScript: tasks/e2e-behavior.sh
configurations:
LinuxNode8: { vmImage: 'ubuntu-18.04', nodeVersion: 8.x }
LinuxNode10: { vmImage: 'ubuntu-18.04', nodeVersion: 10.x }
# WindowsNode8: { vmImage: 'vs2017-win2016', nodeVersion: 8.x }
# WindowsNode10: { vmImage: 'vs2017-win2016', nodeVersion: 10.x }
MacNode8: { vmImage: 'macOS-10.15', nodeVersion: 8.x }
MacNode10: { vmImage: 'macOS-10.15', nodeVersion: 10.x }
LinuxNode10: { vmImage: 'ubuntu-latest', nodeVersion: 10.x }
LinuxNode12: { vmImage: 'ubuntu-latest', nodeVersion: 12.x }
# WindowsNode10: { vmImage: 'windows-latest', nodeVersion: 10.x }
# WindowsNode12: { vmImage: 'windows-latest', nodeVersion: 12.x }
MacNode10: { vmImage: 'macOS-latest', nodeVersion: 10.x }
MacNode12: { vmImage: 'macOS-latest', nodeVersion: 12.x }

# ******************************************************************************
# Old Node test suite
# ******************************************************************************
- job: OldNode
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: 6.x
displayName: 'Install Node.js 6.x'
versionSpec: 10.x
displayName: 'Install Node.js 10.x'
- bash: tasks/e2e-old-node.sh
displayName: 'Run tests'
# ******************************************************************************
# Unsupported Node with TypeScript flag
# ******************************************************************************
- job: UnsupportedNodeWithTypeScript
pool:
vmImage: ubuntu-16.04
steps:
- task: NodeTool@0
inputs:
versionSpec: 8.9.x
displayName: 'Install Node.js 8.9.x'
- bash: tasks/e2e-typescript-unsupported-node.sh
displayName: 'Run unsupported TypeScript test'
2 changes: 1 addition & 1 deletion docusaurus/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Create a project, and you’re good to go.

## Creating an App

**You’ll need to have Node >= 8.10 on your local development machine** (but it’s not required on the server). You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.
**You’ll need to have Node >= 10 on your local development machine** (but it’s not required on the server). You can use [nvm](https://github.com/creationix/nvm#installation) (macOS/Linux) or [nvm-windows](https://github.com/coreybutler/nvm-windows#node-version-manager-nvm-for-windows) to switch Node versions between different projects.

To create a new app, you may choose one of the following methods:

Expand Down
2 changes: 1 addition & 1 deletion packages/cra-template-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"license": "MIT",
"engines": {
"node": ">=8.10"
"node": ">=10"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
2 changes: 1 addition & 1 deletion packages/cra-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"license": "MIT",
"engines": {
"node": ">=8"
"node": ">=10"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
16 changes: 4 additions & 12 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,12 @@ function createApp(
usePnp,
useTypeScript
) {
const unsupportedNodeVersion = !semver.satisfies(process.version, '>=8.10.0');
if (unsupportedNodeVersion && useTypeScript) {
console.error(
chalk.red(
`You are using Node ${process.version} with the TypeScript template. Node 8.10 or higher is required to use TypeScript.\n`
)
);

process.exit(1);
} else if (unsupportedNodeVersion) {
const unsupportedNodeVersion = !semver.satisfies(process.version, '>=10');
if (unsupportedNodeVersion) {
console.log(
chalk.yellow(
`You are using Node ${process.version} so the project will be bootstrapped with an old unsupported version of tools.\n\n` +
`Please update to Node 8.10 or higher for a better, fully supported experience.\n`
`Please update to Node 10 or higher for a better, fully supported experience.\n`
)
);
// Fall back to latest supported react-scripts on Node 4
Expand Down Expand Up @@ -516,7 +508,7 @@ function run(
console.log(
chalk.yellow(
`\nNote: the project was bootstrapped with an old unsupported version of tools.\n` +
`Please update to Node >=8.10 and npm >=5 to get supported tools in new projects.\n`
`Please update to Node >=10 and npm >=6 to get supported tools in new projects.\n`
)
);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"license": "MIT",
"engines": {
"node": ">=8"
"node": ">=10"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-app-polyfill/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/facebook/create-react-app/issues"
},
"engines": {
"node": ">=6"
"node": ">=10"
},
"files": [
"ie9.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "https://github.com/facebook/create-react-app/issues"
},
"engines": {
"node": ">=8.10"
"node": ">=10"
},
"files": [
"browsersHelper.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"license": "MIT",
"engines": {
"node": ">=8.10"
"node": ">=10"
},
"bugs": {
"url": "https://github.com/facebook/create-react-app/issues"
Expand Down
2 changes: 1 addition & 1 deletion tasks/e2e-old-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cd "$root_path"/packages/create-react-app
npm install
cd "$root_path"

# If the node version is < 6, the script should just give an error.
# If the node version is < 10, the script should just give an error.
cd $temp_app_path
err_output=`node "$root_path"/packages/create-react-app/index.js test-node-version 2>&1 > /dev/null || echo ''`
[[ $err_output =~ You\ are\ running\ Node ]] && exit 0 || exit 1
Expand Down
61 changes: 0 additions & 61 deletions tasks/e2e-typescript-unsupported-node.sh

This file was deleted.