From 01ec50506fda5fdce6911e5ec8e8fd7c90fdad59 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Thu, 22 Jun 2023 14:33:26 +0000 Subject: [PATCH] build: update critters to 0.19.0 Update critters to the latest version. Closes #25388 (cherry picked from commit f3f618f2065cef390b2cae49d4aa80338bca8d6b) --- package.json | 2 +- packages/angular_devkit/build_angular/package.json | 2 +- .../src/builders/app-shell/app-shell_spec.ts | 2 +- .../tests/options/inline-critical_spec.ts | 8 ++++---- .../browser/tests/options/inline-critical_spec.ts | 10 +++++----- .../utils/index-file/inline-critical-css_spec.ts | 12 ++++++------ yarn.lock | 13 +++++++++++++ 7 files changed, 31 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 4539cf643696..f82f5e1ca717 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "cacache": "17.1.3", "chokidar": "3.5.3", "copy-webpack-plugin": "11.0.0", - "critters": "0.0.18", + "critters": "0.0.19", "css-loader": "6.8.1", "debug": "^4.1.1", "esbuild": "0.17.19", diff --git a/packages/angular_devkit/build_angular/package.json b/packages/angular_devkit/build_angular/package.json index 2e376c876f33..372e11393002 100644 --- a/packages/angular_devkit/build_angular/package.json +++ b/packages/angular_devkit/build_angular/package.json @@ -31,7 +31,7 @@ "cacache": "17.1.3", "chokidar": "3.5.3", "copy-webpack-plugin": "11.0.0", - "critters": "0.0.18", + "critters": "0.0.19", "css-loader": "6.8.1", "esbuild-wasm": "0.17.19", "fast-glob": "3.2.12", diff --git a/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts b/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts index 2cce801eb027..3206f2de9cb1 100644 --- a/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts +++ b/packages/angular_devkit/build_angular/src/builders/app-shell/app-shell_spec.ts @@ -160,7 +160,7 @@ describe('AppShell Builder', () => { expect(content).toContain('app-shell works!'); expect(content).toContain('p{color:#000}'); expect(content).toMatch( - //, + //, ); }); diff --git a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/tests/options/inline-critical_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/tests/options/inline-critical_spec.ts index fc678346516d..930366ed9526 100644 --- a/packages/angular_devkit/build_angular/src/builders/browser-esbuild/tests/options/inline-critical_spec.ts +++ b/packages/angular_devkit/build_angular/src/builders/browser-esbuild/tests/options/inline-critical_spec.ts @@ -35,7 +35,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); @@ -53,7 +53,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); @@ -71,7 +71,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); @@ -130,7 +130,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); diff --git a/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts b/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts index bc27d33264b7..a8c86d84c9a8 100644 --- a/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts +++ b/packages/angular_devkit/build_angular/src/builders/browser/tests/options/inline-critical_spec.ts @@ -35,7 +35,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); @@ -53,7 +53,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); @@ -71,7 +71,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); @@ -129,7 +129,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); @@ -155,7 +155,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => { harness .expectFile('dist/index.html') .content.toContain( - ``, + ``, ); harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`); }); diff --git a/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css_spec.ts b/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css_spec.ts index 20296ac94c69..d0df2b3a2de6 100644 --- a/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css_spec.ts +++ b/packages/angular_devkit/build_angular/src/utils/index-file/inline-critical-css_spec.ts @@ -51,10 +51,10 @@ describe('InlineCriticalCssProcessor', () => { }); expect(content).toContain( - ``, + ``, ); expect(content).toContain( - ``, + ``, ); expect(content).not.toContain('color: blue'); expect(tags.stripIndents`${content}`).toContain(tags.stripIndents` @@ -75,10 +75,10 @@ describe('InlineCriticalCssProcessor', () => { }); expect(content).toContain( - ``, + ``, ); expect(content).toContain( - ``, + ``, ); expect(tags.stripIndents`${content}`).toContain(tags.stripIndents` '); }); diff --git a/yarn.lock b/yarn.lock index 08889eedc8d3..bc03b547fcf7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5856,6 +5856,19 @@ critters@0.0.18: postcss "^8.4.23" pretty-bytes "^5.3.0" +critters@0.0.19: + version "0.0.19" + resolved "https://registry.yarnpkg.com/critters/-/critters-0.0.19.tgz#15e3a3a0ed77ae4b69c3b2fe29c8e7e87fc77d1b" + integrity sha512-Fm4ZAXsG0VzWy1U30rP4qxbaWGSsqXDgSupJW1OUJGDAs0KWC+j37v7p5a2kZ9BPJvhRzWm3be+Hc9WvQOBUOw== + dependencies: + chalk "^4.1.0" + css-select "^5.1.0" + dom-serializer "^2.0.0" + domhandler "^5.0.2" + htmlparser2 "^8.0.2" + postcss "^8.4.23" + pretty-bytes "^5.3.0" + cross-fetch@3.1.5: version "3.1.5" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f"