@angular/build 18.0.4 → 18.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/builders/dev-server/vite-server.js +1 -0
- package/src/tools/esbuild/application-code-bundle.js +1 -1
- package/src/tools/esbuild/global-scripts.js +1 -1
- package/src/utils/environment-options.js +4 -1
- package/src/utils/index-file/nonce.js +1 -2
- package/src/utils/normalize-cache.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/build",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.5",
|
|
4
4
|
"description": "Official build system for Angular",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Angular CLI",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"builders": "builders.json",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@ampproject/remapping": "2.3.0",
|
|
26
|
-
"@angular-devkit/architect": "0.1800.
|
|
26
|
+
"@angular-devkit/architect": "0.1800.5",
|
|
27
27
|
"@babel/core": "7.24.5",
|
|
28
28
|
"@babel/helper-annotate-as-pure": "7.22.5",
|
|
29
29
|
"@babel/helper-split-export-declaration": "7.24.5",
|
|
@@ -249,7 +249,7 @@ function getEsBuildCommonOptions(options) {
|
|
|
249
249
|
format: 'esm',
|
|
250
250
|
assetNames: outputNames.media,
|
|
251
251
|
conditions: ['es2020', 'es2015', 'module'],
|
|
252
|
-
resolveExtensions: ['.ts', '.tsx', '.mjs', '.js'],
|
|
252
|
+
resolveExtensions: ['.ts', '.tsx', '.mjs', '.js', '.cjs'],
|
|
253
253
|
metafile: true,
|
|
254
254
|
legalComments: options.extractLicenses ? 'none' : 'eof',
|
|
255
255
|
logLevel: options.verbose && !jsonLogs ? 'debug' : 'silent',
|
|
@@ -73,7 +73,7 @@ function createGlobalScriptsBundleOptions(options, target, initial) {
|
|
|
73
73
|
assetNames: outputNames.media,
|
|
74
74
|
mainFields: ['script', 'browser', 'main'],
|
|
75
75
|
conditions: ['script'],
|
|
76
|
-
resolveExtensions: ['.mjs', '.js'],
|
|
76
|
+
resolveExtensions: ['.mjs', '.js', '.cjs'],
|
|
77
77
|
logLevel: options.verbose && !jsonLogs ? 'debug' : 'silent',
|
|
78
78
|
metafile: true,
|
|
79
79
|
minify: optimizationOptions.scripts,
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
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");
|
|
11
12
|
function isDisabled(variable) {
|
|
12
13
|
return variable === '0' || variable.toLowerCase() === 'false';
|
|
13
14
|
}
|
|
@@ -66,7 +67,9 @@ exports.allowMinify = debugOptimize.minify;
|
|
|
66
67
|
*
|
|
67
68
|
*/
|
|
68
69
|
const maxWorkersVariable = process.env['NG_BUILD_MAX_WORKERS'];
|
|
69
|
-
exports.maxWorkers = isPresent(maxWorkersVariable)
|
|
70
|
+
exports.maxWorkers = isPresent(maxWorkersVariable)
|
|
71
|
+
? +maxWorkersVariable
|
|
72
|
+
: Math.min(4, (0, node_os_1.availableParallelism)());
|
|
70
73
|
const parallelTsVariable = process.env['NG_BUILD_PARALLEL_TS'];
|
|
71
74
|
exports.useParallelTs = !isPresent(parallelTsVariable) || !isDisabled(parallelTsVariable);
|
|
72
75
|
const debugPerfVariable = process.env['NG_BUILD_DEBUG_PERF'];
|
|
@@ -25,8 +25,7 @@ async function addNonce(html) {
|
|
|
25
25
|
}
|
|
26
26
|
const { rewriter, transformedContent } = await (0, html_rewriting_stream_1.htmlRewritingStream)(html);
|
|
27
27
|
rewriter.on('startTag', (tag) => {
|
|
28
|
-
if ((tag.tagName === 'style' ||
|
|
29
|
-
(tag.tagName === 'script' && !tag.attrs.some((attr) => attr.name === 'src'))) &&
|
|
28
|
+
if ((tag.tagName === 'style' || tag.tagName === 'script') &&
|
|
30
29
|
!tag.attrs.some((attr) => attr.name === 'nonce')) {
|
|
31
30
|
tag.attrs.push({ name: 'nonce', value: nonce });
|
|
32
31
|
}
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.normalizeCacheOptions = void 0;
|
|
11
11
|
const node_path_1 = require("node:path");
|
|
12
12
|
/** Version placeholder is replaced during the build process with actual package version */
|
|
13
|
-
const VERSION = '18.0.
|
|
13
|
+
const VERSION = '18.0.5';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|