Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): update CSSNano and PostCSS to fix…
Browse files Browse the repository at this point in the history
… serveral security issues

Closes #20606
  • Loading branch information
alan-agius4 committed Apr 27, 2021
1 parent 6b05a69 commit 8abb3e4
Show file tree
Hide file tree
Showing 4 changed files with 408 additions and 108 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"core-js": "3.8.3",
"critters": "0.0.7",
"css-loader": "5.0.1",
"cssnano": "4.1.11",
"cssnano": "5.0.1",
"debug": "^4.1.1",
"enhanced-resolve": "5.7.0",
"express": "4.17.1",
Expand Down Expand Up @@ -192,7 +192,7 @@
"pidusage": "^2.0.17",
"pnp-webpack-plugin": "1.6.4",
"popper.js": "^1.14.1",
"postcss": "8.2.4",
"postcss": "8.2.13",
"postcss-import": "14.0.0",
"postcss-loader": "4.2.0",
"prettier": "^2.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"core-js": "3.8.3",
"critters": "0.0.7",
"css-loader": "5.0.1",
"cssnano": "4.1.11",
"cssnano": "5.0.1",
"file-loader": "6.2.0",
"find-cache-dir": "3.3.1",
"glob": "7.1.6",
Expand All @@ -50,7 +50,7 @@
"ora": "5.3.0",
"parse5-html-rewriting-stream": "6.0.1",
"pnp-webpack-plugin": "1.6.4",
"postcss": "8.2.4",
"postcss": "8.2.13",
"postcss-import": "14.0.0",
"postcss-loader": "4.2.0",
"raw-loader": "4.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ export class OptimizeCssWebpackPlugin {
};

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

for (const { text } of output.warnings()) {
Expand Down
Loading

0 comments on commit 8abb3e4

Please sign in to comment.