Skip to content

Commit 8abb3e4

Browse files
committed
fix(@angular-devkit/build-angular): update CSSNano and PostCSS to fix serveral security issues
Closes #20606
1 parent 6b05a69 commit 8abb3e4

File tree

4 files changed

+408
-108
lines changed

4 files changed

+408
-108
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
"core-js": "3.8.3",
146146
"critters": "0.0.7",
147147
"css-loader": "5.0.1",
148-
"cssnano": "4.1.11",
148+
"cssnano": "5.0.1",
149149
"debug": "^4.1.1",
150150
"enhanced-resolve": "5.7.0",
151151
"express": "4.17.1",
@@ -192,7 +192,7 @@
192192
"pidusage": "^2.0.17",
193193
"pnp-webpack-plugin": "1.6.4",
194194
"popper.js": "^1.14.1",
195-
"postcss": "8.2.4",
195+
"postcss": "8.2.13",
196196
"postcss-import": "14.0.0",
197197
"postcss-loader": "4.2.0",
198198
"prettier": "^2.0.0",

packages/angular_devkit/build_angular/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"core-js": "3.8.3",
3333
"critters": "0.0.7",
3434
"css-loader": "5.0.1",
35-
"cssnano": "4.1.11",
35+
"cssnano": "5.0.1",
3636
"file-loader": "6.2.0",
3737
"find-cache-dir": "3.3.1",
3838
"glob": "7.1.6",
@@ -50,7 +50,7 @@
5050
"ora": "5.3.0",
5151
"parse5-html-rewriting-stream": "6.0.1",
5252
"pnp-webpack-plugin": "1.6.4",
53-
"postcss": "8.2.4",
53+
"postcss": "8.2.13",
5454
"postcss-import": "14.0.0",
5555
"postcss-loader": "4.2.0",
5656
"raw-loader": "4.0.2",

packages/angular_devkit/build_angular/src/webpack/plugins/optimize-css-webpack-plugin.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ export class OptimizeCssWebpackPlugin {
111111
};
112112

113113
const output = await new Promise<Result>((resolve, reject) => {
114-
// the last parameter is not in the typings
114+
// @types/cssnano are not up to date with version 5.
115115
// tslint:disable-next-line: no-any
116-
(cssNano.process as any)(content, postCssOptions, cssNanoOptions)
116+
(cssNano as any)(cssNanoOptions).process(content, postCssOptions)
117117
.then(resolve)
118-
.catch((err: Error) => reject(new Error(`${file} ${err.message}`)));
118+
.catch((err: Error) => reject(err));
119119
});
120120

121121
for (const { text } of output.warnings()) {

0 commit comments

Comments
 (0)