Skip to content

Commit

Permalink
chore: node to version 12 and update peerdeps (#29312)
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Feb 5, 2021
1 parent 7a4b23b commit ed096c4
Show file tree
Hide file tree
Showing 127 changed files with 290 additions and 1,175 deletions.
34 changes: 11 additions & 23 deletions .circleci/config.yml
@@ -1,5 +1,5 @@
orbs:
win: circleci/windows@2.2.0
win: circleci/windows@2.4.0
slack: circleci/slack@3.4.1

executors:
Expand All @@ -8,15 +8,7 @@ executors:
image:
type: string
# First 10.x LTS release, but old Yarn
default: "10.13"
docker:
- image: circleci/node:<< parameters.image >>
node_10_19:
parameters:
image:
type: string
# More recent Yarn binary
default: "10.19"
default: "12.13"
docker:
- image: circleci/node:<< parameters.image >>

Expand Down Expand Up @@ -85,7 +77,7 @@ aliases:
requires:
- lint
- typecheck
- unit_tests_node10
- unit_tests_node12

e2e_tests_production_runtime_alias: &e2e_tests_production_runtime_alias
<<: *e2e-executor
Expand Down Expand Up @@ -218,14 +210,9 @@ jobs:
- run: yarn typecheck
- run: yarn check-repo-fields

unit_tests_node10:
executor: node
<<: *test_template

unit_tests_node12:
executor:
name: node
image: "12"
<<: *test_template

unit_tests_node14:
Expand Down Expand Up @@ -296,7 +283,7 @@ jobs:
test_path: e2e-tests/path-prefix

e2e_tests_pnp:
executor: node_10_19
executor: node
steps:
- checkout
- run: ./scripts/assert-changed-files.sh "packages/*|.circleci/*"
Expand Down Expand Up @@ -474,6 +461,13 @@ jobs:
# keys:
# - yarn-packages-v2-{{ checksum "yarn.lock" }}
# - yarn-packages-v2-
- run:
name: Install node 12.13
command: |
nvm install 12.13.0
nvm alias default 12.13.0
nvm use 12.13.0
choco install yarn
- run:
name: Set yarn timeout
command: yarn config set network-timeout 300000
Expand Down Expand Up @@ -592,12 +586,6 @@ workflows:
<<: *ignore_docs
requires:
- lint
- unit_tests_node10:
<<: *ignore_docs
requires:
- lint
- typecheck
- bootstrap
- unit_tests_node12:
<<: *ignore_docs
requires:
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/artifacts/package.json
Expand Up @@ -13,7 +13,7 @@
"test": "jest --config=jest.config.js --runInBand"
},
"dependencies": {
"gatsby": "^2.22.0",
"gatsby": "^3.0.0-next.0",
"react": "^16.12.0",
"react-dom": "^16.12.0"
},
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/cache-resilience/package.json
Expand Up @@ -13,7 +13,7 @@
"inspect-state": "node utils/inspect-state"
},
"dependencies": {
"gatsby": "^2.19.30",
"gatsby": "^3.0.0-next.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
Expand Down
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "^2.23.11",
"gatsby": "^3.0.0-next.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "^2.23.11",
"gatsby": "^3.0.0-next.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "^2.19.45",
"gatsby": "^3.0.0-next.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "^2.19.45",
"gatsby": "^3.0.0-next.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "^2.19.45",
"gatsby": "^3.0.0-next.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
Expand Up @@ -5,7 +5,7 @@
"version": "0.1.0",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",
"dependencies": {
"gatsby": "^2.19.45",
"gatsby": "^3.0.0-next.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/gatsby-pipeline/package.json
Expand Up @@ -36,6 +36,6 @@
"url": "https://github.com/gatsbyjs/gatsby-starter-default"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion integration-tests/long-term-caching/package.json
Expand Up @@ -9,7 +9,7 @@
"serve": "gatsby serve"
},
"dependencies": {
"gatsby": "^2.0.118",
"gatsby": "^3.0.0-next.0",
"gray-percentage": "^2.0.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/ssr/package.json
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/gatsbyjs/gatsby/issues"
},
"dependencies": {
"gatsby": "^2.27.0",
"gatsby": "^3.0.0-next.0",
"gatsby-plugin-postcss": "^3.3.0",
"react": "^16.12.0",
"react-dom": "^16.12.0",
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/structured-logging/package.json
Expand Up @@ -10,7 +10,7 @@
"serve": "gatsby serve"
},
"dependencies": {
"gatsby": "^2.16.0",
"gatsby": "^3.0.0-next.0",
"gray-percentage": "^2.0.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -98,7 +98,7 @@
},
"engines": {
"yarn": "^1.17.3",
"node": ">=10.13.0"
"node": ">=12.13.0"
},
"eslintIgnore": [
"interfaces",
Expand Down
4 changes: 2 additions & 2 deletions packages/babel-plugin-remove-graphql-queries/package.json
Expand Up @@ -17,7 +17,7 @@
},
"peerDependencies": {
"@babel/core": "^7.0.0",
"gatsby": "^2.0.0"
"gatsby": "^3.0.0-next.0"
},
"license": "MIT",
"main": "index.js",
Expand All @@ -27,6 +27,6 @@
"watch": "babel -w src --out-dir . --ignore \"**/__tests__\" --extensions \".ts,.js\""
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
Expand Up @@ -73,7 +73,7 @@ Array [
"modules": "commonjs",
"shippedProposals": true,
"targets": Object {
"node": "10.13.0",
"node": "12.13.0",
},
"useBuiltIns": "entry",
},
Expand All @@ -96,7 +96,7 @@ Array [
"modules": "commonjs",
"shippedProposals": true,
"targets": Object {
"node": "10.13.0",
"node": "12.13.0",
},
"useBuiltIns": "entry",
},
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby-package/index.js
@@ -1,7 +1,7 @@
const r = require(`./resolver`)

function preset(context, options = {}) {
const { browser = false, debug = false, nodeVersion = `10.13.0` } = options
const { browser = false, debug = false, nodeVersion = `12.13.0` } = options
const { NODE_ENV, BABEL_ENV } = process.env

const IS_TEST = (BABEL_ENV || NODE_ENV) === `test`
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby-package/package.json
Expand Up @@ -26,6 +26,6 @@
"license": "MIT",
"main": "index.js",
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby/package.json
Expand Up @@ -42,6 +42,6 @@
"slash": "^3.0.0"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-cli/package.json
Expand Up @@ -99,6 +99,6 @@
"postinstall": "node scripts/postinstall.js"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
8 changes: 4 additions & 4 deletions packages/gatsby-cli/src/__tests__/index.ts
Expand Up @@ -52,8 +52,8 @@ const setup = (version?: string): ReturnType<typeof getCLI> => {
}

describe(`error handling`, () => {
it(`panics on Node < 10.13.0`, () => {
;[`6.0.0`, `8.0.0`, `10.0.0`].forEach(version => {
it(`panics on Node < 12.13.0`, () => {
;[`6.0.0`, `8.0.0`, `10.0.0`, `12.0.0`].forEach(version => {
const { reporter } = setup(version)

expect(reporter.panic).toHaveBeenCalledTimes(1)
Expand Down Expand Up @@ -95,8 +95,8 @@ describe(`error handling`, () => {
// })

describe(`normal behavior`, () => {
it(`does not panic on Node >= 10.13.0`, () => {
;[`10.13.0`, `12.0.0`, `13.0.0`].forEach(version => {
it(`does not panic on Node >= 12.13.0`, () => {
;[`12.13.0`, `13.0.0`, `14.0.0`].forEach(version => {
const { reporter } = setup(version)

expect(reporter.panic).not.toHaveBeenCalled()
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-cli/src/index.ts
Expand Up @@ -23,7 +23,7 @@ if (os.platform() === `win32`) {
// Check if update is available
updateNotifier({ pkg }).notify({ isGlobal: true })

const MIN_NODE_VERSION = `10.13.0`
const MIN_NODE_VERSION = `12.13.0`
// const NEXT_MIN_NODE_VERSION = `10.13.0`

const { version } = process
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-codemods/package.json
Expand Up @@ -40,7 +40,7 @@
"cross-env": "^7.0.3"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
},
"bin": "./bin/gatsby-codemods.js"
}
2 changes: 1 addition & 1 deletion packages/gatsby-core-utils/package.json
Expand Up @@ -46,6 +46,6 @@
"typescript": "^3.9.7"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
4 changes: 2 additions & 2 deletions packages/gatsby-cypress/package.json
Expand Up @@ -31,14 +31,14 @@
],
"peerDependencies": {
"cypress": "^3.1.0",
"gatsby": "^2.0.0-rc.13"
"gatsby": "^3.0.0-next.0"
},
"scripts": {
"build": "babel src --out-dir . --ignore \"**/__tests__\"",
"prepare": "cross-env NODE_ENV=production npm run build",
"watch": "babel -w src --out-dir . --ignore \"**/__tests__\""
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-design-tokens/package.json
Expand Up @@ -35,6 +35,6 @@
"preval.macro": "^3.0.0"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-dev-cli/package.json
Expand Up @@ -48,6 +48,6 @@
"watch": "babel -w src --out-dir dist --ignore \"**/__tests__\""
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-graphiql-explorer/package.json
Expand Up @@ -56,6 +56,6 @@
"whatwg-fetch": "^3.5.0"
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-image/package.json
Expand Up @@ -38,6 +38,6 @@
"watch": "babel -w src --out-dir . --ignore \"**/__tests__\""
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-link/package.json
Expand Up @@ -41,6 +41,6 @@
},
"types": "index.d.ts",
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-page-utils/package.json
Expand Up @@ -44,6 +44,6 @@
"dist/"
],
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-benchmark-reporting/package.json
Expand Up @@ -29,6 +29,6 @@
"watch": "babel -w src --out-dir . --ignore \"**/__tests__\""
},
"engines": {
"node": ">=10.13.0"
"node": ">=12.13.0"
}
}

0 comments on commit ed096c4

Please sign in to comment.