Skip to content

Commit

Permalink
✨ Upgrade to Node 12 (#161)
Browse files Browse the repository at this point in the history
* 🔨 Upgrade to Node 12

* 👷 Run CI tests in Node 12

* ➖ Remove unneeded dependency

Since eslint-standard 16, the plugin is no longer required

* 🔨 Use Node 14 for development

Specified with an .nvmrc file

Release and Lint workflows were also updated to reflect a dev environment while the Test and
Typecheck workflows are kept at Node 12 to test Maintenance LTS compatibility.
  • Loading branch information
Wil Wilsman authored Feb 2, 2021
1 parent 4eca80b commit 269a07a
Show file tree
Hide file tree
Showing 21 changed files with 560 additions and 527 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: v1/${{ runner.os }}/node-12/${{ hashFiles('**/yarn.lock') }}
restore-keys: v1/${{ runner.os }}/node-12/
key: v1/${{ runner.os }}/node-14/${{ hashFiles('**/yarn.lock') }}
restore-keys: v1/${{ runner.os }}/node-14/
- run: yarn
- run: yarn lint
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 14
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
node-version: 12
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: v1/${{ runner.os }}/node-10/${{ hashFiles('**/yarn.lock') }}
restore-keys: v1/${{ runner.os }}/node-10/
key: v1/${{ runner.os }}/node-12/${{ hashFiles('**/yarn.lock') }}
restore-keys: v1/${{ runner.os }}/node-12/
- run: yarn
- run: yarn build
- uses: actions/upload-artifact@v2
Expand All @@ -30,7 +30,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [10]
node: [12]
package:
- '@percy/env'
- '@percy/client'
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
presets: [
['@babel/env', {
targets: {
node: '10'
node: '12'
}
}]
],
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^5.0.0",
"expect": "^26.4.2",
"lerna": "^3.22.1",
"mocha": "^8.1.3",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"dist",
"oclif.manifest.json"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli-command/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"dist",
"types/index.d.ts"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"dist",
"oclif.manifest.json"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli-exec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"dist",
"oclif.manifest.json"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli-snapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"dist",
"oclif.manifest.json"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli-upload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"dist",
"oclif.manifest.json"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
"index.js",
"oclif.manifest.json"
],
"engines": {
"node": ">=12"
},
"scripts": {
"lint": "eslint --ignore-path ../../.gitignore .",
"postbuild": "oclif-dev manifest"
Expand Down
3 changes: 3 additions & 0 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"dist",
"test/helper.js"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"dist",
"types/index.d.ts"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"types/index.d.ts",
"test/helpers/server.js"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"files": [
"dist"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "rollup --config",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"files": [
"dist"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"dist",
"test/helper.js"
],
"engines": {
"node": ">=12"
},
"scripts": {
"build": "babel --root-mode upward src --out-dir dist",
"lint": "eslint --ignore-path ../../.gitignore .",
Expand Down
3 changes: 3 additions & 0 deletions packages/sdk-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"index.js",
"test/helper.js"
],
"engines": {
"node": ">=12"
},
"scripts": {
"lint": "eslint --ignore-path ../../.gitignore .",
"test": "cross-env NODE_ENV=test mocha",
Expand Down
Loading

0 comments on commit 269a07a

Please sign in to comment.