Skip to content

chore: update deps #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,952 changes: 2,428 additions & 2,524 deletions package-lock.json

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,42 +51,42 @@
"cssnano": "^5.0.0",
"jest-worker": "^27.0.2",
"p-limit": "^3.0.2",
"postcss": "^8.2.9",
"postcss": "^8.3.4",
"schema-utils": "^3.0.0",
"serialize-javascript": "^5.0.1",
"source-map": "^0.6.1"
},
"devDependencies": {
"@babel/cli": "^7.13.16",
"@babel/core": "^7.14.0",
"@babel/preset-env": "^7.14.1",
"@commitlint/cli": "^12.1.3",
"@commitlint/config-conventional": "^12.1.3",
"@babel/core": "^7.14.6",
"@babel/preset-env": "^7.14.5",
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^27.0.2",
"clean-css": "^5.1.2",
"copy-webpack-plugin": "^8.1.1",
"cross-env": "^7.0.3",
"css-loader": "^5.2.4",
"css-loader": "^5.2.6",
"cssnano-preset-simple": "^2.0.0",
"csso": "^4.2.0",
"del": "^6.0.0",
"del-cli": "^3.0.1",
"eslint": "^7.26.0",
"eslint": "^7.28.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import": "^2.23.4",
"husky": "^6.0.0",
"jest": "^27.0.3",
"jest": "^27.0.4",
"lint-staged": "^11.0.0",
"memfs": "^3.2.2",
"mini-css-extract-plugin": "^1.6.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.0",
"sass": "^1.32.12",
"sass-loader": "^11.1.0",
"prettier": "^2.3.1",
"sass": "^1.35.1",
"sass-loader": "^11.1.1",
"standard-version": "^9.3.0",
"sugarss": "^3.0.3",
"webpack": "^5.37.0"
"webpack": "^5.39.0"
},
"keywords": [
"cssnano",
Expand Down
30 changes: 15 additions & 15 deletions test/__snapshots__/CssMinimizerPlugin.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ exports[`CssMinimizerPlugin should throw error from postcss: warning 1`] = `Arra

exports[`CssMinimizerPlugin should work and do not use memory cache when the "cache" option is "false": assets 1`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
`;

exports[`CssMinimizerPlugin should work and do not use memory cache when the "cache" option is "false": assets 2`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
Expand All @@ -104,7 +104,7 @@ exports[`CssMinimizerPlugin should work and do not use memory cache when the "ca

exports[`CssMinimizerPlugin should work and generate real content hash: assets 1`] = `
Object {
"entry.19e4764f9c1d9fe130e2.d801df74e2eeda59439d.74aeb19a113575472da2.css": "body{color:red}a{color:#00f}",
"entry.ee68cb428fa1feaa2c48.d801df74e2eeda59439d.74aeb19a113575472da2.css": "body{color:red}a{color:blue}",
}
`;

Expand All @@ -114,7 +114,7 @@ exports[`CssMinimizerPlugin should work and generate real content hash: warnings

exports[`CssMinimizerPlugin should work and show minimized assets in stats: assets 1`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
}
`;

Expand All @@ -124,15 +124,15 @@ exports[`CssMinimizerPlugin should work and show minimized assets in stats: warn

exports[`CssMinimizerPlugin should work and use memory cache out of box: assets 1`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
`;

exports[`CssMinimizerPlugin should work and use memory cache out of box: assets 2`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
Expand All @@ -148,15 +148,15 @@ exports[`CssMinimizerPlugin should work and use memory cache out of box: warning

exports[`CssMinimizerPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: assets 1`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
`;

exports[`CssMinimizerPlugin should work and use memory cache when the "cache" option is "true" and the asset has been changed: assets 2`] = `
Object {
"foo.css": "a,body{color:red}a{color:#00f}",
"foo.css": "a,body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
Expand All @@ -172,15 +172,15 @@ exports[`CssMinimizerPlugin should work and use memory cache when the "cache" op

exports[`CssMinimizerPlugin should work and use memory cache when the "cache" option is "true": assets 1`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
`;

exports[`CssMinimizerPlugin should work and use memory cache when the "cache" option is "true": assets 2`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}",
"foo.css": "body{color:red}a{color:blue}",
"style-2.css": "a{color:coral}",
"style.css": "a{color:red}",
}
Expand All @@ -197,7 +197,7 @@ exports[`CssMinimizerPlugin should work and use memory cache when the "cache" op
exports[`CssMinimizerPlugin should work with assets using querystring: entry.css.map?v=test 1`] = `"{\\"version\\":3,\\"sources\\":[\\"webpack:///./foo.css\\"],\\"names\\":[],\\"mappings\\":\\"AAAA,KACE,SACF,CACA,EACE,UACF\\",\\"file\\":\\"entry.css?v=test\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\"],\\"sourceRoot\\":\\"\\"}"`;

exports[`CssMinimizerPlugin should work with assets using querystring: entry.css?v=test 1`] = `
"body{color:red}a{color:#00f}
"body{color:red}a{color:blue}
/*# sourceMappingURL=entry.css.map?v=test*/"
`;

Expand All @@ -213,7 +213,7 @@ exports[`CssMinimizerPlugin should work with child compilation: warnings 1`] = `

exports[`CssMinimizerPlugin should work with source map and use memory cache when the "cache" option is "true" and the asset has been changed: assets 1`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}
"foo.css": "body{color:red}a{color:blue}
/*# sourceMappingURL=foo.css.map*/",
"foo.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./foo.css\\"],\\"names\\":[],\\"mappings\\":\\"AAAA,KACE,SACF,CACA,EACE,UACF\\",\\"file\\":\\"foo.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\"],\\"sourceRoot\\":\\"\\"}",
"style-2.css": "a{color:coral}",
Expand All @@ -223,7 +223,7 @@ Object {

exports[`CssMinimizerPlugin should work with source map and use memory cache when the "cache" option is "true" and the asset has been changed: assets 2`] = `
Object {
"foo.css": "a,body{color:red}a{color:#00f}
"foo.css": "a,body{color:red}a{color:blue}
/*# sourceMappingURL=foo.css.map*/",
"foo.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./foo.css\\"],\\"names\\":[],\\"mappings\\":\\"AAAA,OACE,SACF,CACA,EACE,UACF\\",\\"file\\":\\"foo.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\"],\\"sourceRoot\\":\\"\\"}",
"style-2.css": "a{color:coral}",
Expand All @@ -241,7 +241,7 @@ exports[`CssMinimizerPlugin should work with source map and use memory cache whe

exports[`CssMinimizerPlugin should work with source map and use memory cache when the "cache" option is "true": assets 1`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}
"foo.css": "body{color:red}a{color:blue}
/*# sourceMappingURL=foo.css.map*/",
"foo.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./foo.css\\"],\\"names\\":[],\\"mappings\\":\\"AAAA,KACE,SACF,CACA,EACE,UACF\\",\\"file\\":\\"foo.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\"],\\"sourceRoot\\":\\"\\"}",
"style-2.css": "a{color:coral}",
Expand All @@ -251,7 +251,7 @@ Object {

exports[`CssMinimizerPlugin should work with source map and use memory cache when the "cache" option is "true": assets 2`] = `
Object {
"foo.css": "body{color:red}a{color:#00f}
"foo.css": "body{color:red}a{color:blue}
/*# sourceMappingURL=foo.css.map*/",
"foo.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./foo.css\\"],\\"names\\":[],\\"mappings\\":\\"AAAA,KACE,SACF,CACA,EACE,UACF\\",\\"file\\":\\"foo.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\"],\\"sourceRoot\\":\\"\\"}",
"style-2.css": "a{color:coral}",
Expand Down
32 changes: 16 additions & 16 deletions test/__snapshots__/cache-option.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

exports[`"cache" option should work with the "false" value for the "cache" option: assets 1`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}",
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}",
"three.css": "body{color:red;font-size:20px}a{color:blue}",
"two.css": "a{text-align:center}",
}
`;

exports[`"cache" option should work with the "false" value for the "cache" option: assets 2`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}",
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}",
"three.css": "body{color:red;font-size:20px}a{color:blue}",
"two.css": "a{text-align:center}",
}
`;
Expand Down Expand Up @@ -152,7 +152,7 @@ Array [

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: assets 1`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}
"five.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=five.css.map*/",
"five.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"names\\":[],\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"file\\":\\"five.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"sourceRoot\\":\\"\\"}",
"four.css": "h1{color:green}h2{color:#ff0}
Expand All @@ -161,7 +161,7 @@ Object {
"one.css": "a{text-align:center}
/*# sourceMappingURL=one.css.map*/",
"one.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./test/foo.css\\"],\\"names\\":[],\\"mappings\\":\\"AAAA,EACE,iBACF\\",\\"file\\":\\"one.css\\",\\"sourcesContent\\":[\\"a {\\\\n text-align: center;\\\\n}\\\\n\\"],\\"sourceRoot\\":\\"\\"}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}
"three.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=three.css.map*/",
"three.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"names\\":[],\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"file\\":\\"three.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"sourceRoot\\":\\"\\"}",
"two.css": "a{text-align:center}
Expand All @@ -172,7 +172,7 @@ Object {

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: assets 2`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}
"five.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=five.css.map*/",
"five.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"names\\":[],\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"file\\":\\"five.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"sourceRoot\\":\\"\\"}",
"four.css": "h1{color:green}h2{color:#ff0}
Expand All @@ -181,7 +181,7 @@ Object {
"one.css": "a{text-align:center}
/*# sourceMappingURL=one.css.map*/",
"one.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./test/foo.css\\"],\\"names\\":[],\\"mappings\\":\\"AAAA,EACE,iBACF\\",\\"file\\":\\"one.css\\",\\"sourcesContent\\":[\\"a {\\\\n text-align: center;\\\\n}\\\\n\\"],\\"sourceRoot\\":\\"\\"}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}
"three.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=three.css.map*/",
"three.css.map": "{\\"version\\":3,\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"names\\":[],\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"file\\":\\"three.css\\",\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"sourceRoot\\":\\"\\"}",
"two.css": "a{text-align:center}
Expand All @@ -200,20 +200,20 @@ exports[`"cache" option should work with the "filesystem" value for the "cache.t

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: assets 1`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}",
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}",
"three.css": "body{color:red;font-size:20px}a{color:blue}",
"two.css": "a{text-align:center}",
}
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: assets 2`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}",
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}",
"three.css": "body{color:red;font-size:20px}a{color:blue}",
"two.css": "a{text-align:center}",
}
`;
Expand All @@ -228,20 +228,20 @@ exports[`"cache" option should work with the "filesystem" value for the "cache.t

exports[`"cache" option should work with the "memory" value for the "cache.type" option: assets 1`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}",
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}",
"three.css": "body{color:red;font-size:20px}a{color:blue}",
"two.css": "a{text-align:center}",
}
`;

exports[`"cache" option should work with the "memory" value for the "cache.type" option: assets 2`] = `
Object {
"five.css": "body{color:red;font-size:20px}a{color:#00f}",
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
"three.css": "body{color:red;font-size:20px}a{color:#00f}",
"three.css": "body{color:red;font-size:20px}a{color:blue}",
"two.css": "a{text-align:center}",
}
`;
Expand Down
12 changes: 6 additions & 6 deletions test/__snapshots__/exclude-option.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

exports[`exclude option should match snapshot for a single RegExp value excluded1: assets 1`] = `
Object {
"entry.css": "body{color:red}a{color:#00f}",
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
}

",
"excluded2.css": "body{color:red;font-size:20px}a{color:#00f}",
"excluded2.css": "body{color:red;font-size:20px}a{color:blue}",
}
`;

Expand All @@ -18,13 +18,13 @@ exports[`exclude option should match snapshot for a single RegExp value excluded

exports[`exclude option should match snapshot for a single String value excluded1: assets 1`] = `
Object {
"entry.css": "body{color:red}a{color:#00f}",
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
}

",
"excluded2.css": "body{color:red;font-size:20px}a{color:#00f}",
"excluded2.css": "body{color:red;font-size:20px}a{color:blue}",
}
`;

Expand All @@ -34,7 +34,7 @@ exports[`exclude option should match snapshot for a single String value excluded

exports[`exclude option should match snapshot for multiple RegExp values excluded1 and excluded2: assets 1`] = `
Object {
"entry.css": "body{color:red}a{color:#00f}",
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
}
Expand All @@ -61,7 +61,7 @@ exports[`exclude option should match snapshot for multiple RegExp values exclude

exports[`exclude option should match snapshot for multiple String values excluded1 and excluded2: assets 1`] = `
Object {
"entry.css": "body{color:red}a{color:#00f}",
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
}
Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/include-option.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ a {
}
",
"included1.css": "a{text-align:center}",
"included2.css": "body{color:red;font-size:20px}a{color:#00f}",
"included2.css": "body{color:red;font-size:20px}a{color:blue}",
}
`;

Expand All @@ -86,7 +86,7 @@ a {
}
",
"included1.css": "a{text-align:center}",
"included2.css": "body{color:red;font-size:20px}a{color:#00f}",
"included2.css": "body{color:red;font-size:20px}a{color:blue}",
}
`;

Expand Down
4 changes: 2 additions & 2 deletions test/__snapshots__/minimizerOptions-option.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ exports[`when applied with "minimizerOptions" option matches snapshot for "prese

exports[`when applied with "minimizerOptions" option matches snapshot for "preset" option with require.resolve "String" value: preset-simple 1`] = `"p{border-width:1px;border-radius:var(--test);border:0 solid var(--test)}"`;

exports[`when applied with "minimizerOptions" option matches snapshot for "stringifier" option with "Function" value: entry.css 1`] = `"body color:reda color:#00f"`;
exports[`when applied with "minimizerOptions" option matches snapshot for "stringifier" option with "Function" value: entry.css 1`] = `"body color:reda color:blue"`;

exports[`when applied with "minimizerOptions" option matches snapshot for "stringifier" option with "String" value: entry.css 1`] = `"body color:reda color:#00f"`;
exports[`when applied with "minimizerOptions" option matches snapshot for "stringifier" option with "String" value: entry.css 1`] = `"body color:reda color:blue"`;

exports[`when applied with "minimizerOptions" option matches snapshot for "syntax" option with "Function" value: index.sss 1`] = `"a color:#000"`;

Expand Down
Loading