@angular-devkit/build-angular 19.2.0-next.0 → 19.2.0-next.2

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,27 +1,27 @@
1
1
  {
2
2
  "name": "@angular-devkit/build-angular",
3
- "version": "19.2.0-next.0",
3
+ "version": "19.2.0-next.2",
4
4
  "description": "Angular Webpack Build Facade",
5
5
  "main": "src/index.js",
6
6
  "typings": "src/index.d.ts",
7
7
  "builders": "builders.json",
8
8
  "dependencies": {
9
9
  "@ampproject/remapping": "2.3.0",
10
- "@angular-devkit/architect": "0.1902.0-next.0",
11
- "@angular-devkit/build-webpack": "0.1902.0-next.0",
12
- "@angular-devkit/core": "19.2.0-next.0",
13
- "@angular/build": "19.2.0-next.0",
14
- "@babel/core": "7.26.0",
15
- "@babel/generator": "7.26.5",
10
+ "@angular-devkit/architect": "0.1902.0-next.2",
11
+ "@angular-devkit/build-webpack": "0.1902.0-next.2",
12
+ "@angular-devkit/core": "19.2.0-next.2",
13
+ "@angular/build": "19.2.0-next.2",
14
+ "@babel/core": "7.26.8",
15
+ "@babel/generator": "7.26.8",
16
16
  "@babel/helper-annotate-as-pure": "7.25.9",
17
17
  "@babel/helper-split-export-declaration": "7.24.7",
18
- "@babel/plugin-transform-async-generator-functions": "7.25.9",
18
+ "@babel/plugin-transform-async-generator-functions": "7.26.8",
19
19
  "@babel/plugin-transform-async-to-generator": "7.25.9",
20
- "@babel/plugin-transform-runtime": "7.25.9",
21
- "@babel/preset-env": "7.26.0",
22
- "@babel/runtime": "7.26.0",
20
+ "@babel/plugin-transform-runtime": "7.26.8",
21
+ "@babel/preset-env": "7.26.8",
22
+ "@babel/runtime": "7.26.7",
23
23
  "@discoveryjs/json-ext": "0.6.3",
24
- "@ngtools/webpack": "19.2.0-next.0",
24
+ "@ngtools/webpack": "19.2.0-next.2",
25
25
  "@vitejs/plugin-basic-ssl": "1.2.0",
26
26
  "ansi-colors": "4.1.3",
27
27
  "autoprefixer": "10.4.20",
@@ -29,7 +29,7 @@
29
29
  "browserslist": "^4.21.5",
30
30
  "copy-webpack-plugin": "12.0.2",
31
31
  "css-loader": "7.1.2",
32
- "esbuild-wasm": "0.24.2",
32
+ "esbuild-wasm": "0.25.0",
33
33
  "fast-glob": "3.3.3",
34
34
  "http-proxy-middleware": "3.0.3",
35
35
  "istanbul-lib-instrument": "6.0.3",
@@ -44,16 +44,16 @@
44
44
  "ora": "5.4.1",
45
45
  "picomatch": "4.0.2",
46
46
  "piscina": "4.8.0",
47
- "postcss": "8.5.1",
47
+ "postcss": "8.5.2",
48
48
  "postcss-loader": "8.1.1",
49
49
  "resolve-url-loader": "5.0.0",
50
50
  "rxjs": "7.8.1",
51
- "sass": "1.83.4",
51
+ "sass": "1.84.0",
52
52
  "sass-loader": "16.0.4",
53
- "semver": "7.6.3",
53
+ "semver": "7.7.1",
54
54
  "source-map-loader": "5.0.0",
55
55
  "source-map-support": "0.5.21",
56
- "terser": "5.37.0",
56
+ "terser": "5.38.2",
57
57
  "tree-kill": "1.2.2",
58
58
  "tslib": "2.8.1",
59
59
  "webpack": "5.97.1",
@@ -63,14 +63,14 @@
63
63
  "webpack-subresource-integrity": "5.1.0"
64
64
  },
65
65
  "optionalDependencies": {
66
- "esbuild": "0.24.2"
66
+ "esbuild": "0.25.0"
67
67
  },
68
68
  "peerDependencies": {
69
69
  "@angular/compiler-cli": "^19.0.0 || ^19.2.0-next.0",
70
70
  "@angular/localize": "^19.0.0 || ^19.2.0-next.0",
71
71
  "@angular/platform-server": "^19.0.0 || ^19.2.0-next.0",
72
72
  "@angular/service-worker": "^19.0.0 || ^19.2.0-next.0",
73
- "@angular/ssr": "^19.2.0-next.0",
73
+ "@angular/ssr": "^19.2.0-next.2",
74
74
  "@web/test-runner": "^0.19.0",
75
75
  "browser-sync": "^3.0.2",
76
76
  "jest": "^29.5.0",
@@ -78,7 +78,7 @@
78
78
  "karma": "^6.3.0",
79
79
  "ng-packagr": "^19.0.0 || ^19.2.0-next.0",
80
80
  "protractor": "^7.0.0",
81
- "tailwindcss": "^2.0.0 || ^3.0.0",
81
+ "tailwindcss": "^2.0.0 || ^3.0.0 || ^4.0.0",
82
82
  "typescript": ">=5.5 <5.8"
83
83
  },
84
84
  "peerDependenciesMeta": {
@@ -38,5 +38,5 @@ export declare function buildWebpackBrowser(options: BrowserBuilderSchema, conte
38
38
  logging?: WebpackLoggingCallback;
39
39
  indexHtml?: IndexHtmlTransform;
40
40
  }): Observable<BrowserBuilderOutput>;
41
- declare const _default: import("@angular-devkit/architect").Builder<BrowserBuilderSchema & import("../../../../core").JsonObject>;
41
+ declare const _default: import("@angular-devkit/architect").Builder<BrowserBuilderSchema & import("@angular-devkit/core").JsonObject>;
42
42
  export default _default;
@@ -24,5 +24,5 @@ export declare function buildEsbuildBrowser(userOptions: BrowserBuilderOptions,
24
24
  export declare function convertBrowserOptions(options: BrowserBuilderOptions): Omit<ApplicationBuilderOptions, 'outputPath'> & {
25
25
  outputPath: OutputPathClass;
26
26
  };
27
- declare const _default: import("@angular-devkit/architect").Builder<BrowserBuilderOptions & import("../../../../core").JsonObject>;
27
+ declare const _default: import("@angular-devkit/architect").Builder<BrowserBuilderOptions & import("@angular-devkit/core").JsonObject>;
28
28
  export default _default;
@@ -73,9 +73,6 @@ function execute(options, context, transforms = {}, extensions) {
73
73
  if (transforms?.logging || transforms?.webpackConfiguration) {
74
74
  throw new Error(`The "application" and "browser-esbuild" builders do not support Webpack transforms.`);
75
75
  }
76
- if (options.allowedHosts?.length) {
77
- context.logger.warn(`The "allowedHosts" option will not be used because it is not supported by the "${builderName}" builder.`);
78
- }
79
76
  if (options.publicHost) {
80
77
  context.logger.warn(`The "publicHost" option will not be used because it is not supported by the "${builderName}" builder.`);
81
78
  }
@@ -84,6 +81,13 @@ function execute(options, context, transforms = {}, extensions) {
84
81
  }
85
82
  // New build system defaults hmr option to the value of liveReload
86
83
  normalizedOptions.hmr ??= normalizedOptions.liveReload;
84
+ // New build system uses Vite's allowedHost option convention of true for disabling host checks
85
+ if (normalizedOptions.disableHostCheck) {
86
+ normalizedOptions.allowedHosts = true;
87
+ }
88
+ else {
89
+ normalizedOptions.allowedHosts ??= [];
90
+ }
87
91
  return (0, rxjs_1.defer)(() => Promise.all([Promise.resolve().then(() => __importStar(require('@angular/build/private'))), Promise.resolve().then(() => __importStar(require('../browser-esbuild')))])).pipe((0, rxjs_1.switchMap)(([{ serveWithVite, buildApplicationInternal }, { convertBrowserOptions }]) => serveWithVite(normalizedOptions, builderName, (options, context, codePlugins) => {
88
92
  return builderName === '@angular-devkit/build-angular:browser-esbuild'
89
93
  ? // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -9,6 +9,6 @@ import { DevServerBuilderOutput } from '@angular/build';
9
9
  import { execute } from './builder';
10
10
  import { Schema as DevServerBuilderOptions } from './schema';
11
11
  export { type DevServerBuilderOptions, type DevServerBuilderOutput, execute as executeDevServerBuilder, };
12
- declare const _default: import("@angular-devkit/architect").Builder<DevServerBuilderOptions & import("../../../../core").JsonObject>;
12
+ declare const _default: import("@angular-devkit/architect").Builder<DevServerBuilderOptions & import("@angular-devkit/core").JsonObject>;
13
13
  export default _default;
14
14
  export { execute as executeDevServer };
@@ -3,8 +3,7 @@
3
3
  */
4
4
  export type Schema = {
5
5
  /**
6
- * List of hosts that are allowed to access the dev server. This option has no effect when
7
- * using the 'application' or other esbuild-based builders.
6
+ * List of hosts that are allowed to access the dev server.
8
7
  */
9
8
  allowedHosts?: string[];
10
9
  /**
@@ -14,8 +13,7 @@ export type Schema = {
14
13
  */
15
14
  buildTarget: string;
16
15
  /**
17
- * Don't verify connected clients are part of allowed hosts. This option has no effect when
18
- * using the 'application' or other esbuild-based builders.
16
+ * Don't verify connected clients are part of allowed hosts.
19
17
  */
20
18
  disableHostCheck?: boolean;
21
19
  /**
@@ -67,7 +67,7 @@
67
67
  },
68
68
  "allowedHosts": {
69
69
  "type": "array",
70
- "description": "List of hosts that are allowed to access the dev server. This option has no effect when using the 'application' or other esbuild-based builders.",
70
+ "description": "List of hosts that are allowed to access the dev server.",
71
71
  "default": [],
72
72
  "items": {
73
73
  "type": "string"
@@ -79,7 +79,7 @@
79
79
  },
80
80
  "disableHostCheck": {
81
81
  "type": "boolean",
82
- "description": "Don't verify connected clients are part of allowed hosts. This option has no effect when using the 'application' or other esbuild-based builders.",
82
+ "description": "Don't verify connected clients are part of allowed hosts.",
83
83
  "default": false
84
84
  },
85
85
  "hmr": {
@@ -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").Builder<ExtractI18nBuilderOptions & import("../../../../core").JsonObject>;
11
+ declare const _default: import("@angular-devkit/architect").Builder<ExtractI18nBuilderOptions & import("@angular-devkit/core").JsonObject>;
12
12
  export default _default;
@@ -7,5 +7,5 @@
7
7
  */
8
8
  import { Schema as JestBuilderSchema } from './schema';
9
9
  /** Main execution function for the Jest builder. */
10
- declare const _default: import("@angular-devkit/architect").Builder<JestBuilderSchema & import("../../../../core").JsonObject>;
10
+ declare const _default: import("@angular-devkit/architect").Builder<JestBuilderSchema & import("@angular-devkit/core").JsonObject>;
11
11
  export default _default;
@@ -101,7 +101,7 @@ exports.default = (0, architect_1.createBuilder)(async (schema, context) => {
101
101
  tsConfig: options.tsConfig,
102
102
  polyfills: options.polyfills ?? ['zone.js', 'zone.js/testing'],
103
103
  outputPath: testOut,
104
- aot: false,
104
+ aot: options.aot,
105
105
  index: false,
106
106
  outputHashing: schema_1.OutputHashing.None,
107
107
  outExtension: 'mjs', // Force native ESM.
@@ -2,6 +2,10 @@
2
2
  * Jest target options
3
3
  */
4
4
  export type Schema = {
5
+ /**
6
+ * Run tests using Ahead of Time compilation.
7
+ */
8
+ aot?: boolean;
5
9
  /**
6
10
  * Globs of files to exclude, relative to the project root.
7
11
  */
@@ -32,6 +32,11 @@
32
32
  "uniqueItems": true
33
33
  },
34
34
  "default": []
35
+ },
36
+ "aot": {
37
+ "type": "boolean",
38
+ "description": "Run tests using Ahead of Time compilation.",
39
+ "default": false
35
40
  }
36
41
  },
37
42
  "additionalProperties": false,
@@ -301,7 +301,7 @@ async function initializeApplication(options, context, karmaOptions, transforms
301
301
  entryPoints,
302
302
  tsConfig: options.tsConfig,
303
303
  outputPath,
304
- aot: false,
304
+ aot: options.aot,
305
305
  index: false,
306
306
  outputHashing: schema_1.OutputHashing.None,
307
307
  optimization: false,
@@ -2,6 +2,10 @@
2
2
  * Karma target options for Build Facade.
3
3
  */
4
4
  export type Schema = {
5
+ /**
6
+ * Run tests using Ahead of Time compilation.
7
+ */
8
+ aot?: boolean;
5
9
  /**
6
10
  * List of static application assets.
7
11
  */
@@ -276,6 +276,11 @@
276
276
  "webWorkerTsConfig": {
277
277
  "type": "string",
278
278
  "description": "TypeScript configuration for Web Worker modules."
279
+ },
280
+ "aot": {
281
+ "type": "boolean",
282
+ "description": "Run tests using Ahead of Time compilation.",
283
+ "default": false
279
284
  }
280
285
  },
281
286
  "additionalProperties": false,
@@ -13,5 +13,5 @@ import { Schema as NgPackagrBuilderOptions } from './schema';
13
13
  */
14
14
  export declare function execute(options: NgPackagrBuilderOptions, context: BuilderContext): Observable<BuilderOutput>;
15
15
  export type { NgPackagrBuilderOptions };
16
- declare const _default: import("@angular-devkit/architect").Builder<Record<string, string> & NgPackagrBuilderOptions & import("../../../../core").JsonObject>;
16
+ declare const _default: import("@angular-devkit/architect").Builder<Record<string, string> & NgPackagrBuilderOptions & import("@angular-devkit/core").JsonObject>;
17
17
  export default _default;
@@ -15,5 +15,5 @@ type PrerenderBuilderOutput = BuilderOutput;
15
15
  * the browser result.
16
16
  */
17
17
  export declare function execute(options: PrerenderBuilderOptions, context: BuilderContext): Promise<PrerenderBuilderOutput>;
18
- declare const _default: import("@angular-devkit/architect").Builder<Schema & import("../../../../core").JsonObject>;
18
+ declare const _default: import("@angular-devkit/architect").Builder<Schema & import("@angular-devkit/core").JsonObject>;
19
19
  export default _default;
@@ -6,5 +6,5 @@
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { Schema as ProtractorBuilderOptions } from '../protractor/schema';
9
- declare const _default: import("@angular-devkit/architect").Builder<ProtractorBuilderOptions & import("../../../../core").JsonObject>;
9
+ declare const _default: import("@angular-devkit/architect").Builder<ProtractorBuilderOptions & import("@angular-devkit/core").JsonObject>;
10
10
  export default _default;
@@ -28,5 +28,5 @@ export type { ServerBuilderOptions };
28
28
  export declare function execute(options: ServerBuilderOptions, context: BuilderContext, transforms?: {
29
29
  webpackConfiguration?: ExecutionTransformer<webpack.Configuration>;
30
30
  }): Observable<ServerBuilderOutput>;
31
- declare const _default: import("@angular-devkit/architect").Builder<ServerBuilderOptions & import("../../../../core").JsonObject>;
31
+ declare const _default: import("@angular-devkit/architect").Builder<ServerBuilderOptions & import("@angular-devkit/core").JsonObject>;
32
32
  export default _default;
@@ -6,5 +6,5 @@
6
6
  * found in the LICENSE file at https://angular.dev/license
7
7
  */
8
8
  import { Schema } from './schema';
9
- declare const _default: import("@angular-devkit/architect").Builder<Schema & import("../../../../core").JsonObject>;
9
+ declare const _default: import("@angular-devkit/architect").Builder<Schema & import("@angular-devkit/core").JsonObject>;
10
10
  export default _default;
@@ -17,6 +17,9 @@ function createIvyPlugin(wco, aot, tsconfig) {
17
17
  sourceMap: buildOptions.sourceMap.scripts,
18
18
  declaration: false,
19
19
  declarationMap: false,
20
+ // Disable removing of comments as TS is quite aggressive with these and can
21
+ // remove important annotations, such as /* @__PURE__ */.
22
+ removeComments: false,
20
23
  };
21
24
  if (tsConfig.options.target === undefined || tsConfig.options.target < typescript_1.ScriptTarget.ES2022) {
22
25
  compilerOptions.target = typescript_1.ScriptTarget.ES2022;
@@ -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.2.0-next.0';
13
+ const VERSION = '19.2.0-next.2';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&