Skip to content

Commit 4a6e9fb

Browse files
chore: update defaults
1 parent b146549 commit 4a6e9fb

File tree

10 files changed

+173
-48
lines changed

10 files changed

+173
-48
lines changed

.editorconfig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ insert_final_newline = true
99
trim_trailing_whitespace = true
1010

1111
[*.md]
12-
insert_final_newline = true
13-
trim_trailing_whitespace = false
12+
trim_trailing_whitespace = false

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
module.exports = {
22
root: true,
3-
parser: 'babel-eslint',
43
extends: ['@webpack-contrib/eslint-config-webpack', 'prettier'],
54
};

.github/workflows/nodejs.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,8 @@ jobs:
5555
strategy:
5656
matrix:
5757
os: [ubuntu-latest, windows-latest, macos-latest]
58-
# css-loader doesn't support node@6
59-
node-version: [8.x, 10.x, 12.x, 14.x]
58+
node-version: [10.x, 12.x, 14.x]
6059
webpack-version: [latest, next]
61-
exclude:
62-
# Webpack 5 does not support node 6 and 8
63-
- node-version: 8.x
64-
webpack-version: next
6560

6661
runs-on: ${{ matrix.os }}
6762

@@ -86,7 +81,7 @@ jobs:
8681
run: npm i -g npm
8782

8883
- name: Install dependencies
89-
run: npm i
84+
run: npm ci
9085

9186
- name: Install webpack ${{ matrix.webpack-version }}
9287
run: npm i webpack@${{ matrix.webpack-version }}

.prettierignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
/dist
33
/node_modules
44
/test/fixtures
5-
/test/cases/*/expected
6-
/test/js
7-
CHANGELOG.md
5+
CHANGELOG.md

babel.config.js

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,10 @@ module.exports = (api) => {
1010
'@babel/preset-env',
1111
{
1212
targets: {
13-
node: '6.9.0',
13+
node: '10.13.0',
1414
},
1515
},
1616
],
1717
],
18-
overrides: [
19-
{
20-
test: '**/hmr/**/*.js',
21-
presets: [
22-
[
23-
'@babel/preset-env',
24-
{
25-
targets: {
26-
node: '0.12',
27-
},
28-
},
29-
],
30-
],
31-
},
32-
],
3318
};
3419
};

lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
22
'*.js': ['prettier --write', 'eslint --fix', 'git add'],
3-
'*.{json,md,yml,css}': ['prettier --write', 'git add'],
3+
'*.{json,md,yml,css,ts}': ['prettier --write', 'git add'],
44
};

package-lock.json

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

package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,25 @@
1313
},
1414
"main": "dist/cjs.js",
1515
"engines": {
16-
"node": ">= 6.9.0"
16+
"node": ">= 10.13.0"
1717
},
1818
"scripts": {
1919
"start": "npm run build -- -w",
20-
"prebuild": "npm run clean",
21-
"build": "cross-env NODE_ENV=production babel src -d dist --ignore \"src/**/*.test.js\" --copy-files",
22-
"postbuild": "es-check es5 dist/hmr/hotModuleReplacement.js",
2320
"clean": "del-cli dist",
21+
"prebuild": "npm run clean",
22+
"build": "cross-env NODE_ENV=production babel src -d dist --copy-files",
2423
"commitlint": "commitlint --from=master",
25-
"lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css}\" --list-different",
26-
"lint:js": "eslint --cache src test",
27-
"lint": "npm-run-all -l -p \"lint:**\"",
28-
"prepare": "npm run build",
29-
"release": "standard-version",
3024
"security": "npm audit",
25+
"lint:prettier": "prettier \"{**/*,*}.{js,json,md,yml,css,ts}\" --list-different",
26+
"lint:js": "eslint --cache .",
27+
"lint": "npm-run-all -l -p \"lint:**\"",
3128
"test:only": "cross-env NODE_ENV=test jest",
32-
"test:watch": "cross-env NODE_ENV=test jest --watch",
33-
"test:coverage": "cross-env NODE_ENV=test jest --collectCoverageFrom=\"src/**/*.js\" --coverage",
34-
"test:manual": "npm run build && webpack-dev-server test/manual/src/index.js --open --config test/manual/webpack.config.js",
29+
"test:watch": "npm run test:only -- --watch",
30+
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
3531
"pretest": "npm run lint",
36-
"test": "cross-env NODE_ENV=test npm run test:coverage",
32+
"test": "npm run test:coverage",
33+
"prepare": "npm run build",
34+
"release": "standard-version",
3735
"defaults": "webpack-defaults"
3836
},
3937
"files": [
@@ -54,10 +52,11 @@
5452
"@babel/preset-env": "^7.7.6",
5553
"@commitlint/cli": "^8.1.0",
5654
"@commitlint/config-conventional": "^8.1.0",
57-
"@webpack-contrib/defaults": "^5.0.2",
55+
"@webpack-contrib/defaults": "^6.3.0",
5856
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
5957
"babel-eslint": "^10.0.2",
6058
"babel-jest": "^24.8.0",
59+
"commitlint-azure-pipelines-cli": "^1.0.3",
6160
"cross-env": "^5.2.0",
6261
"css-loader": "^3.3.2",
6362
"del": "^4.1.1",
@@ -69,6 +68,7 @@
6968
"file-loader": "^4.0.0",
7069
"husky": "^3.0.0",
7170
"jest": "^24.8.0",
71+
"jest-junit": "^11.0.1",
7272
"lint-staged": "^9.5.0",
7373
"memfs": "^3.0.2",
7474
"npm-run-all": "^4.1.5",

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import sources from 'webpack-sources';
66
import validateOptions from 'schema-utils';
77

88
import CssDependency from './CssDependency';
9-
import schema from './plugin-options.json';
9+
import schema from './options.json';
1010

1111
const { ConcatSource, SourceMapSource, OriginalSource } = sources;
1212
const {

0 commit comments

Comments
 (0)