@angular-devkit/build-angular 19.0.0-next.0 → 19.0.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.0.0-next.0",
3
+ "version": "19.0.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.1900.0-next.0",
11
- "@angular-devkit/build-webpack": "0.1900.0-next.0",
12
- "@angular-devkit/core": "19.0.0-next.0",
13
- "@angular/build": "19.0.0-next.0",
10
+ "@angular-devkit/architect": "0.1900.0-next.2",
11
+ "@angular-devkit/build-webpack": "0.1900.0-next.2",
12
+ "@angular-devkit/core": "19.0.0-next.2",
13
+ "@angular/build": "19.0.0-next.2",
14
14
  "@babel/core": "7.25.2",
15
- "@babel/generator": "7.25.0",
15
+ "@babel/generator": "7.25.5",
16
16
  "@babel/helper-annotate-as-pure": "7.24.7",
17
17
  "@babel/helper-split-export-declaration": "7.24.7",
18
- "@babel/plugin-transform-async-generator-functions": "7.25.0",
18
+ "@babel/plugin-transform-async-generator-functions": "7.25.4",
19
19
  "@babel/plugin-transform-async-to-generator": "7.24.7",
20
- "@babel/plugin-transform-runtime": "7.24.7",
21
- "@babel/preset-env": "7.25.3",
22
- "@babel/runtime": "7.25.0",
20
+ "@babel/plugin-transform-runtime": "7.25.4",
21
+ "@babel/preset-env": "7.25.4",
22
+ "@babel/runtime": "7.25.4",
23
23
  "@discoveryjs/json-ext": "0.6.1",
24
- "@ngtools/webpack": "19.0.0-next.0",
24
+ "@ngtools/webpack": "19.0.0-next.2",
25
25
  "@vitejs/plugin-basic-ssl": "1.1.0",
26
26
  "ansi-colors": "4.1.3",
27
27
  "autoprefixer": "10.4.20",
@@ -30,7 +30,7 @@
30
30
  "copy-webpack-plugin": "12.0.2",
31
31
  "critters": "0.0.24",
32
32
  "css-loader": "7.1.2",
33
- "esbuild-wasm": "0.23.0",
33
+ "esbuild-wasm": "0.23.1",
34
34
  "fast-glob": "3.3.2",
35
35
  "http-proxy-middleware": "3.0.0",
36
36
  "https-proxy-agent": "7.0.5",
@@ -42,7 +42,7 @@
42
42
  "license-webpack-plugin": "4.0.2",
43
43
  "loader-utils": "3.3.1",
44
44
  "magic-string": "0.30.11",
45
- "mini-css-extract-plugin": "2.9.0",
45
+ "mini-css-extract-plugin": "2.9.1",
46
46
  "mrmime": "2.0.0",
47
47
  "open": "10.1.0",
48
48
  "ora": "5.4.1",
@@ -54,30 +54,30 @@
54
54
  "resolve-url-loader": "5.0.0",
55
55
  "rxjs": "7.8.1",
56
56
  "sass": "1.77.8",
57
- "sass-loader": "16.0.0",
57
+ "sass-loader": "16.0.1",
58
58
  "semver": "7.6.3",
59
59
  "source-map-loader": "5.0.0",
60
60
  "source-map-support": "0.5.21",
61
61
  "terser": "5.31.6",
62
62
  "tree-kill": "1.2.2",
63
- "tslib": "2.6.3",
64
- "vite": "5.4.0",
63
+ "tslib": "2.7.0",
64
+ "vite": "5.4.2",
65
65
  "watchpack": "2.4.2",
66
- "webpack": "5.93.0",
67
- "webpack-dev-middleware": "7.3.0",
66
+ "webpack": "5.94.0",
67
+ "webpack-dev-middleware": "7.4.2",
68
68
  "webpack-dev-server": "5.0.4",
69
69
  "webpack-merge": "6.0.1",
70
70
  "webpack-subresource-integrity": "5.1.0"
71
71
  },
72
72
  "optionalDependencies": {
73
- "esbuild": "0.23.0"
73
+ "esbuild": "0.23.1"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "@angular/compiler-cli": "^19.0.0-next.0",
77
77
  "@angular/localize": "^19.0.0-next.0",
78
78
  "@angular/platform-server": "^19.0.0-next.0",
79
79
  "@angular/service-worker": "^19.0.0-next.0",
80
- "@angular/ssr": "^19.0.0-next.0",
80
+ "@angular/ssr": "^19.0.0-next.2",
81
81
  "@web/test-runner": "^0.18.0",
82
82
  "browser-sync": "^3.0.2",
83
83
  "jest": "^29.5.0",
@@ -11,7 +11,6 @@ exports.buildEsbuildBrowser = buildEsbuildBrowser;
11
11
  exports.convertBrowserOptions = convertBrowserOptions;
12
12
  const build_1 = require("@angular/build");
13
13
  const architect_1 = require("@angular-devkit/architect");
14
- const builder_status_warnings_1 = require("./builder-status-warnings");
15
14
  /**
16
15
  * Main execution function for the esbuild-based application builder.
17
16
  * The options are compatible with the Webpack-based builder.
@@ -20,9 +19,19 @@ const builder_status_warnings_1 = require("./builder-status-warnings");
20
19
  * @returns An async iterable with the builder result output
21
20
  */
22
21
  async function* buildEsbuildBrowser(userOptions, context, infrastructureSettings, plugins) {
23
- // Inform user of status of builder and options
24
- (0, builder_status_warnings_1.logBuilderStatusWarnings)(userOptions, context);
22
+ // Warn about any unsupported options
23
+ if (userOptions['vendorChunk']) {
24
+ context.logger.warn(`The 'vendorChunk' option is not used by this builder and will be ignored.`);
25
+ }
26
+ if (userOptions['commonChunk'] === false) {
27
+ context.logger.warn(`The 'commonChunk' option is always enabled by this builder and will be ignored.`);
28
+ }
29
+ if (userOptions['webWorkerTsConfig']) {
30
+ context.logger.warn(`The 'webWorkerTsConfig' option is not yet supported by this builder.`);
31
+ }
32
+ // Convert browser builder options to application builder options
25
33
  const normalizedOptions = convertBrowserOptions(userOptions);
34
+ // Execute the application builder
26
35
  yield* (0, build_1.buildApplication)(normalizedOptions, context, { codePlugins: plugins });
27
36
  }
28
37
  function convertBrowserOptions(options) {
@@ -32,7 +32,7 @@ async function normalizeOptions(context, projectName, options) {
32
32
  const projectRoot = node_path_1.default.join(workspaceRoot, projectMetadata.root ?? '');
33
33
  const cacheOptions = (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, workspaceRoot);
34
34
  // Target specifier defaults to the current project's build target using a development configuration
35
- const buildTargetSpecifier = options.buildTarget ?? options.browserTarget ?? `::development`;
35
+ const buildTargetSpecifier = options.buildTarget ?? `::development`;
36
36
  const buildTarget = (0, architect_1.targetFromTargetString)(buildTargetSpecifier, projectName, 'build');
37
37
  // Get the application builder options.
38
38
  const browserBuilderName = await context.getBuilderNameForTarget(buildTarget);
@@ -7,19 +7,12 @@ export interface Schema {
7
7
  * using the 'application' or other esbuild-based builders.
8
8
  */
9
9
  allowedHosts?: string[];
10
- /**
11
- * A browser builder target to serve in the format of `project:target[:configuration]`. You
12
- * can also pass in more than one configuration name as a comma-separated list. Example:
13
- * `project:target:production,staging`.
14
- * @deprecated Use 'buildTarget' instead.
15
- */
16
- browserTarget?: string;
17
10
  /**
18
11
  * A build builder target to serve in the format of `project:target[:configuration]`. You
19
12
  * can also pass in more than one configuration name as a comma-separated list. Example:
20
13
  * `project:target:production,staging`.
21
14
  */
22
- buildTarget?: string;
15
+ buildTarget: string;
23
16
  /**
24
17
  * Don't verify connected clients are part of allowed hosts. This option has no effect when
25
18
  * using the 'application' or other esbuild-based builders.
@@ -4,12 +4,6 @@
4
4
  "description": "Dev Server target options for Build Facade.",
5
5
  "type": "object",
6
6
  "properties": {
7
- "browserTarget": {
8
- "type": "string",
9
- "description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
10
- "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
11
- "x-deprecated": "Use 'buildTarget' instead."
12
- },
13
7
  "buildTarget": {
14
8
  "type": "string",
15
9
  "description": "A build builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
@@ -138,5 +132,5 @@
138
132
  }
139
133
  },
140
134
  "additionalProperties": false,
141
- "anyOf": [{ "required": ["buildTarget"] }, { "required": ["browserTarget"] }]
135
+ "required": ["buildTarget"]
142
136
  }
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.extractMessages = extractMessages;
14
14
  const private_1 = require("@angular/build/private");
15
+ const node_fs_1 = require("node:fs");
15
16
  const node_path_1 = __importDefault(require("node:path"));
16
17
  const browser_esbuild_1 = require("../browser-esbuild");
17
18
  async function extractMessages(options, builderName, context, extractorConstructor) {
@@ -77,6 +78,9 @@ function setupLocalizeExtractor(extractorConstructor, files, context) {
77
78
  if (file?.origin === 'memory') {
78
79
  content = textDecoder.decode(file.contents);
79
80
  }
81
+ else if (file?.origin === 'disk') {
82
+ content = (0, node_fs_1.readFileSync)(file.inputPath, 'utf-8');
83
+ }
80
84
  if (content === undefined) {
81
85
  throw new Error('Unknown file requested: ' + requestedPath);
82
86
  }
@@ -31,7 +31,7 @@ async function normalizeOptions(context, projectName, options) {
31
31
  const projectMetadata = await context.getProjectMetadata(projectName);
32
32
  const projectRoot = node_path_1.default.join(workspaceRoot, projectMetadata.root ?? '');
33
33
  // Target specifier defaults to the current project's build target with no specified configuration
34
- const buildTargetSpecifier = options.buildTarget ?? options.browserTarget ?? ':';
34
+ const buildTargetSpecifier = options.buildTarget ?? ':';
35
35
  const buildTarget = (0, architect_1.targetFromTargetString)(buildTargetSpecifier, projectName, 'build');
36
36
  const i18nOptions = (0, private_1.createI18nOptions)(projectMetadata);
37
37
  // Normalize xliff format extensions
@@ -2,13 +2,6 @@
2
2
  * Extract i18n target options for Build Facade.
3
3
  */
4
4
  export interface Schema {
5
- /**
6
- * A browser builder target to extract i18n messages in the format of
7
- * `project:target[:configuration]`. You can also pass in more than one configuration name
8
- * as a comma-separated list. Example: `project:target:production,staging`.
9
- * @deprecated Use 'buildTarget' instead.
10
- */
11
- browserTarget?: string;
12
5
  /**
13
6
  * A builder target to extract i18n messages in the format of
14
7
  * `project:target[:configuration]`. You can also pass in more than one configuration name
@@ -4,12 +4,6 @@
4
4
  "description": "Extract i18n target options for Build Facade.",
5
5
  "type": "object",
6
6
  "properties": {
7
- "browserTarget": {
8
- "type": "string",
9
- "description": "A browser builder target to extract i18n messages in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
10
- "pattern": "^[^:\\s]+:[^:\\s]+(:[^\\s]+)?$",
11
- "x-deprecated": "Use 'buildTarget' instead."
12
- },
13
7
  "buildTarget": {
14
8
  "type": "string",
15
9
  "description": "A builder target to extract i18n messages in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`.",
@@ -62,7 +62,8 @@ async function getCommonConfig(wco) {
62
62
  // Load ESM `@angular/compiler-cli` using the TypeScript dynamic import workaround.
63
63
  // Once TypeScript provides support for keeping the dynamic import this workaround can be
64
64
  // changed to a direct dynamic import.
65
- const { GLOBAL_DEFS_FOR_TERSER, GLOBAL_DEFS_FOR_TERSER_WITH_AOT, VERSION: NG_VERSION, } = await (0, load_esm_1.loadEsmModule)('@angular/compiler-cli');
65
+ const { VERSION: NG_VERSION } = await (0, load_esm_1.loadEsmModule)('@angular/compiler-cli');
66
+ const { GLOBAL_DEFS_FOR_TERSER, GLOBAL_DEFS_FOR_TERSER_WITH_AOT } = await (0, load_esm_1.loadEsmModule)('@angular/compiler-cli/private/tooling');
66
67
  // determine hashing format
67
68
  const hashFormat = (0, helpers_1.getOutputHashFormat)(buildOptions.outputHashing);
68
69
  if (buildOptions.progress) {
@@ -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.0-next.0';
13
+ const VERSION = '19.0.0-next.2';
14
14
  function hasCacheMetadata(value) {
15
15
  return (!!value &&
16
16
  typeof value === 'object' &&
@@ -1,10 +0,0 @@
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 { BuilderContext } from '@angular-devkit/architect';
9
- import { Schema as BrowserBuilderOptions } from './schema';
10
- export declare function logBuilderStatusWarnings(options: BrowserBuilderOptions, { logger }: BuilderContext): void;
@@ -1,39 +0,0 @@
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.logBuilderStatusWarnings = logBuilderStatusWarnings;
11
- const UNSUPPORTED_OPTIONS = [
12
- // * Always enabled with esbuild
13
- // 'commonChunk',
14
- // * Unused by builder and will be removed in a future release
15
- 'vendorChunk',
16
- 'resourcesOutputPath',
17
- // * Currently unsupported by esbuild
18
- 'webWorkerTsConfig',
19
- ];
20
- function logBuilderStatusWarnings(options, { logger }) {
21
- // Validate supported options
22
- for (const unsupportedOption of UNSUPPORTED_OPTIONS) {
23
- const value = options[unsupportedOption];
24
- if (value === undefined || value === false) {
25
- continue;
26
- }
27
- if (Array.isArray(value) && value.length === 0) {
28
- continue;
29
- }
30
- if (typeof value === 'object' && Object.keys(value).length === 0) {
31
- continue;
32
- }
33
- if (unsupportedOption === 'vendorChunk' || unsupportedOption === 'resourcesOutputPath') {
34
- logger.warn(`The '${unsupportedOption}' option is not used by this builder and will be ignored.`);
35
- continue;
36
- }
37
- logger.warn(`The '${unsupportedOption}' option is not yet supported by this builder.`);
38
- }
39
- }