Skip to content

Commit 0fe13f2

Browse files
author
Angular Builds
committed
0b161bc fix(@angular-devkit/build-angular): remove outdated browser-esbuild option warning
1 parent 22401a0 commit 0fe13f2

File tree

7 files changed

+26
-62
lines changed

7 files changed

+26
-62
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@angular-devkit/build-angular",
3-
"version": "19.0.0-next.0+sha-83b7343",
3+
"version": "19.0.0-next.0+sha-0b161bc",
44
"description": "Angular Webpack Build Facade",
55
"main": "src/index.js",
66
"typings": "src/index.d.ts",
77
"builders": "builders.json",
88
"dependencies": {
99
"@ampproject/remapping": "2.3.0",
10-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#83b7343",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#83b7343",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#83b7343",
13-
"@angular/build": "github:angular/angular-build-builds#83b7343",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#0b161bc",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#0b161bc",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#0b161bc",
13+
"@angular/build": "github:angular/angular-build-builds#0b161bc",
1414
"@babel/core": "7.25.2",
1515
"@babel/generator": "7.25.0",
1616
"@babel/helper-annotate-as-pure": "7.24.7",
@@ -21,7 +21,7 @@
2121
"@babel/preset-env": "7.25.3",
2222
"@babel/runtime": "7.25.0",
2323
"@discoveryjs/json-ext": "0.6.1",
24-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#83b7343",
24+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#0b161bc",
2525
"@vitejs/plugin-basic-ssl": "1.1.0",
2626
"ansi-colors": "4.1.3",
2727
"autoprefixer": "10.4.20",
@@ -77,7 +77,7 @@
7777
"@angular/localize": "^19.0.0-next.0",
7878
"@angular/platform-server": "^19.0.0-next.0",
7979
"@angular/service-worker": "^19.0.0-next.0",
80-
"@angular/ssr": "github:angular/angular-ssr-builds#83b7343",
80+
"@angular/ssr": "github:angular/angular-ssr-builds#0b161bc",
8181
"@web/test-runner": "^0.18.0",
8282
"browser-sync": "^3.0.2",
8383
"jest": "^29.5.0",
@@ -98,7 +98,7 @@
9898
"@angular/service-worker": {
9999
"optional": true
100100
},
101-
"@angular/ssr": "github:angular/angular-ssr-builds#83b7343",
101+
"@angular/ssr": "github:angular/angular-ssr-builds#0b161bc",
102102
"@web/test-runner": {
103103
"optional": true
104104
},

src/builders/browser-esbuild/builder-status-warnings.d.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/builders/browser-esbuild/builder-status-warnings.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/builders/browser-esbuild/index.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ exports.buildEsbuildBrowser = buildEsbuildBrowser;
1111
exports.convertBrowserOptions = convertBrowserOptions;
1212
const build_1 = require("@angular/build");
1313
const architect_1 = require("@angular-devkit/architect");
14-
const builder_status_warnings_1 = require("./builder-status-warnings");
1514
/**
1615
* Main execution function for the esbuild-based application builder.
1716
* The options are compatible with the Webpack-based builder.
@@ -20,9 +19,19 @@ const builder_status_warnings_1 = require("./builder-status-warnings");
2019
* @returns An async iterable with the builder result output
2120
*/
2221
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
2533
const normalizedOptions = convertBrowserOptions(userOptions);
34+
// Execute the application builder
2635
yield* (0, build_1.buildApplication)(normalizedOptions, context, { codePlugins: plugins });
2736
}
2837
function convertBrowserOptions(options) {

src/builders/extract-i18n/application-extraction.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
1212
Object.defineProperty(exports, "__esModule", { value: true });
1313
exports.extractMessages = extractMessages;
1414
const private_1 = require("@angular/build/private");
15+
const node_fs_1 = require("node:fs");
1516
const node_path_1 = __importDefault(require("node:path"));
1617
const browser_esbuild_1 = require("../browser-esbuild");
1718
async function extractMessages(options, builderName, context, extractorConstructor) {
@@ -77,6 +78,9 @@ function setupLocalizeExtractor(extractorConstructor, files, context) {
7778
if (file?.origin === 'memory') {
7879
content = textDecoder.decode(file.contents);
7980
}
81+
else if (file?.origin === 'disk') {
82+
content = (0, node_fs_1.readFileSync)(file.inputPath, 'utf-8');
83+
}
8084
if (content === undefined) {
8185
throw new Error('Unknown file requested: ' + requestedPath);
8286
}

src/utils/normalize-cache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
1010
exports.normalizeCacheOptions = normalizeCacheOptions;
1111
const node_path_1 = require("node:path");
1212
/** Version placeholder is replaced during the build process with actual package version */
13-
const VERSION = '19.0.0-next.0+sha-83b7343';
13+
const VERSION = '19.0.0-next.0+sha-0b161bc';
1414
function hasCacheMetadata(value) {
1515
return (!!value &&
1616
typeof value === 'object' &&

uniqueId

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Tue Aug 20 2024 14:56:19 GMT+0000 (Coordinated Universal Time)
1+
Tue Aug 20 2024 15:10:24 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)