Skip to content

Commit 89a4502

Browse files
author
Angular Builds
committed
7360a34 fix(@angular/build): use Node.js available parallelism for default worker count
1 parent c49a6a3 commit 89a4502

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@angular-devkit/build-angular",
3-
"version": "18.0.4+sha-86e031d",
3+
"version": "18.0.4+sha-7360a34",
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/build": "github:angular/angular-build-builds#86e031d",
11-
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#86e031d",
12-
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#86e031d",
13-
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#86e031d",
10+
"@angular/build": "github:angular/angular-build-builds#7360a34",
11+
"@angular-devkit/architect": "github:angular/angular-devkit-architect-builds#7360a34",
12+
"@angular-devkit/build-webpack": "github:angular/angular-devkit-build-webpack-builds#7360a34",
13+
"@angular-devkit/core": "github:angular/angular-devkit-core-builds#7360a34",
1414
"@babel/core": "7.24.5",
1515
"@babel/generator": "7.24.5",
1616
"@babel/helper-annotate-as-pure": "7.22.5",
@@ -21,7 +21,7 @@
2121
"@babel/preset-env": "7.24.5",
2222
"@babel/runtime": "7.24.5",
2323
"@discoveryjs/json-ext": "0.5.7",
24-
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#86e031d",
24+
"@ngtools/webpack": "github:angular/ngtools-webpack-builds#7360a34",
2525
"@vitejs/plugin-basic-ssl": "1.1.0",
2626
"ansi-colors": "4.1.3",
2727
"autoprefixer": "10.4.19",

src/utils/environment-options.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*/
99
Object.defineProperty(exports, "__esModule", { value: true });
1010
exports.useJSONBuildLogs = exports.useTypeChecking = exports.shouldWatchRoot = exports.debugPerformance = exports.useParallelTs = exports.maxWorkers = exports.allowMinify = exports.shouldBeautify = exports.allowMangle = void 0;
11+
const node_os_1 = require("node:os");
1112
function isDisabled(variable) {
1213
return variable === '0' || variable.toLowerCase() === 'false';
1314
}
@@ -66,7 +67,9 @@ exports.allowMinify = debugOptimize.minify;
6667
*
6768
*/
6869
const maxWorkersVariable = process.env['NG_BUILD_MAX_WORKERS'];
69-
exports.maxWorkers = isPresent(maxWorkersVariable) ? +maxWorkersVariable : 4;
70+
exports.maxWorkers = isPresent(maxWorkersVariable)
71+
? +maxWorkersVariable
72+
: Math.min(4, (0, node_os_1.availableParallelism)());
7073
const parallelTsVariable = process.env['NG_BUILD_PARALLEL_TS'];
7174
exports.useParallelTs = !isPresent(parallelTsVariable) || !isDisabled(parallelTsVariable);
7275
const debugPerfVariable = process.env['NG_BUILD_DEBUG_PERF'];

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 = void 0;
1111
const node_path_1 = require("node:path");
1212
/** Version placeholder is replaced during the build process with actual package version */
13-
const VERSION = '18.0.4+sha-86e031d';
13+
const VERSION = '18.0.4+sha-7360a34';
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 Jun 18 2024 14:18:34 GMT+0000 (Coordinated Universal Time)
1+
Tue Jun 18 2024 14:28:34 GMT+0000 (Coordinated Universal Time)

0 commit comments

Comments
 (0)