Skip to content

Commit

Permalink
refactor: nodejs v10 dropped (#249)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: minimum supported `Node.js` version is `12.13.0`
  • Loading branch information
cap-Bernardito authored May 21, 2021
1 parent 38851ea commit 99d8b80
Show file tree
Hide file tree
Showing 19 changed files with 2,483 additions and 2,591 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js ${{ env.node-version }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.node-version }}
node-version: ${{ matrix.node-version }}

- name: Use latest NPM
run: sudo npm i -g npm
Expand All @@ -55,7 +55,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]
webpack-version: [latest]

runs-on: ${{ matrix.os }}
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install lint-staged
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = (api) => {
"@babel/preset-env",
{
targets: {
node: "10.13.0",
node: "12.13.0",
},
},
],
Expand Down
6 changes: 0 additions & 6 deletions husky.config.js

This file was deleted.

4,250 changes: 2,073 additions & 2,177 deletions package-lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"main": "dist/cjs.js",
"engines": {
"node": ">= 10.13.0"
"node": ">= 12.13.0"
},
"scripts": {
"start": "npm run build -- -w",
Expand All @@ -30,7 +30,7 @@
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
"pretest": "npm run lint",
"test": "npm run test:coverage",
"prepare": "npm run build",
"prepare": "husky install && npm run build",
"release": "standard-version"
},
"files": [
Expand All @@ -44,31 +44,31 @@
"serialize-javascript": "^5.0.1"
},
"devDependencies": {
"@babel/cli": "^7.13.14",
"@babel/core": "^7.13.14",
"@babel/preset-env": "^7.13.12",
"@commitlint/cli": "^12.0.1",
"@commitlint/config-conventional": "^12.0.1",
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/preset-env": "^7.14.2",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@gfx/zopfli": "^1.0.15",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^26.6.3",
"cross-env": "^7.0.3",
"del": "^6.0.0",
"del-cli": "^3.0.1",
"eslint": "^7.23.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.1",
"eslint": "^7.26.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.2",
"file-loader": "^6.2.0",
"husky": "^4.3.7",
"husky": "^6.0.0",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"memfs": "^3.2.1",
"lint-staged": "^11.0.0",
"memfs": "^3.2.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"standard-version": "^9.1.1",
"webpack": "^5.29.0",
"prettier": "^2.3.0",
"standard-version": "^9.3.0",
"webpack": "^5.37.1",
"webpack-stats-plugin": "^1.0.3",
"workbox-webpack-plugin": "^6.0.2"
"workbox-webpack-plugin": "^6.1.5"
},
"keywords": [
"webpack"
Expand Down
11 changes: 2 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,8 @@ class CompressionPlugin {
for (const asset of assetsForMinify) {
scheduledTasks.push(
(async () => {
const {
name,
source,
buffer,
output,
cacheItem,
info,
relatedName,
} = asset;
const { name, source, buffer, output, cacheItem, info, relatedName } =
asset;

if (!output.source) {
if (!output.compressed) {
Expand Down
Loading

0 comments on commit 99d8b80

Please sign in to comment.