@angular/build 20.3.9 → 20.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "20.3.9",
3
+ "version": "20.3.11",
4
4
  "description": "Official build system for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -23,7 +23,7 @@
23
23
  "builders": "builders.json",
24
24
  "dependencies": {
25
25
  "@ampproject/remapping": "2.3.0",
26
- "@angular-devkit/architect": "0.2003.9",
26
+ "@angular-devkit/architect": "0.2003.11",
27
27
  "@babel/core": "7.28.3",
28
28
  "@babel/helper-annotate-as-pure": "7.27.3",
29
29
  "@babel/helper-split-export-declaration": "7.24.7",
@@ -60,7 +60,7 @@
60
60
  "@angular/platform-browser": "^20.0.0",
61
61
  "@angular/platform-server": "^20.0.0",
62
62
  "@angular/service-worker": "^20.0.0",
63
- "@angular/ssr": "^20.3.9",
63
+ "@angular/ssr": "^20.3.11",
64
64
  "karma": "^6.4.0",
65
65
  "less": "^4.2.0",
66
66
  "ng-packagr": "^20.0.0",
@@ -423,9 +423,10 @@ async function invalidateUpdatedFiles(normalizePath, generatedFiles, assetFiles,
423
423
  updatedModules?.forEach((m) => server.moduleGraph.invalidateModule(m));
424
424
  }
425
425
  if (serverApplicationChanged) {
426
- // Clear the server app cache and
427
- // trigger module evaluation before reload to initiate dependency optimization.
428
- const { ɵdestroyAngularServerApp } = (await server.ssrLoadModule('/main.server.mjs'));
426
+ // Clear the server app cache and trigger module evaluation before reload to initiate dependency optimization.
427
+ // The querystring is needed as a workaround for:
428
+ // `ɵgetOrCreateAngularServerApp` can be undefined right after an error.
429
+ const { ɵdestroyAngularServerApp } = (await server.ssrLoadModule(`/main.server.mjs?timestamp=${Date.now()}`));
429
430
  ɵdestroyAngularServerApp();
430
431
  }
431
432
  return updatedFiles;
@@ -459,7 +459,7 @@ function getEsBuildCommonOptions(options) {
459
459
  };
460
460
  }
461
461
  function getEsBuildCommonPolyfillsOptions(options, namespace, tryToResolvePolyfillsAsRelative, loadResultCache) {
462
- const { jit, workspaceRoot, i18nOptions } = options;
462
+ const { jit, workspaceRoot, i18nOptions, externalPackages } = options;
463
463
  const buildOptions = getEsBuildCommonOptions(options);
464
464
  buildOptions.splitting = false;
465
465
  buildOptions.plugins ??= [];
@@ -472,8 +472,10 @@ function getEsBuildCommonPolyfillsOptions(options, namespace, tryToResolvePolyfi
472
472
  // Locale data should go first so that project provided polyfill code can augment if needed.
473
473
  let needLocaleDataPlugin = false;
474
474
  if (i18nOptions.shouldInline) {
475
- // Remove localize polyfill as this is not needed for build time i18n.
476
- polyfills = polyfills.filter((path) => !path.startsWith('@angular/localize'));
475
+ if (!externalPackages) {
476
+ // Remove localize polyfill when i18n inline transformation have been applied to all the packages.
477
+ polyfills = polyfills.filter((path) => !path.startsWith('@angular/localize'));
478
+ }
477
479
  // Add locale data for all active locales
478
480
  // TODO: Inject each individually within the inlining process itself
479
481
  for (const locale of i18nOptions.inlineLocales) {
@@ -23,11 +23,6 @@ function createAngularSsrInternalMiddleware(server, indexHtmlTransformer) {
23
23
  await (0, load_esm_1.loadEsmModule)('@angular/compiler');
24
24
  const { writeResponseToNodeResponse, createWebRequestFromNodeRequest } = await (0, load_esm_1.loadEsmModule)('@angular/ssr/node');
25
25
  const { ɵgetOrCreateAngularServerApp } = (await server.ssrLoadModule('/main.server.mjs'));
26
- // `ɵgetOrCreateAngularServerApp` can be undefined right after an error.
27
- // See: https://github.com/angular/angular-cli/issues/29907
28
- if (!ɵgetOrCreateAngularServerApp) {
29
- return next();
30
- }
31
26
  const angularServerApp = ɵgetOrCreateAngularServerApp({
32
27
  allowStaticRouteRender: true,
33
28
  });
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.normalizeCacheOptions = normalizeCacheOptions;
11
11
  const node_path_1 = require("node:path");
12
12
  /** Version placeholder is replaced during the build process with actual package version */
13
- const VERSION = '20.3.9';
13
+ const VERSION = '20.3.11';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&