@angular-devkit/build-angular 18.1.0-next.2 → 18.1.0-next.3
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 +13 -13
- package/src/tools/babel/plugins/add-code-coverage.d.ts +14 -0
- package/src/tools/babel/plugins/add-code-coverage.js +44 -0
- package/src/tools/babel/plugins/types.d.ts +20 -0
- package/src/tools/babel/presets/application.js +1 -7
- package/src/utils/environment-options.js +4 -1
- package/src/utils/normalize-cache.js +1 -1
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/build-angular",
|
|
3
|
-
"version": "18.1.0-next.
|
|
3
|
+
"version": "18.1.0-next.3",
|
|
4
4
|
"description": "Angular Webpack Build Facade",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
7
7
|
"builders": "builders.json",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@ampproject/remapping": "2.3.0",
|
|
10
|
-
"@angular-devkit/architect": "0.1801.0-next.
|
|
11
|
-
"@angular-devkit/build-webpack": "0.1801.0-next.
|
|
12
|
-
"@angular-devkit/core": "18.1.0-next.
|
|
13
|
-
"@angular/build": "18.1.0-next.
|
|
10
|
+
"@angular-devkit/architect": "0.1801.0-next.3",
|
|
11
|
+
"@angular-devkit/build-webpack": "0.1801.0-next.3",
|
|
12
|
+
"@angular-devkit/core": "18.1.0-next.3",
|
|
13
|
+
"@angular/build": "18.1.0-next.3",
|
|
14
14
|
"@babel/core": "7.24.7",
|
|
15
15
|
"@babel/generator": "7.24.7",
|
|
16
16
|
"@babel/helper-annotate-as-pure": "7.24.7",
|
|
@@ -21,12 +21,11 @@
|
|
|
21
21
|
"@babel/preset-env": "7.24.7",
|
|
22
22
|
"@babel/runtime": "7.24.7",
|
|
23
23
|
"@discoveryjs/json-ext": "0.5.7",
|
|
24
|
-
"@ngtools/webpack": "18.1.0-next.
|
|
24
|
+
"@ngtools/webpack": "18.1.0-next.3",
|
|
25
25
|
"@vitejs/plugin-basic-ssl": "1.1.0",
|
|
26
26
|
"ansi-colors": "4.1.3",
|
|
27
27
|
"autoprefixer": "10.4.19",
|
|
28
28
|
"babel-loader": "9.1.3",
|
|
29
|
-
"babel-plugin-istanbul": "6.1.1",
|
|
30
29
|
"browserslist": "^4.21.5",
|
|
31
30
|
"copy-webpack-plugin": "12.0.2",
|
|
32
31
|
"critters": "0.0.22",
|
|
@@ -35,6 +34,7 @@
|
|
|
35
34
|
"fast-glob": "3.3.2",
|
|
36
35
|
"http-proxy-middleware": "3.0.0",
|
|
37
36
|
"https-proxy-agent": "7.0.4",
|
|
37
|
+
"istanbul-lib-instrument": "6.0.2",
|
|
38
38
|
"jsonc-parser": "3.2.1",
|
|
39
39
|
"karma-source-map-support": "1.4.0",
|
|
40
40
|
"less": "4.2.0",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"ora": "5.4.1",
|
|
49
49
|
"parse5-html-rewriting-stream": "7.0.0",
|
|
50
50
|
"picomatch": "4.0.2",
|
|
51
|
-
"piscina": "4.
|
|
51
|
+
"piscina": "4.6.0",
|
|
52
52
|
"postcss": "8.4.38",
|
|
53
53
|
"postcss-loader": "8.1.1",
|
|
54
54
|
"resolve-url-loader": "5.0.0",
|
|
55
55
|
"rxjs": "7.8.1",
|
|
56
|
-
"sass": "1.77.
|
|
56
|
+
"sass": "1.77.6",
|
|
57
57
|
"sass-loader": "14.2.1",
|
|
58
58
|
"semver": "7.6.2",
|
|
59
59
|
"source-map-loader": "5.0.0",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"terser": "5.31.1",
|
|
62
62
|
"tree-kill": "1.2.2",
|
|
63
63
|
"tslib": "2.6.3",
|
|
64
|
-
"undici": "6.
|
|
65
|
-
"vite": "5.
|
|
64
|
+
"undici": "6.19.2",
|
|
65
|
+
"vite": "5.3.1",
|
|
66
66
|
"watchpack": "2.4.1",
|
|
67
|
-
"webpack": "5.92.
|
|
67
|
+
"webpack": "5.92.1",
|
|
68
68
|
"webpack-dev-middleware": "7.2.1",
|
|
69
69
|
"webpack-dev-server": "5.0.4",
|
|
70
70
|
"webpack-merge": "5.10.0",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"devkit",
|
|
131
131
|
"sdk"
|
|
132
132
|
],
|
|
133
|
-
"packageManager": "yarn@4.
|
|
133
|
+
"packageManager": "yarn@4.3.0",
|
|
134
134
|
"repository": {
|
|
135
135
|
"type": "git",
|
|
136
136
|
"url": "https://github.com/angular/angular-cli.git"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
import { PluginObj } from '@babel/core';
|
|
9
|
+
/**
|
|
10
|
+
* A babel plugin factory function for adding istanbul instrumentation.
|
|
11
|
+
*
|
|
12
|
+
* @returns A babel plugin object instance.
|
|
13
|
+
*/
|
|
14
|
+
export default function (): PluginObj;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.default = default_1;
|
|
14
|
+
const core_1 = require("@babel/core");
|
|
15
|
+
const istanbul_lib_instrument_1 = require("istanbul-lib-instrument");
|
|
16
|
+
const node_assert_1 = __importDefault(require("node:assert"));
|
|
17
|
+
/**
|
|
18
|
+
* A babel plugin factory function for adding istanbul instrumentation.
|
|
19
|
+
*
|
|
20
|
+
* @returns A babel plugin object instance.
|
|
21
|
+
*/
|
|
22
|
+
function default_1() {
|
|
23
|
+
const visitors = new WeakMap();
|
|
24
|
+
return {
|
|
25
|
+
visitor: {
|
|
26
|
+
Program: {
|
|
27
|
+
enter(path, state) {
|
|
28
|
+
const visitor = (0, istanbul_lib_instrument_1.programVisitor)(core_1.types, state.filename, {
|
|
29
|
+
// Babel returns a Converter object from the `convert-source-map` package
|
|
30
|
+
inputSourceMap: state.file.inputMap?.toObject(),
|
|
31
|
+
});
|
|
32
|
+
visitors.set(path, visitor);
|
|
33
|
+
visitor.enter(path);
|
|
34
|
+
},
|
|
35
|
+
exit(path) {
|
|
36
|
+
const visitor = visitors.get(path);
|
|
37
|
+
(0, node_assert_1.default)(visitor, 'Instrumentation visitor should always be present for program path.');
|
|
38
|
+
visitor.exit(path);
|
|
39
|
+
visitors.delete(path);
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
declare module 'istanbul-lib-instrument' {
|
|
10
|
+
export interface Visitor {
|
|
11
|
+
enter(path: import('@babel/core').NodePath<types.Program>): void;
|
|
12
|
+
exit(path: import('@babel/core').NodePath<types.Program>): void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function programVisitor(
|
|
16
|
+
types: typeof import('@babel/core').types,
|
|
17
|
+
filePath?: string,
|
|
18
|
+
options?: { inputSourceMap?: object | null },
|
|
19
|
+
): Visitor;
|
|
20
|
+
}
|
|
@@ -158,13 +158,7 @@ function default_1(api, options) {
|
|
|
158
158
|
]);
|
|
159
159
|
}
|
|
160
160
|
if (options.instrumentCode) {
|
|
161
|
-
plugins.push(
|
|
162
|
-
require('babel-plugin-istanbul').default,
|
|
163
|
-
{
|
|
164
|
-
inputSourceMap: options.instrumentCode.inputSourceMap ?? false,
|
|
165
|
-
cwd: options.instrumentCode.includedBasePath,
|
|
166
|
-
},
|
|
167
|
-
]);
|
|
161
|
+
plugins.push(require('../plugins/add-code-coverage').default);
|
|
168
162
|
}
|
|
169
163
|
if (needRuntimeTransform) {
|
|
170
164
|
// Babel equivalent to TypeScript's `importHelpers` option
|
|
@@ -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'];
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.normalizeCacheOptions = normalizeCacheOptions;
|
|
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.1.0-next.
|
|
13
|
+
const VERSION = '18.1.0-next.3';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|