Skip to content

Commit e9e7c80

Browse files
author
Angular Builds
committed
b155ba1 fix(@angular/build): enable unit-test builder watch outside CI
1 parent 95428cf commit e9e7c80

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/build",
3-
"version": "20.0.0-rc.2+sha-059c10e",
3+
"version": "20.0.0-rc.2+sha-b155ba1",
44
"description": "Official build system for Angular",
55
"keywords": [
66
"Angular CLI",

src/builders/unit-test/options.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export declare function normalizeOptions(context: BuilderContext, projectName: s
2222
tsConfig: string;
2323
reporters: string[] | undefined;
2424
browsers: string[] | undefined;
25-
watch: boolean | undefined;
25+
watch: boolean;
2626
debug: boolean;
2727
providersFile: string | undefined;
2828
}>;

src/builders/unit-test/options.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const architect_1 = require("@angular-devkit/architect");
1515
const node_path_1 = __importDefault(require("node:path"));
1616
const normalize_cache_1 = require("../../utils/normalize-cache");
1717
const project_metadata_1 = require("../../utils/project-metadata");
18+
const tty_1 = require("../../utils/tty");
1819
async function normalizeOptions(context, projectName, options) {
1920
// Setup base paths based on workspace root and project information
2021
const workspaceRoot = context.workspaceRoot;
@@ -26,7 +27,7 @@ async function normalizeOptions(context, projectName, options) {
2627
// Target specifier defaults to the current project's build target using a development configuration
2728
const buildTargetSpecifier = options.buildTarget ?? `::development`;
2829
const buildTarget = (0, architect_1.targetFromTargetString)(buildTargetSpecifier, projectName, 'build');
29-
const { codeCoverage, codeCoverageExclude, tsConfig, runner, reporters, browsers, watch } = options;
30+
const { codeCoverage, codeCoverageExclude, tsConfig, runner, reporters, browsers } = options;
3031
return {
3132
// Project/workspace information
3233
workspaceRoot,
@@ -43,7 +44,7 @@ async function normalizeOptions(context, projectName, options) {
4344
tsConfig,
4445
reporters,
4546
browsers,
46-
watch,
47+
watch: options.watch ?? (0, tty_1.isTTY)(),
4748
debug: options.debug ?? false,
4849
providersFile: options.providersFile && node_path_1.default.join(workspaceRoot, options.providersFile),
4950
};

src/utils/normalize-cache.js

+1-1
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-rc.2+sha-059c10e';
13+
const VERSION = '20.0.0-rc.2+sha-b155ba1';
1414
function hasCacheMetadata(value) {
1515
return (!!value &&
1616
typeof value === 'object' &&

uniqueId

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Thu May 15 2025 21:24:01 GMT+0000 (Coordinated Universal Time)
1+
Fri May 16 2025 02:13:07 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)