Skip to content

Commit 7ea0483

Browse files
author
Angular Builds
committed
e40384e refactor(@angular-devkit/build-angular): remove deprecated browserTarget
1 parent 4a900b7 commit 7ea0483

File tree

9 files changed

+14
-40
lines changed

9 files changed

+14
-40
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-9692a90",
3+
"version": "19.0.0-next.0+sha-e40384e",
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#9692a90",
11-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#9692a90",
12-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#9692a90",
13-
"@angular/build": "github:angular/angular-build-builds#9692a90",
10+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#e40384e",
11+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#e40384e",
12+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#e40384e",
13+
"@angular/build": "github:angular/angular-build-builds#e40384e",
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#9692a90",
24+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#e40384e",
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#9692a90",
80+
"@angular/ssr": "github:angular/angular-ssr-builds#e40384e",
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#9692a90",
101+
"@angular/ssr": "github:angular/angular-ssr-builds#e40384e",
102102
"@web/test-runner": {
103103
"optional": true
104104
},

src/builders/dev-server/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ async function normalizeOptions(context, projectName, options) {
3232
const projectRoot = node_path_1.default.join(workspaceRoot, projectMetadata.root ?? '');
3333
const cacheOptions = (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, workspaceRoot);
3434
// 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`;
3636
const buildTarget = (0, architect_1.targetFromTargetString)(buildTargetSpecifier, projectName, 'build');
3737
// Get the application builder options.
3838
const browserBuilderName = await context.getBuilderNameForTarget(buildTarget);

src/builders/dev-server/schema.d.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,12 @@ export interface Schema {
77
* using the 'application' or other esbuild-based builders.
88
*/
99
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;
1710
/**
1811
* A build builder target to serve in the format of `project:target[:configuration]`. You
1912
* can also pass in more than one configuration name as a comma-separated list. Example:
2013
* `project:target:production,staging`.
2114
*/
22-
buildTarget?: string;
15+
buildTarget: string;
2316
/**
2417
* Don't verify connected clients are part of allowed hosts. This option has no effect when
2518
* using the 'application' or other esbuild-based builders.

src/builders/dev-server/schema.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
"description": "Dev Server target options for Build Facade.",
55
"type": "object",
66
"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-
},
137
"buildTarget": {
148
"type": "string",
159
"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 @@
138132
}
139133
},
140134
"additionalProperties": false,
141-
"anyOf": [{ "required": ["buildTarget"] }, { "required": ["browserTarget"] }]
135+
"required": ["buildTarget"]
142136
}

src/builders/extract-i18n/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function normalizeOptions(context, projectName, options) {
3131
const projectMetadata = await context.getProjectMetadata(projectName);
3232
const projectRoot = node_path_1.default.join(workspaceRoot, projectMetadata.root ?? '');
3333
// 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 ?? ':';
3535
const buildTarget = (0, architect_1.targetFromTargetString)(buildTargetSpecifier, projectName, 'build');
3636
const i18nOptions = (0, private_1.createI18nOptions)(projectMetadata);
3737
// Normalize xliff format extensions

src/builders/extract-i18n/schema.d.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
* Extract i18n target options for Build Facade.
33
*/
44
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;
125
/**
136
* A builder target to extract i18n messages in the format of
147
* `project:target[:configuration]`. You can also pass in more than one configuration name

src/builders/extract-i18n/schema.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
"description": "Extract i18n target options for Build Facade.",
55
"type": "object",
66
"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-
},
137
"buildTarget": {
148
"type": "string",
159
"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`.",

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-9692a90';
13+
const VERSION = '19.0.0-next.0+sha-e40384e';
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-
Wed Aug 21 2024 16:49:59 GMT+0000 (Coordinated Universal Time)
1+
Wed Aug 21 2024 17:57:15 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)