Skip to content

Commit 8bfbfa0

Browse files
chore(deps): update (#276)
1 parent 74d2c60 commit 8bfbfa0

File tree

10 files changed

+828
-798
lines changed

10 files changed

+828
-798
lines changed

.prettierrc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
module.exports = {
2-
singleQuote: true,
3-
trailingComma: 'es5',
4-
arrowParens: 'always',
5-
};
1+
module.exports = { singleQuote: true };

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -793,9 +793,7 @@ module.exports = {
793793
let result;
794794

795795
try {
796-
result = posthtml()
797-
.use(plugin)
798-
.process(content, { sync: true });
796+
result = posthtml().use(plugin).process(content, { sync: true });
799797
} catch (error) {
800798
loaderContext.emitError(error);
801799

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
collectCoverageFrom: ['src/**/*.js'],
3+
setupFilesAfterEnv: ['<rootDir>/setupTest.js'],
4+
};

lint-staged.config.js

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

package-lock.json

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

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"lint": "npm-run-all -l -p \"lint:**\"",
3030
"test:only": "cross-env NODE_ENV=test jest",
3131
"test:watch": "npm run test:only -- --watch",
32-
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
32+
"test:coverage": "npm run test:only -- --coverage",
3333
"pretest": "npm run lint",
3434
"test": "npm run test:coverage",
3535
"prepare": "npm run build",
@@ -43,40 +43,40 @@
4343
"webpack": "^4.0.0 || ^5.0.0"
4444
},
4545
"dependencies": {
46-
"html-minifier-terser": "^5.0.4",
46+
"html-minifier-terser": "^5.0.5",
4747
"htmlparser2": "^4.1.0",
4848
"loader-utils": "^2.0.0",
4949
"parse-srcset": "^1.0.2",
5050
"schema-utils": "^2.6.5"
5151
},
5252
"devDependencies": {
5353
"@babel/cli": "^7.8.4",
54-
"@babel/core": "^7.8.7",
55-
"@babel/preset-env": "^7.8.7",
54+
"@babel/core": "^7.9.0",
55+
"@babel/preset-env": "^7.9.0",
5656
"@commitlint/cli": "^8.3.5",
5757
"@commitlint/config-conventional": "^8.3.4",
5858
"@webpack-contrib/defaults": "^6.3.0",
5959
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
60-
"babel-jest": "^25.1.0",
60+
"babel-jest": "^25.2.6",
6161
"commitlint-azure-pipelines-cli": "^1.0.3",
6262
"cross-env": "^7.0.2",
6363
"del": "^5.1.0",
6464
"del-cli": "^3.0.0",
6565
"es-check": "^5.1.0",
6666
"eslint": "^6.8.0",
67-
"eslint-config-prettier": "^6.10.0",
68-
"eslint-plugin-import": "^2.20.1",
67+
"eslint-config-prettier": "^6.10.1",
68+
"eslint-plugin-import": "^2.20.2",
6969
"file-loader": "^6.0.0",
70-
"handlebars": "^4.7.3",
70+
"handlebars": "^4.7.4",
7171
"husky": "^4.2.3",
72-
"jest": "^25.1.0",
72+
"jest": "^25.2.6",
7373
"jest-junit": "^10.0.0",
74-
"lint-staged": "^10.0.8",
74+
"lint-staged": "^10.1.1",
7575
"memfs": "^3.1.2",
7676
"npm-run-all": "^4.1.5",
7777
"posthtml": "^0.12.0",
7878
"posthtml-webp": "^1.5.0",
79-
"prettier": "^1.19.1",
79+
"prettier": "^2.0.2",
8080
"standard-version": "^7.1.0",
8181
"webpack": "^4.42.0"
8282
},

setupTest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jest.setTimeout(10000);

src/plugins/source-plugin.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,8 @@ const defaultAttributes = [
424424

425425
if (
426426
attributes.type &&
427-
getAttributeValue(attributes, 'type')
428-
.trim()
429-
.toLowerCase() !== 'text/css'
427+
getAttributeValue(attributes, 'type').trim().toLowerCase() !==
428+
'text/css'
430429
) {
431430
return false;
432431
}

test/helpers/normalizeErrors.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ function removeCWD(str) {
1616

1717
export default (errors) => {
1818
return errors.map((error) =>
19-
removeCWD(
20-
error
21-
.toString()
22-
.split('\n')
23-
.slice(0, 2)
24-
.join('\n')
25-
)
19+
removeCWD(error.toString().split('\n').slice(0, 2).join('\n'))
2620
);
2721
};

test/preprocessor-option.test.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ describe("'process' option", () => {
9191
let result;
9292

9393
try {
94-
result = posthtml()
95-
.use(plugin)
96-
.process(content, { sync: true });
94+
result = posthtml().use(plugin).process(content, { sync: true });
9795
} catch (error) {
9896
loaderContext.emitError(error);
9997

0 commit comments

Comments
 (0)