@angular-devkit/build-angular 18.2.0 → 18.2.1
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 +7 -7
- package/src/builders/browser-esbuild/index.js +12 -3
- package/src/builders/extract-i18n/application-extraction.js +4 -0
- package/src/utils/normalize-cache.js +1 -1
- package/src/builders/browser-esbuild/builder-status-warnings.d.ts +0 -10
- package/src/builders/browser-esbuild/builder-status-warnings.js +0 -39
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "18.2.
|
|
3
|
+
"version": "18.2.1",
|
|
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.1802.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1802.
|
|
12
|
-
"@angular-devkit/core": "18.2.
|
|
13
|
-
"@angular/build": "18.2.
|
|
10
|
+
"@angular-devkit/architect": "0.1802.1",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1802.1",
|
|
12
|
+
"@angular-devkit/core": "18.2.1",
|
|
13
|
+
"@angular/build": "18.2.1",
|
|
14
14
|
"@babel/core": "7.25.2",
|
|
15
15
|
"@babel/generator": "7.25.0",
|
|
16
16
|
"@babel/helper-annotate-as-pure": "7.24.7",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@babel/preset-env": "7.25.3",
|
|
22
22
|
"@babel/runtime": "7.25.0",
|
|
23
23
|
"@discoveryjs/json-ext": "0.6.1",
|
|
24
|
-
"@ngtools/webpack": "18.2.
|
|
24
|
+
"@ngtools/webpack": "18.2.1",
|
|
25
25
|
"@vitejs/plugin-basic-ssl": "1.1.0",
|
|
26
26
|
"ansi-colors": "4.1.3",
|
|
27
27
|
"autoprefixer": "10.4.20",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"postcss-loader": "8.1.1",
|
|
54
54
|
"resolve-url-loader": "5.0.0",
|
|
55
55
|
"rxjs": "7.8.1",
|
|
56
|
-
"sass": "1.77.
|
|
56
|
+
"sass": "1.77.6",
|
|
57
57
|
"sass-loader": "16.0.0",
|
|
58
58
|
"semver": "7.6.3",
|
|
59
59
|
"source-map-loader": "5.0.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
|
-
//
|
|
24
|
-
|
|
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) {
|
|
@@ -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
|
}
|
|
@@ -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 = '18.2.
|
|
13
|
+
const VERSION = '18.2.1';
|
|
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
|
-
}
|