Skip to content

Commit c897756

Browse files
author
Angular Builds
committed
8a89438 fix(@angular/build): correctly handle false value in server option
1 parent e0e93fc commit c897756

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/build",
3-
"version": "20.0.0-next.3+sha-088a4cb",
3+
"version": "20.0.0-next.3+sha-8a89438",
44
"description": "Official build system for Angular",
55
"keywords": [
66
"Angular CLI",
@@ -23,7 +23,7 @@
2323
"builders": "builders.json",
2424
"dependencies": {
2525
"@ampproject/remapping": "2.3.0",
26-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#088a4cb",
26+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#8a89438",
2727
"@babel/core": "7.26.10",
2828
"@babel/helper-annotate-as-pure": "7.25.9",
2929
"@babel/helper-split-export-declaration": "7.24.7",
@@ -60,7 +60,7 @@
6060
"@angular/platform-browser": "^20.0.0 || ^20.0.0-next.0",
6161
"@angular/platform-server": "^20.0.0 || ^20.0.0-next.0",
6262
"@angular/service-worker": "^20.0.0 || ^20.0.0-next.0",
63-
"@angular/ssr": "github:angular/angular-ssr-builds#088a4cb",
63+
"@angular/ssr": "github:angular/angular-ssr-builds#8a89438",
6464
"karma": "^6.4.0",
6565
"less": "^4.2.0",
6666
"ng-packagr": "^20.0.0 || ^20.0.0-next.0",
@@ -81,7 +81,7 @@
8181
"@angular/service-worker": {
8282
"optional": true
8383
},
84-
"@angular/ssr": "github:angular/angular-ssr-builds#088a4cb",
84+
"@angular/ssr": "github:angular/angular-ssr-builds#8a89438",
8585
"karma": {
8686
"optional": true
8787
},

src/builders/application/options.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,12 @@ async function normalizeOptions(context, projectName, options, extensions) {
132132
? undefined
133133
: await getTailwindConfig(searchDirectories, workspaceRoot, context);
134134
let serverEntryPoint;
135-
if (options.server) {
135+
if (typeof options.server === 'string') {
136+
if (options.server === '') {
137+
throw new Error('The "server" option cannot be an empty string.');
138+
}
136139
serverEntryPoint = node_path_1.default.join(workspaceRoot, options.server);
137140
}
138-
else if (options.server === '') {
139-
throw new Error('The "server" option cannot be an empty string.');
140-
}
141141
let prerenderOptions;
142142
if (options.prerender) {
143143
const { discoverRoutes = true, routesFile = undefined } = options.prerender === true ? {} : options.prerender;

src/builders/application/schema.d.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ export type Schema = {
163163
* The full path for the server entry point to the application, relative to the current
164164
* workspace.
165165
*/
166-
server?: string;
166+
server?: Serv;
167167
/**
168168
* Generates a service worker configuration.
169169
*/
170-
serviceWorker?: ServiceWorker;
170+
serviceWorker?: Serv;
171171
/**
172172
* Output source maps for scripts and styles. For more information, see
173173
* https://angular.dev/reference/configs/workspace-config#source-map-configuration.
@@ -496,9 +496,12 @@ export type AutoCspClass = {
496496
unsafeEval?: boolean;
497497
};
498498
/**
499+
* The full path for the server entry point to the application, relative to the current
500+
* workspace.
501+
*
499502
* Generates a service worker configuration.
500503
*/
501-
export type ServiceWorker = boolean | string;
504+
export type Serv = boolean | string;
502505
/**
503506
* Output source maps for scripts and styles. For more information, see
504507
* https://angular.dev/reference/configs/workspace-config#source-map-configuration.

src/builders/application/schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"description": "The full path for the browser entry point to the application, relative to the current workspace."
1818
},
1919
"server": {
20-
"type": "string",
2120
"description": "The full path for the server entry point to the application, relative to the current workspace.",
2221
"oneOf": [
2322
{

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 = '20.0.0-next.3+sha-088a4cb';
13+
const VERSION = '20.0.0-next.3+sha-8a89438';
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-
Mon Mar 31 2025 05:32:25 GMT+0000 (Coordinated Universal Time)
1+
Mon Mar 31 2025 10:58:01 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)