Skip to content

Commit 0c27a13

Browse files
refactor: nodejs v10 dropped (#134)
1 parent a7fef13 commit 0c27a13

File tree

9 files changed

+19434
-3739
lines changed

9 files changed

+19434
-3739
lines changed

.github/workflows/nodejs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
with:
3030
fetch-depth: 0
3131

32-
- name: Use Node.js ${{ env.node-version }}
32+
- name: Use Node.js ${{ matrix.node-version }}
3333
uses: actions/setup-node@v1
3434
with:
35-
node-version: ${{ env.node-version }}
35+
node-version: ${{ matrix.node-version }}
3636

3737
- name: Use latest NPM
3838
run: sudo npm i -g npm
@@ -55,7 +55,7 @@ jobs:
5555
strategy:
5656
matrix:
5757
os: [ubuntu-latest, windows-latest, macos-latest]
58-
node-version: [10.x, 12.x, 14.x]
58+
node-version: [12.x, 14.x, 16.x]
5959
webpack-version: [latest]
6060

6161
runs-on: ${{ matrix.os }}

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/commit-msg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install lint-staged

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = (api) => {
1010
"@babel/preset-env",
1111
{
1212
targets: {
13-
node: "10.13.0",
13+
node: "12.13.0",
1414
},
1515
},
1616
],

package-lock.json

Lines changed: 19400 additions & 3712 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"main": "dist/cjs.js",
1515
"engines": {
16-
"node": ">= 10.13.0"
16+
"node": ">= 12.13.0"
1717
},
1818
"scripts": {
1919
"start": "npm run build -- -w",
@@ -30,9 +30,8 @@
3030
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
3131
"pretest": "npm run lint",
3232
"test": "npm run test:coverage",
33-
"prepare": "npm run build",
34-
"release": "standard-version",
35-
"defaults": "webpack-defaults"
33+
"prepare": "husky install && npm run build",
34+
"release": "standard-version"
3635
},
3736
"files": [
3837
"dist"
@@ -41,32 +40,31 @@
4140
"webpack": "^5.0.0"
4241
},
4342
"devDependencies": {
44-
"@babel/cli": "^7.12.10",
45-
"@babel/core": "^7.12.10",
46-
"@babel/preset-env": "^7.12.11",
47-
"@commitlint/cli": "^11.0.0",
48-
"@commitlint/config-conventional": "^11.0.0",
49-
"@webpack-contrib/defaults": "^6.3.0",
43+
"@babel/cli": "^7.14.3",
44+
"@babel/core": "^7.14.3",
45+
"@babel/preset-env": "^7.14.2",
46+
"@commitlint/cli": "^12.1.4",
47+
"@commitlint/config-conventional": "^12.1.4",
5048
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
5149
"babel-jest": "^26.6.3",
5250
"babel-loader": "^8.2.2",
5351
"cross-env": "^7.0.3",
5452
"del": "^6.0.0",
5553
"del-cli": "^3.0.1",
56-
"eslint": "^7.19.0",
57-
"eslint-config-prettier": "^7.2.0",
58-
"eslint-plugin-import": "^2.22.1",
59-
"husky": "^4.3.8",
54+
"eslint": "^7.26.0",
55+
"eslint-config-prettier": "^8.3.0",
56+
"eslint-plugin-import": "^2.23.2",
57+
"husky": "^6.0.0",
6058
"jest": "^26.6.3",
61-
"lint-staged": "^10.5.3",
62-
"memfs": "^3.2.0",
59+
"lint-staged": "^11.0.0",
60+
"memfs": "^3.2.2",
6361
"npm-run-all": "^4.1.5",
64-
"prettier": "^2.2.1",
65-
"react": "^17.0.1",
62+
"prettier": "^2.3.0",
63+
"react": "^17.0.2",
6664
"rx": "^4.1.0",
67-
"standard-version": "^9.1.0",
68-
"styled-components": "^5.2.1",
69-
"webpack": "^5.19.0"
65+
"standard-version": "^9.3.0",
66+
"styled-components": "^5.3.0",
67+
"webpack": "^5.37.1"
7068
},
7169
"keywords": [
7270
"webpack"

test/__snapshots__/loader.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ Object {
10801080
"isStyledComponent": [Function],
10811081
"keyframes": [Function],
10821082
"useTheme": [Function],
1083-
"version": "5.2.1",
1083+
"version": "5.3.0",
10841084
"withTheme": [Function],
10851085
},
10861086
},

test/loader.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ describe("loader", () => {
388388
getModuleSource("./simple-commonjs2-single-export-exposed.js", stats)
389389
).toMatchSnapshot("module");
390390
expect(chunkGraph.getModuleHash(module)).toBe(
391-
"34429e229c60b66e2bb98684f7f32605"
391+
"0f36538686929ab9693cc011812d2b0a"
392392
);
393393
expect(getErrors(stats)).toMatchSnapshot("errors");
394394
expect(getWarnings(stats)).toMatchSnapshot("warnings");

0 commit comments

Comments
 (0)