@angular/build 19.0.5 → 19.0.6

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": "19.0.5",
3
+ "version": "19.0.6",
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.1900.5",
26
+ "@angular-devkit/architect": "0.1900.6",
27
27
  "@babel/core": "7.26.0",
28
28
  "@babel/helper-annotate-as-pure": "7.25.9",
29
29
  "@babel/helper-split-export-declaration": "7.24.7",
@@ -57,7 +57,7 @@
57
57
  "@angular/localize": "^19.0.0",
58
58
  "@angular/platform-server": "^19.0.0",
59
59
  "@angular/service-worker": "^19.0.0",
60
- "@angular/ssr": "^19.0.5",
60
+ "@angular/ssr": "^19.0.6",
61
61
  "less": "^4.2.0",
62
62
  "postcss": "^8.4.0",
63
63
  "tailwindcss": "^2.0.0 || ^3.0.0",
@@ -86,7 +86,6 @@
86
86
  "optional": true
87
87
  }
88
88
  },
89
- "packageManager": "yarn@4.5.0",
90
89
  "repository": {
91
90
  "type": "git",
92
91
  "url": "https://github.com/angular/angular-cli.git"
@@ -109,5 +108,8 @@
109
108
  "puppeteer": {
110
109
  "built": true
111
110
  }
111
+ },
112
+ "pnpm": {
113
+ "onlyBuiltDependencies": []
112
114
  }
113
115
  }
@@ -6,6 +6,29 @@
6
6
  * Use of this source code is governed by an MIT-style license that can be
7
7
  * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
9
32
  Object.defineProperty(exports, "__esModule", { value: true });
10
33
  exports.executeBuild = executeBuild;
11
34
  const source_file_cache_1 = require("../../tools/esbuild/angular/source-file-cache");
@@ -21,7 +44,6 @@ const environment_options_1 = require("../../utils/environment-options");
21
44
  const resolve_assets_1 = require("../../utils/resolve-assets");
22
45
  const manifest_1 = require("../../utils/server-rendering/manifest");
23
46
  const supported_browsers_1 = require("../../utils/supported-browsers");
24
- const chunk_optimizer_1 = require("./chunk-optimizer");
25
47
  const execute_post_bundle_1 = require("./execute-post-bundle");
26
48
  const i18n_1 = require("./i18n");
27
49
  const setup_bundling_1 = require("./setup-bundling");
@@ -85,7 +107,8 @@ async function executeBuild(options, context, rebuildState) {
85
107
  bundlingResult = bundler_context_1.BundlerContext.mergeResults([bundlingResult, ...componentResults]);
86
108
  }
87
109
  if (options.optimizationOptions.scripts && environment_options_1.shouldOptimizeChunks) {
88
- bundlingResult = await (0, profiling_1.profileAsync)('OPTIMIZE_CHUNKS', () => (0, chunk_optimizer_1.optimizeChunks)(bundlingResult, options.sourcemapOptions.scripts ? !options.sourcemapOptions.hidden || 'hidden' : false));
110
+ const { optimizeChunks } = await Promise.resolve().then(() => __importStar(require('./chunk-optimizer')));
111
+ bundlingResult = await (0, profiling_1.profileAsync)('OPTIMIZE_CHUNKS', () => optimizeChunks(bundlingResult, options.sourcemapOptions.scripts ? !options.sourcemapOptions.hidden || 'hidden' : false));
89
112
  }
90
113
  const executionResult = new bundler_execution_result_1.ExecutionResult(bundlerContexts, componentStyleBundler, codeBundleCache, templateUpdates);
91
114
  executionResult.addWarnings(bundlingResult.warnings);
@@ -504,7 +504,14 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
504
504
  headers: serverOptions.headers,
505
505
  // Disable the websocket if live reload is disabled (false/undefined are the only valid values)
506
506
  ws: serverOptions.liveReload === false && serverOptions.hmr === false ? false : undefined,
507
- proxy,
507
+ // When server-side rendering (SSR) is enabled togather with SSL and Express is being used,
508
+ // we must configure Vite to use HTTP/1.1.
509
+ // This is necessary because Express does not support HTTP/2.
510
+ // We achieve this by defining an empty proxy.
511
+ // See: https://github.com/vitejs/vite/blob/c4b532cc900bf988073583511f57bd581755d5e3/packages/vite/src/node/http.ts#L106
512
+ proxy: serverOptions.ssl && ssrMode === plugins_1.ServerSsrMode.ExternalSsrMiddleware
513
+ ? (proxy ?? {})
514
+ : proxy,
508
515
  cors: {
509
516
  // Allow preflight requests to be proxied.
510
517
  preflightContinue: true,
@@ -40,6 +40,17 @@ async function createAngularMemoryPlugin(options) {
40
40
  const [importerFile] = importer.split('?', 1);
41
41
  source = '/' + (0, node_path_1.join)((0, node_path_1.dirname)((0, node_path_1.relative)(virtualProjectRoot, importerFile)), source);
42
42
  }
43
+ else if (!ssr &&
44
+ source[0] === '/' &&
45
+ importer.endsWith('index.html') &&
46
+ normalizePath(importer).startsWith(virtualProjectRoot)) {
47
+ // This is only needed when using SSR and `angularSsrMiddleware` (old style) to correctly resolve
48
+ // .js files when using lazy-loading.
49
+ // Remove query if present
50
+ const [importerFile] = importer.split('?', 1);
51
+ source =
52
+ '/' + (0, node_path_1.join)((0, node_path_1.dirname)((0, node_path_1.relative)(virtualProjectRoot, importerFile)), (0, node_path_1.basename)(source));
53
+ }
43
54
  }
44
55
  const [file] = source.split('?', 1);
45
56
  if (outputFiles.has(file)) {
@@ -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 = '19.0.5';
13
+ const VERSION = '19.0.6';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "types": ["node"]
5
+ }
6
+ }