Skip to content

Commit b20f287

Browse files
committed
fixup! build: update beasties to 0.5.1
1 parent cd5600d commit b20f287

6 files changed

Lines changed: 9 additions & 12 deletions

File tree

packages/angular/build/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ ts_project(
159159
jasmine_test(
160160
name = "test",
161161
data = [":unit_test_lib"],
162+
shard_count = 4,
162163
)
163164

164165
ts_project(

packages/angular/build/src/utils/index-file/index-html-generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function augmentIndexHtmlPlugin(generator: IndexHtmlGenerator): IndexHtmlGenerat
185185
outputPath,
186186
} = generator.options;
187187

188-
return async (html, options) => {
188+
return (html, options) => {
189189
const { lang, baseHref, files, hints } = options;
190190

191191
return augmentIndexHtml({

packages/angular/build/src/utils/index-file/inline-critical-css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export async function inlineCriticalCss(
5252
const cspNonce =
5353
nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce');
5454

55-
return cspNonce;
55+
return cspNonce ?? undefined;
5656
},
5757
noscriptFallback: true,
5858
inlineFonts: true,

packages/angular/ssr/src/utils/inline-critical-css.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ export class InlineCriticalCssProcessor extends Beasties {
2929
reduceInlineStyles: false,
3030
mergeStylesheets: false,
3131
preload: 'media-script',
32-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
33-
nonce: ((document: any) => {
32+
nonce: (document) => {
3433
const nonceElement = document.querySelector('[ngCspNonce], [ngcspnonce]');
3534
const cspNonce =
3635
nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce');
3736

38-
return cspNonce;
39-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
40-
}) as any,
37+
return cspNonce ?? undefined;
38+
},
4139
noscriptFallback: true,
4240
inlineFonts: true,
4341
});

packages/angular_devkit/build_angular/src/utils/inline-critical-css.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export class InlineCriticalCssProcessor {
4545
const cspNonce =
4646
nonceElement?.getAttribute('ngCspNonce') || nonceElement?.getAttribute('ngcspnonce');
4747

48-
return cspNonce;
48+
return cspNonce ?? undefined;
4949
},
5050
noscriptFallback: true,
5151
inlineFonts: true,
@@ -67,12 +67,12 @@ export class InlineCriticalCssProcessor {
6767
linkEl.removeAttribute('data-beasties-media');
6868
linkEl.setAttribute('media', beastiesMedia);
6969
if (linkEl.next?.name === 'noscript') {
70-
linkEl.next.remove();
70+
linkEl.next.remove?.();
7171
}
7272
// eslint-disable-next-line @typescript-eslint/no-explicit-any
7373
(document as any).querySelectorAll('script').forEach((script: any) => {
7474
if (script.textContent?.includes('data-beasties-media')) {
75-
script.remove();
75+
script.remove?.();
7676
}
7777
});
7878
}

pnpm-workspace.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ minimumReleaseAgeExclude:
2424
- '@ngtools/webpack'
2525
- '@schematics/*'
2626
- 'ng-packagr'
27-
# TODO(alanagius): remove before merging this.
28-
- 'beasties'
2927
overrides:
3028
'@angular/build': workspace:*
3129
packageExtensions:

0 commit comments

Comments
 (0)