Skip to content

Commit

Permalink
build: update critters to 0.19.0
Browse files Browse the repository at this point in the history
Update critters to the latest version.

Closes #25388

(cherry picked from commit f3f618f)
  • Loading branch information
alan-agius4 authored and clydin committed Jun 22, 2023
1 parent e3c85e0 commit 01ec505
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ describe('AppShell Builder', () => {
expect(content).toContain('app-shell works!');
expect(content).toContain('p{color:#000}');
expect(content).toMatch(
/<link rel="stylesheet" href="styles\.[a-z0-9]+\.css" media="print" onload="this.media=&apos;all&apos;">/,
/<link rel="stylesheet" href="styles\.[a-z0-9]+\.css" media="print" onload="this.media='all'">/,
);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand All @@ -53,7 +53,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand All @@ -71,7 +71,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand Down Expand Up @@ -130,7 +130,7 @@ describeBuilder(buildEsbuildBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand All @@ -53,7 +53,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand All @@ -71,7 +71,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand Down Expand Up @@ -129,7 +129,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="http://cdn.com/styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="http://cdn.com/styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand All @@ -155,7 +155,7 @@ describeBuilder(buildWebpackBrowser, BROWSER_BUILDER_INFO, (harness) => {
harness
.expectFile('dist/index.html')
.content.toContain(
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media=&apos;all&apos;">`,
`<link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'">`,
);
harness.expectFile('dist/index.html').content.toContain(`body{color:#000}`);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ describe('InlineCriticalCssProcessor', () => {
});

expect(content).toContain(
`<link href="styles.css" rel="stylesheet" media="print" onload="this.media=&apos;all&apos;">`,
`<link href="styles.css" rel="stylesheet" media="print" onload="this.media='all'">`,
);
expect(content).toContain(
`<link href="theme.css" rel="stylesheet" media="print" onload="this.media=&apos;all&apos;">`,
`<link href="theme.css" rel="stylesheet" media="print" onload="this.media='all'">`,
);
expect(content).not.toContain('color: blue');
expect(tags.stripIndents`${content}`).toContain(tags.stripIndents`
Expand All @@ -75,10 +75,10 @@ describe('InlineCriticalCssProcessor', () => {
});

expect(content).toContain(
`<link href="http://cdn.com/styles.css" rel="stylesheet" media="print" onload="this.media=&apos;all&apos;">`,
`<link href="http://cdn.com/styles.css" rel="stylesheet" media="print" onload="this.media='all'">`,
);
expect(content).toContain(
`<link href="http://cdn.com/theme.css" rel="stylesheet" media="print" onload="this.media=&apos;all&apos;">`,
`<link href="http://cdn.com/theme.css" rel="stylesheet" media="print" onload="this.media='all'">`,
);
expect(tags.stripIndents`${content}`).toContain(tags.stripIndents`
<style>
Expand All @@ -98,10 +98,10 @@ describe('InlineCriticalCssProcessor', () => {
});

expect(content).toContain(
`<link href="styles.css" rel="stylesheet" media="print" onload="this.media=&apos;all&apos;">`,
`<link href="styles.css" rel="stylesheet" media="print" onload="this.media='all'">`,
);
expect(content).toContain(
`<link href="theme.css" rel="stylesheet" media="print" onload="this.media=&apos;all&apos;">`,
`<link href="theme.css" rel="stylesheet" media="print" onload="this.media='all'">`,
);
expect(content).toContain('<style>body{margin:0}html{color:white}</style>');
});
Expand Down
13 changes: 13 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 01ec505

Please sign in to comment.