@angular/build 19.0.6 → 19.0.7

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2010-2024 Google LLC. https://angular.dev/license
3
+ Copyright (c) 2010-2025 Google LLC. https://angular.dev/license
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ export * from './src/index';
package/index.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("./src/index"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/build",
3
- "version": "19.0.6",
3
+ "version": "19.0.7",
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.6",
26
+ "@angular-devkit/architect": "0.1900.7",
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.6",
60
+ "@angular/ssr": "^19.0.7",
61
61
  "less": "^4.2.0",
62
62
  "postcss": "^8.4.0",
63
63
  "tailwindcss": "^2.0.0 || ^3.0.0",
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ export * from '../src/private';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
21
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ __exportStar(require("../src/private"), exports);
@@ -36,5 +36,5 @@ export interface ApplicationBuilderOutput extends BuilderOutput {
36
36
  * @returns The build output results of the build.
37
37
  */
38
38
  export declare function buildApplication(options: ApplicationBuilderOptions, context: BuilderContext, extensions?: ApplicationBuilderExtensions): AsyncIterable<ApplicationBuilderOutput>;
39
- declare const _default: import("../../../../../angular_devkit/architect/src/internal").Builder<ApplicationBuilderOptions & import("../../../../../angular_devkit/core/src").JsonObject>;
39
+ declare const _default: import("../../../../../angular_devkit/architect/src/internal").Builder<ApplicationBuilderOptions & import("../../../../../angular_devkit/core").JsonObject>;
40
40
  export default _default;
@@ -9,6 +9,6 @@ import { execute } from './builder';
9
9
  import type { DevServerBuilderOutput } from './output';
10
10
  import type { Schema as DevServerBuilderOptions } from './schema';
11
11
  export { type DevServerBuilderOptions, type DevServerBuilderOutput, execute as executeDevServerBuilder, };
12
- declare const _default: import("../../../../../angular_devkit/architect/src/internal").Builder<DevServerBuilderOptions & import("../../../../../angular_devkit/core/src").JsonObject>;
12
+ declare const _default: import("../../../../../angular_devkit/architect/src/internal").Builder<DevServerBuilderOptions & import("../../../../../angular_devkit/core").JsonObject>;
13
13
  export default _default;
14
14
  export { execute as executeDevServer };
@@ -34,5 +34,5 @@ export declare function serveWithVite(serverOptions: NormalizedDevServerOptions,
34
34
  middleware?: Connect.NextHandleFunction[];
35
35
  buildPlugins?: Plugin[];
36
36
  }): AsyncIterableIterator<DevServerBuilderOutput>;
37
- export declare function setupServer(serverOptions: NormalizedDevServerOptions, outputFiles: Map<string, OutputFileRecord>, assets: Map<string, string>, preserveSymlinks: boolean | undefined, externalMetadata: DevServerExternalResultMetadata, ssrMode: ServerSsrMode, prebundleTransformer: JavaScriptTransformer, target: string[], zoneless: boolean, componentStyles: Map<string, ComponentStyleRecord>, templateUpdates: Map<string, string>, prebundleLoaderExtensions: EsbuildLoaderOption | undefined, extensionMiddleware?: Connect.NextHandleFunction[], indexHtmlTransformer?: (content: string) => Promise<string>, thirdPartySourcemaps?: boolean): Promise<InlineConfig>;
37
+ export declare function setupServer(serverOptions: NormalizedDevServerOptions, outputFiles: Map<string, OutputFileRecord>, assets: Map<string, string>, preserveSymlinks: boolean | undefined, externalMetadata: DevServerExternalResultMetadata, ssrMode: ServerSsrMode, prebundleTransformer: JavaScriptTransformer, target: string[], zoneless: boolean, componentStyles: Map<string, ComponentStyleRecord>, templateUpdates: Map<string, string>, prebundleLoaderExtensions: EsbuildLoaderOption | undefined, define: ApplicationBuilderInternalOptions['define'], extensionMiddleware?: Connect.NextHandleFunction[], indexHtmlTransformer?: (content: string) => Promise<string>, thirdPartySourcemaps?: boolean): Promise<InlineConfig>;
38
38
  export {};
@@ -280,7 +280,7 @@ async function* serveWithVite(serverOptions, builderName, builderAction, context
280
280
  });
281
281
  }
282
282
  // Setup server and start listening
283
- const serverConfiguration = await setupServer(serverOptions, generatedFiles, assetFiles, browserOptions.preserveSymlinks, externalMetadata, ssrMode, prebundleTransformer, target, (0, internal_1.isZonelessApp)(polyfills), componentStyles, templateUpdates, browserOptions.loader, extensions?.middleware, transformers?.indexHtml, thirdPartySourcemaps);
283
+ const serverConfiguration = await setupServer(serverOptions, generatedFiles, assetFiles, browserOptions.preserveSymlinks, externalMetadata, ssrMode, prebundleTransformer, target, (0, internal_1.isZonelessApp)(polyfills), componentStyles, templateUpdates, browserOptions.loader, browserOptions.define, extensions?.middleware, transformers?.indexHtml, thirdPartySourcemaps);
284
284
  server = await createServer(serverConfiguration);
285
285
  await server.listen();
286
286
  const urls = server.resolvedUrls;
@@ -459,7 +459,7 @@ function analyzeResultFiles(normalizePath, htmlIndexPath, resultFiles, generated
459
459
  }
460
460
  }
461
461
  }
462
- async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks, externalMetadata, ssrMode, prebundleTransformer, target, zoneless, componentStyles, templateUpdates, prebundleLoaderExtensions, extensionMiddleware, indexHtmlTransformer, thirdPartySourcemaps = false) {
462
+ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks, externalMetadata, ssrMode, prebundleTransformer, target, zoneless, componentStyles, templateUpdates, prebundleLoaderExtensions, define, extensionMiddleware, indexHtmlTransformer, thirdPartySourcemaps = false) {
463
463
  const proxy = await (0, utils_2.loadProxyConfiguration)(serverOptions.workspaceRoot, serverOptions.proxyConfig);
464
464
  // dynamically import Vite for ESM compatibility
465
465
  const { normalizePath } = await (0, load_esm_1.loadEsmModule)('vite');
@@ -551,6 +551,7 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
551
551
  target,
552
552
  loader: prebundleLoaderExtensions,
553
553
  thirdPartySourcemaps,
554
+ define,
554
555
  }),
555
556
  },
556
557
  plugins: [
@@ -588,6 +589,7 @@ async function setupServer(serverOptions, outputFiles, assets, preserveSymlinks,
588
589
  zoneless,
589
590
  loader: prebundleLoaderExtensions,
590
591
  thirdPartySourcemaps,
592
+ define,
591
593
  }),
592
594
  };
593
595
  if (serverOptions.ssl) {
@@ -8,5 +8,5 @@
8
8
  import { execute } from './builder';
9
9
  import type { Schema as ExtractI18nBuilderOptions } from './schema';
10
10
  export { ExtractI18nBuilderOptions, execute };
11
- declare const _default: import("../../../../../angular_devkit/architect/src/internal").Builder<ExtractI18nBuilderOptions & import("../../../../../angular_devkit/core/src").JsonObject>;
11
+ declare const _default: import("../../../../../angular_devkit/architect/src/internal").Builder<ExtractI18nBuilderOptions & import("../../../../../angular_devkit/core").JsonObject>;
12
12
  export default _default;
@@ -54,6 +54,16 @@ function isTslibHelperName(name) {
54
54
  }
55
55
  return tslibHelpers.has(originalName);
56
56
  }
57
+ const babelHelpers = new Set(['_defineProperty']);
58
+ /**
59
+ * Determinates whether an identifier name matches one of the Babel helper function names.
60
+ *
61
+ * @param name The identifier name to check.
62
+ * @returns True, if the name matches a Babel helper name; otherwise, false.
63
+ */
64
+ function isBabelHelperName(name) {
65
+ return babelHelpers.has(name);
66
+ }
57
67
  /**
58
68
  * A babel plugin factory function for adding the PURE annotation to top-level new and call expressions.
59
69
  *
@@ -72,9 +82,10 @@ function default_1() {
72
82
  path.node.arguments.length !== 0) {
73
83
  return;
74
84
  }
75
- // Do not annotate TypeScript helpers emitted by the TypeScript compiler.
76
- // TypeScript helpers are intended to cause side effects.
77
- if (callee.isIdentifier() && isTslibHelperName(callee.node.name)) {
85
+ // Do not annotate TypeScript helpers emitted by the TypeScript compiler or Babel helpers.
86
+ // They are intended to cause side effects.
87
+ if (callee.isIdentifier() &&
88
+ (isTslibHelperName(callee.node.name) || isBabelHelperName(callee.node.name))) {
78
89
  return;
79
90
  }
80
91
  (0, helper_annotate_as_pure_1.default)(path);
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.dev/license
7
+ */
8
+ import type { Plugin } from 'esbuild';
9
+ /**
10
+ * This plugin addresses an issue where '@angular/localize/init' is directly imported,
11
+ * potentially resulting in undefined behavior. By detecting such imports, the plugin
12
+ * issues a warning and suggests including '@angular/localize/init' as a polyfill.
13
+ *
14
+ * @returns An esbuild plugin.
15
+ */
16
+ export declare function createAngularLocalizeInitWarningPlugin(): Plugin;
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ /**
3
+ * @license
4
+ * Copyright Google LLC All Rights Reserved.
5
+ *
6
+ * Use of this source code is governed by an MIT-style license that can be
7
+ * found in the LICENSE file at https://angular.dev/license
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.createAngularLocalizeInitWarningPlugin = createAngularLocalizeInitWarningPlugin;
11
+ const NG_LOCALIZE_RESOLUTION = Symbol('NG_LOCALIZE_RESOLUTION');
12
+ /**
13
+ * This plugin addresses an issue where '@angular/localize/init' is directly imported,
14
+ * potentially resulting in undefined behavior. By detecting such imports, the plugin
15
+ * issues a warning and suggests including '@angular/localize/init' as a polyfill.
16
+ *
17
+ * @returns An esbuild plugin.
18
+ */
19
+ function createAngularLocalizeInitWarningPlugin() {
20
+ return {
21
+ name: 'angular-localize-init-warning',
22
+ setup(build) {
23
+ build.onResolve({ filter: /^@angular\/localize\/init/ }, async (args) => {
24
+ if (args.pluginData?.[NG_LOCALIZE_RESOLUTION]) {
25
+ return null;
26
+ }
27
+ const { importer, kind, resolveDir, namespace, pluginData = {} } = args;
28
+ pluginData[NG_LOCALIZE_RESOLUTION] = true;
29
+ const result = await build.resolve(args.path, {
30
+ importer,
31
+ kind,
32
+ namespace,
33
+ pluginData,
34
+ resolveDir,
35
+ });
36
+ return {
37
+ ...result,
38
+ warnings: [
39
+ ...result.warnings,
40
+ {
41
+ text: `Direct import of '@angular/localize/init' detected. This may lead to undefined behavior.`,
42
+ notes: [{ text: `Include '@angular/localize/init' as a polyfill instead.` }],
43
+ },
44
+ ],
45
+ };
46
+ });
47
+ },
48
+ };
49
+ }
@@ -22,6 +22,7 @@ const schema_1 = require("../../builders/application/schema");
22
22
  const environment_options_1 = require("../../utils/environment-options");
23
23
  const manifest_1 = require("../../utils/server-rendering/manifest");
24
24
  const compiler_plugin_1 = require("./angular/compiler-plugin");
25
+ const angular_localize_init_warning_plugin_1 = require("./angular-localize-init-warning-plugin");
25
26
  const compiler_plugin_options_1 = require("./compiler-plugin-options");
26
27
  const external_packages_plugin_1 = require("./external-packages-plugin");
27
28
  const i18n_locale_plugin_1 = require("./i18n-locale-plugin");
@@ -53,6 +54,7 @@ function createBrowserCodeBundleOptions(options, target, sourceFileCache, styles
53
54
  (0, loader_import_attribute_plugin_1.createLoaderImportAttributePlugin)(),
54
55
  (0, wasm_plugin_1.createWasmPlugin)({ allowAsync: zoneless, cache: loadCache }),
55
56
  (0, sourcemap_ignorelist_plugin_1.createSourcemapIgnorelistPlugin)(),
57
+ (0, angular_localize_init_warning_plugin_1.createAngularLocalizeInitWarningPlugin)(),
56
58
  (0, compiler_plugin_1.createCompilerPlugin)(
57
59
  // JS/TS options
58
60
  pluginOptions,
@@ -196,6 +198,7 @@ function createServerMainCodeBundleOptions(options, target, sourceFileCache, sty
196
198
  plugins: [
197
199
  (0, wasm_plugin_1.createWasmPlugin)({ allowAsync: zoneless, cache: loadResultCache }),
198
200
  (0, sourcemap_ignorelist_plugin_1.createSourcemapIgnorelistPlugin)(),
201
+ (0, angular_localize_init_warning_plugin_1.createAngularLocalizeInitWarningPlugin)(),
199
202
  (0, compiler_plugin_1.createCompilerPlugin)(
200
203
  // JS/TS options
201
204
  { ...pluginOptions, noopTypeScriptCompilation: true },
@@ -297,6 +300,7 @@ function createSsrEntryCodeBundleOptions(options, target, sourceFileCache, style
297
300
  supported: (0, utils_1.getFeatureSupport)(target, true),
298
301
  plugins: [
299
302
  (0, sourcemap_ignorelist_plugin_1.createSourcemapIgnorelistPlugin)(),
303
+ (0, angular_localize_init_warning_plugin_1.createAngularLocalizeInitWarningPlugin)(),
300
304
  (0, compiler_plugin_1.createCompilerPlugin)(
301
305
  // JS/TS options
302
306
  { ...pluginOptions, noopTypeScriptCompilation: true },
@@ -81,7 +81,7 @@ export declare class ExecutionResult {
81
81
  errors: (PartialMessage | Message)[];
82
82
  externalMetadata: ExternalResultMetadata | undefined;
83
83
  };
84
- get watchFiles(): string[];
84
+ get watchFiles(): Readonly<string[]>;
85
85
  createRebuildState(fileChanges: ChangedFiles): RebuildState;
86
86
  findChangedFiles(previousOutputHashes: Map<string, string>): Set<string>;
87
87
  dispose(): Promise<void>;
@@ -103,16 +103,18 @@ class ExecutionResult {
103
103
  };
104
104
  }
105
105
  get watchFiles() {
106
- // Bundler contexts internally normalize file dependencies
107
- const files = this.rebuildContexts.typescriptContexts
108
- .flatMap((context) => [...context.watchFiles])
109
- .concat(this.rebuildContexts.otherContexts.flatMap((context) => [...context.watchFiles]));
110
- if (this.codeBundleCache?.referencedFiles) {
106
+ const { typescriptContexts, otherContexts } = this.rebuildContexts;
107
+ return [
108
+ // Bundler contexts internally normalize file dependencies.
109
+ ...typescriptContexts.flatMap((context) => [...context.watchFiles]),
110
+ ...otherContexts.flatMap((context) => [...context.watchFiles]),
111
111
  // These files originate from TS/NG and can have POSIX path separators even on Windows.
112
112
  // To ensure path comparisons are valid, all these paths must be normalized.
113
- files.push(...this.codeBundleCache.referencedFiles.map(node_path_1.normalize));
114
- }
115
- return files.concat(this.extraWatchFiles);
113
+ ...(this.codeBundleCache?.referencedFiles?.map(node_path_1.normalize) ?? []),
114
+ // The assets source files.
115
+ ...this.assetFiles.map(({ source }) => source),
116
+ ...this.extraWatchFiles,
117
+ ];
116
118
  }
117
119
  createRebuildState(fileChanges) {
118
120
  return {
@@ -39,12 +39,16 @@ class JavaScriptTransformer {
39
39
  this.#fileCacheKeyBase = Buffer.from(JSON.stringify(this.#commonOptions), 'utf-8');
40
40
  }
41
41
  #ensureWorkerPool() {
42
- this.#workerPool ??= new worker_pool_1.WorkerPool({
42
+ const workerPoolOptions = {
43
43
  filename: require.resolve('./javascript-transformer-worker'),
44
44
  maxThreads: this.maxThreads,
45
- // Prevent passing `--import` (loader-hooks) from parent to child worker.
46
- execArgv: process.execArgv.filter((v) => v !== utils_1.IMPORT_EXEC_ARGV),
47
- });
45
+ };
46
+ // Prevent passing SSR `--import` (loader-hooks) from parent to child worker.
47
+ const filteredExecArgv = process.execArgv.filter((v) => v !== utils_1.IMPORT_EXEC_ARGV);
48
+ if (process.execArgv.length !== filteredExecArgv.length) {
49
+ workerPoolOptions.execArgv = filteredExecArgv;
50
+ }
51
+ this.#workerPool ??= new worker_pool_1.WorkerPool(workerPoolOptions);
48
52
  return this.#workerPool;
49
53
  }
50
54
  /**
@@ -16,6 +16,7 @@ const promises_1 = require("node:fs/promises");
16
16
  const node_path_1 = require("node:path");
17
17
  const load_esm_1 = require("../../../utils/load-esm");
18
18
  const ANGULAR_PREFIX = '/@ng/';
19
+ const VITE_FS_PREFIX = '/@fs/';
19
20
  async function createAngularMemoryPlugin(options) {
20
21
  const { virtualProjectRoot, outputFiles, external } = options;
21
22
  const { normalizePath } = await (0, load_esm_1.loadEsmModule)('vite');
@@ -24,6 +25,9 @@ async function createAngularMemoryPlugin(options) {
24
25
  // Ensures plugin hooks run before built-in Vite hooks
25
26
  enforce: 'pre',
26
27
  async resolveId(source, importer, { ssr }) {
28
+ if (source.startsWith(VITE_FS_PREFIX)) {
29
+ return;
30
+ }
27
31
  // For SSR with component HMR, pass through as a virtual module
28
32
  if (ssr && source.startsWith(ANGULAR_PREFIX)) {
29
33
  return '\0' + source;
@@ -15,7 +15,7 @@ export type AngularMemoryOutputFiles = Map<string, {
15
15
  export declare function pathnameWithoutBasePath(url: string, basePath: string): string;
16
16
  export declare function lookupMimeTypeFromRequest(url: string): string | undefined;
17
17
  export type EsbuildLoaderOption = Exclude<DepOptimizationConfig['esbuildOptions'], undefined>['loader'];
18
- export declare function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless, prebundleTransformer, ssr, loader, thirdPartySourcemaps, }: {
18
+ export declare function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless, prebundleTransformer, ssr, loader, thirdPartySourcemaps, define, }: {
19
19
  disabled: boolean;
20
20
  exclude: string[];
21
21
  include: string[];
@@ -25,4 +25,5 @@ export declare function getDepOptimizationConfig({ disabled, exclude, include, t
25
25
  zoneless: boolean;
26
26
  loader?: EsbuildLoaderOption;
27
27
  thirdPartySourcemaps: boolean;
28
+ define: Record<string, string> | undefined;
28
29
  }): DepOptimizationConfig;
@@ -28,7 +28,7 @@ function lookupMimeTypeFromRequest(url) {
28
28
  }
29
29
  return extension && (0, mrmime_1.lookup)(extension);
30
30
  }
31
- function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless, prebundleTransformer, ssr, loader, thirdPartySourcemaps, }) {
31
+ function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless, prebundleTransformer, ssr, loader, thirdPartySourcemaps, define = {}, }) {
32
32
  const plugins = [
33
33
  {
34
34
  name: `angular-vite-optimize-deps${ssr ? '-ssr' : ''}${thirdPartySourcemaps ? '-vendor-sourcemap' : ''}`,
@@ -57,6 +57,7 @@ function getDepOptimizationConfig({ disabled, exclude, include, target, zoneless
57
57
  plugins,
58
58
  loader,
59
59
  define: {
60
+ ...define,
60
61
  'ngServerMode': `${ssr}`,
61
62
  },
62
63
  resolveExtensions: ['.mjs', '.js', '.cjs'],
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { Budget as BudgetEntry, Type as BudgetType } from '../builders/application/schema';
9
9
  export { type BudgetEntry, BudgetType };
10
+ export declare const BYTES_IN_KILOBYTE = 1000;
10
11
  export interface Threshold {
11
12
  limit: number;
12
13
  type: ThresholdType;
@@ -7,13 +7,14 @@
7
7
  * found in the LICENSE file at https://angular.dev/license
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.ThresholdSeverity = exports.BudgetType = void 0;
10
+ exports.ThresholdSeverity = exports.BYTES_IN_KILOBYTE = exports.BudgetType = void 0;
11
11
  exports.calculateThresholds = calculateThresholds;
12
12
  exports.checkBudgets = checkBudgets;
13
13
  exports.checkThresholds = checkThresholds;
14
14
  const schema_1 = require("../builders/application/schema");
15
15
  Object.defineProperty(exports, "BudgetType", { enumerable: true, get: function () { return schema_1.Type; } });
16
16
  const format_bytes_1 = require("./format-bytes");
17
+ exports.BYTES_IN_KILOBYTE = 1000;
17
18
  var ThresholdType;
18
19
  (function (ThresholdType) {
19
20
  ThresholdType["Max"] = "maximum";
@@ -242,13 +243,13 @@ function calculateBytes(input, baseline, factor = 1) {
242
243
  value = (baselineBytes * value) / 100;
243
244
  break;
244
245
  case 'kb':
245
- value *= 1024;
246
+ value *= exports.BYTES_IN_KILOBYTE;
246
247
  break;
247
248
  case 'mb':
248
- value *= 1024 * 1024;
249
+ value *= exports.BYTES_IN_KILOBYTE * exports.BYTES_IN_KILOBYTE;
249
250
  break;
250
251
  case 'gb':
251
- value *= 1024 * 1024 * 1024;
252
+ value *= exports.BYTES_IN_KILOBYTE * exports.BYTES_IN_KILOBYTE * exports.BYTES_IN_KILOBYTE;
252
253
  break;
253
254
  }
254
255
  if (baselineBytes === 0) {
@@ -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.6';
13
+ const VERSION = '19.0.7';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -25,10 +25,10 @@ function patchFetchToLoadInMemoryAssets(baseURL) {
25
25
  url = input;
26
26
  }
27
27
  else if (typeof input === 'string') {
28
- url = new URL(input);
28
+ url = new URL(input, baseURL);
29
29
  }
30
30
  else if (typeof input === 'object' && 'url' in input) {
31
- url = new URL(input.url);
31
+ url = new URL(input.url, baseURL);
32
32
  }
33
33
  else {
34
34
  return originalFetch(input, init);
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "types": ["node"]
5
- }
6
- }