Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: more cleanup after Node 8 drop #20343

Merged
merged 7 commits into from Mar 20, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 5 additions & 16 deletions .circleci/config.yml
Expand Up @@ -69,7 +69,7 @@ aliases:
- /blog.+/
requires:
- lint
- unit_tests_node8
- unit_tests_node10

e2e_tests_production_runtime_alias: &e2e_tests_production_runtime_alias
<<: *e2e-executor
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
- <<: *install_node_modules
- <<: *persist_cache
# persist our git checkout and node_modules as the next step (assert-changed-files) might exit this step
# when no files have changed (master). We still need to have these files for jobs like lint & unit_tests_node8
# when no files have changed (master). We still need to have these files for jobs like lint & unit_tests_node10
- persist_to_workspace:
root: ./
paths:
Expand All @@ -190,12 +190,6 @@ jobs:
- run: yarn typecheck
- run: yarn check-repo-fields

unit_tests_node8:
executor:
name: node
image: "8"
<<: *test_template

unit_tests_node10:
executor: node
<<: *test_template
Expand Down Expand Up @@ -458,24 +452,19 @@ workflows:
- lint:
requires:
- bootstrap
- unit_tests_node8:
<<: *ignore_docs
requires:
- bootstrap
- unit_tests_node10:
<<: *ignore_docs
requires:
- lint
- unit_tests_node8
- bootstrap
- unit_tests_node12:
<<: *ignore_docs
requires:
- lint
- unit_tests_node8
- unit_tests_node10
- unit_tests_www:
requires:
- lint
- unit_tests_node8
- unit_tests_node10
- integration_tests_long_term_caching:
<<: *e2e-test-workflow
- integration_tests_gatsby_pipeline:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -52,7 +52,7 @@
},
"engines": {
"yarn": "^1.17.3",
"node": ">=8.0.0"
"node": ">=10.0.0"
},
"eslintIgnore": [
"interfaces",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-remove-graphql-queries/package.json
Expand Up @@ -26,6 +26,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby-package/README.md
Expand Up @@ -41,6 +41,6 @@ Outputs the targets/plugins used and the version specified in [plugin data versi

### `nodeVersion`

`string`, defaults to `8.0`
`string`, defaults to `10.0`

Allows the Node.js version target to be modified per [`@babel/preset-env` documentation](https://babeljs.io/docs/en/babel-preset-env#targetsnode)
Expand Up @@ -172,7 +172,7 @@ Array [
"modules": "commonjs",
"shippedProposals": true,
"targets": Object {
"node": "8.0",
"node": "10.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 = `8.0` } = options
const { browser = false, debug = false, nodeVersion = `10.0` } = options
const { NODE_ENV, BABEL_ENV } = process.env

const IS_PRODUCTION = (BABEL_ENV || NODE_ENV) === `production`
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby-package/package.json
Expand Up @@ -23,6 +23,6 @@
"license": "MIT",
"main": "index.js",
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/babel-preset-gatsby/package.json
Expand Up @@ -39,6 +39,6 @@
"slash": "^3.0.0"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
10 changes: 5 additions & 5 deletions packages/gatsby-cli/src/__tests__/index.js
Expand Up @@ -41,14 +41,14 @@ const setup = version => {
}

describe(`error handling`, () => {
it(`panics on Node < 8.0.0`, () => {
const { reporter } = setup(`v6.0.0`)
it(`panics on Node < 10.0.0`, () => {
const { reporter } = setup(`v8.0.0`)

expect(reporter.panic).toHaveBeenCalledTimes(1)
})

it(`shows error with link to more info`, () => {
const { reporter } = setup(`v6.0.0`)
const { reporter } = setup(`v8.0.0`)

expect(reporter.panic).toHaveBeenCalledWith(
expect.stringContaining(`https://gatsby.dev/upgrading-node-js`)
Expand All @@ -57,8 +57,8 @@ describe(`error handling`, () => {
})

describe(`normal behavior`, () => {
it(`does not panic on Node >= 8.0.0`, () => {
;[`8.0.0`, `8.9.0`, `10.0.0`, `11.0.0`, `12.0.0`].forEach(version => {
it(`does not panic on Node >= 10.0.0`, () => {
;[`10.0.0`, `11.0.0`, `12.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 @@ -17,7 +17,7 @@ if (useJsonLogger) {
// Check if update is available
updateNotifier({ pkg }).notify({ isGlobal: true })

const MIN_NODE_VERSION = `>=8.0.0`
const MIN_NODE_VERSION = `>=10.0.0`

if (!semver.satisfies(process.version, MIN_NODE_VERSION)) {
report.panic(
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-codemods/package.json
Expand Up @@ -34,6 +34,6 @@
"jscodeshift": "^0.6.4"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-cypress/package.json
Expand Up @@ -40,6 +40,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.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": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-graphiql-explorer/package.json
Expand Up @@ -54,6 +54,6 @@
"whatwg-fetch": "^3.0.0"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-canonical-urls/package.json
Expand Up @@ -36,6 +36,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-catch-links/package.json
Expand Up @@ -37,6 +37,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-coffeescript/package.json
Expand Up @@ -44,6 +44,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-create-client-paths/package.json
Expand Up @@ -36,6 +36,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-cxs/package.json
Expand Up @@ -39,6 +39,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-emotion/package.json
Expand Up @@ -40,6 +40,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-facebook-analytics/package.json
Expand Up @@ -38,6 +38,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-feed/package.json
Expand Up @@ -43,6 +43,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-flow/package.json
Expand Up @@ -34,6 +34,6 @@
"cross-env": "^5.2.1"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-fullstory/package.json
Expand Up @@ -36,6 +36,6 @@
"gatsby": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-glamor/package.json
Expand Up @@ -38,6 +38,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-google-analytics/package.json
Expand Up @@ -40,7 +40,7 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
},
"types": "./index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-google-gtag/package.json
Expand Up @@ -39,6 +39,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-google-tagmanager/package.json
Expand Up @@ -38,6 +38,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-guess-js/package.json
Expand Up @@ -41,6 +41,6 @@
"gatsby": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-jss/package.json
Expand Up @@ -38,6 +38,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-layout/package.json
Expand Up @@ -33,6 +33,6 @@
"cross-env": "^5.2.1"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-less/package.json
Expand Up @@ -39,6 +39,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__,theme-test.js"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-lodash/package.json
Expand Up @@ -38,6 +38,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-manifest/package.json
Expand Up @@ -44,6 +44,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-netlify-cms/package.json
Expand Up @@ -52,6 +52,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-netlify/package.json
Expand Up @@ -48,6 +48,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-no-sourcemaps/package.json
Expand Up @@ -24,6 +24,6 @@
"gatsby": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-nprogress/package.json
Expand Up @@ -37,6 +37,6 @@
"watch": "babel -w src --out-dir . --ignore **/__tests__"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-offline/package.json
Expand Up @@ -49,6 +49,6 @@
"watch": "npm run build:sw-append -- --watch & npm run build:src -- --watch"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-page-creator/package.json
Expand Up @@ -42,6 +42,6 @@
"gatsby": "^2.0.0"
},
"engines": {
"node": ">=8.0.0"
"node": ">=10.0.0"
}
}