@angular/build 20.2.0 → 21.0.0-next.0
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/.browserslistrc +5 -5
- package/package.json +15 -15
- package/src/builders/dev-server/builder.js +2 -2
- package/src/builders/dev-server/vite/hmr.d.ts +25 -0
- package/src/builders/dev-server/vite/hmr.js +113 -0
- package/src/builders/dev-server/vite/index.d.ts +21 -0
- package/src/builders/dev-server/{vite-server.js → vite/index.js} +19 -359
- package/src/builders/dev-server/vite/server.d.ts +15 -0
- package/src/builders/dev-server/vite/server.js +229 -0
- package/src/builders/dev-server/vite/utils.d.ts +36 -0
- package/src/builders/dev-server/vite/utils.js +76 -0
- package/src/builders/unit-test/builder.d.ts +1 -1
- package/src/builders/unit-test/builder.js +187 -289
- package/src/builders/unit-test/options.d.ts +1 -0
- package/src/builders/unit-test/options.js +2 -1
- package/src/builders/unit-test/runners/api.d.ts +47 -0
- package/src/builders/unit-test/runners/api.js +9 -0
- package/src/builders/unit-test/runners/karma/executor.d.ts +17 -0
- package/src/builders/unit-test/runners/karma/executor.js +93 -0
- package/src/builders/unit-test/runners/karma/index.d.ts +13 -0
- package/src/builders/unit-test/runners/karma/index.js +26 -0
- package/src/builders/unit-test/runners/vitest/browser-provider.d.ts +11 -0
- package/src/builders/unit-test/runners/vitest/browser-provider.js +69 -0
- package/src/builders/unit-test/runners/vitest/build-options.d.ts +11 -0
- package/src/builders/unit-test/runners/vitest/build-options.js +87 -0
- package/src/builders/unit-test/runners/vitest/executor.d.ts +22 -0
- package/src/builders/unit-test/runners/vitest/executor.js +160 -0
- package/src/builders/unit-test/runners/vitest/index.d.ts +13 -0
- package/src/builders/unit-test/runners/vitest/index.js +30 -0
- package/src/builders/unit-test/schema.d.ts +4 -0
- package/src/builders/unit-test/schema.json +4 -0
- package/src/builders/unit-test/test-discovery.d.ts +8 -0
- package/src/builders/unit-test/test-discovery.js +14 -0
- package/src/private.d.ts +1 -1
- package/src/private.js +2 -2
- package/src/utils/environment-options.d.ts +43 -0
- package/src/utils/environment-options.js +84 -30
- package/src/utils/normalize-cache.js +1 -1
- package/src/utils/version.js +1 -1
- package/src/builders/dev-server/vite-server.d.ts +0 -42
- package/src/builders/unit-test/karma-bridge.d.ts +0 -10
- package/src/builders/unit-test/karma-bridge.js +0 -82
|
@@ -5,16 +5,59 @@
|
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://angular.dev/license
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Allows disabling of code mangling when the `NG_BUILD_MANGLE` environment variable is set to `0` or `false`.
|
|
10
|
+
* This is useful for debugging build output.
|
|
11
|
+
*/
|
|
8
12
|
export declare const allowMangle: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Allows beautification of build output when the `NG_BUILD_DEBUG_OPTIMIZE` environment variable is enabled.
|
|
15
|
+
* This is useful for debugging build output.
|
|
16
|
+
*/
|
|
9
17
|
export declare const shouldBeautify: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Allows disabling of code minification when the `NG_BUILD_DEBUG_OPTIMIZE` environment variable is enabled.
|
|
20
|
+
* This is useful for debugging build output.
|
|
21
|
+
*/
|
|
10
22
|
export declare const allowMinify: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The maximum number of workers to use for parallel processing.
|
|
25
|
+
* This can be controlled by the `NG_BUILD_MAX_WORKERS` environment variable.
|
|
26
|
+
*/
|
|
11
27
|
export declare const maxWorkers: number;
|
|
28
|
+
/**
|
|
29
|
+
* When `NG_BUILD_PARALLEL_TS` is set to `0` or `false`, parallel TypeScript compilation is disabled.
|
|
30
|
+
*/
|
|
12
31
|
export declare const useParallelTs: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* When `NG_BUILD_DEBUG_PERF` is enabled, performance debugging information is printed.
|
|
34
|
+
*/
|
|
13
35
|
export declare const debugPerformance: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* When `NG_BUILD_WATCH_ROOT` is enabled, the build will watch the root directory for changes.
|
|
38
|
+
*/
|
|
14
39
|
export declare const shouldWatchRoot: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* When `NG_BUILD_TYPE_CHECK` is set to `0` or `false`, type checking is disabled.
|
|
42
|
+
*/
|
|
15
43
|
export declare const useTypeChecking: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* When `NG_BUILD_LOGS_JSON` is enabled, build logs will be output in JSON format.
|
|
46
|
+
*/
|
|
16
47
|
export declare const useJSONBuildLogs: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* When `NG_BUILD_OPTIMIZE_CHUNKS` is enabled, the build will optimize chunks.
|
|
50
|
+
*/
|
|
17
51
|
export declare const shouldOptimizeChunks: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* When `NG_HMR_CSTYLES` is enabled, component styles will be hot-reloaded.
|
|
54
|
+
*/
|
|
18
55
|
export declare const useComponentStyleHmr: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* When `NG_HMR_TEMPLATES` is set to `0` or `false`, component templates will not be hot-reloaded.
|
|
58
|
+
*/
|
|
19
59
|
export declare const useComponentTemplateHmr: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* When `NG_BUILD_PARTIAL_SSR` is enabled, a partial server-side rendering build will be performed.
|
|
62
|
+
*/
|
|
20
63
|
export declare const usePartialSsrBuild: boolean;
|
|
@@ -9,19 +9,42 @@
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.usePartialSsrBuild = exports.useComponentTemplateHmr = exports.useComponentStyleHmr = exports.shouldOptimizeChunks = exports.useJSONBuildLogs = exports.useTypeChecking = exports.shouldWatchRoot = exports.debugPerformance = exports.useParallelTs = exports.maxWorkers = exports.allowMinify = exports.shouldBeautify = exports.allowMangle = void 0;
|
|
11
11
|
const node_os_1 = require("node:os");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
/** A set of strings that are considered "truthy" when parsing environment variables. */
|
|
13
|
+
const TRUTHY_VALUES = new Set(['1', 'true']);
|
|
14
|
+
/** A set of strings that are considered "falsy" when parsing environment variables. */
|
|
15
|
+
const FALSY_VALUES = new Set(['0', 'false']);
|
|
16
|
+
/**
|
|
17
|
+
* Checks if an environment variable is present and has a non-empty value.
|
|
18
|
+
* @param variable The environment variable to check.
|
|
19
|
+
* @returns `true` if the variable is a non-empty string.
|
|
20
|
+
*/
|
|
18
21
|
function isPresent(variable) {
|
|
19
22
|
return typeof variable === 'string' && variable !== '';
|
|
20
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Parses an environment variable into a boolean or undefined.
|
|
26
|
+
* @returns `true` if the variable is truthy ('1', 'true').
|
|
27
|
+
* @returns `false` if the variable is falsy ('0', 'false').
|
|
28
|
+
* @returns `undefined` if the variable is not present or has an unknown value.
|
|
29
|
+
*/
|
|
30
|
+
function parseTristate(variable) {
|
|
31
|
+
if (!isPresent(variable)) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const value = variable.toLowerCase();
|
|
35
|
+
if (TRUTHY_VALUES.has(value)) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (FALSY_VALUES.has(value)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
// TODO: Consider whether a warning is useful in this case of a malformed value
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
21
44
|
// Optimization and mangling
|
|
22
45
|
const debugOptimizeVariable = process.env['NG_BUILD_DEBUG_OPTIMIZE'];
|
|
23
46
|
const debugOptimize = (() => {
|
|
24
|
-
if (!isPresent(debugOptimizeVariable) ||
|
|
47
|
+
if (!isPresent(debugOptimizeVariable) || parseTristate(debugOptimizeVariable) === false) {
|
|
25
48
|
return {
|
|
26
49
|
mangle: true,
|
|
27
50
|
minify: true,
|
|
@@ -33,7 +56,7 @@ const debugOptimize = (() => {
|
|
|
33
56
|
minify: false,
|
|
34
57
|
beautify: true,
|
|
35
58
|
};
|
|
36
|
-
if (
|
|
59
|
+
if (parseTristate(debugOptimizeVariable) === true) {
|
|
37
60
|
return debugValue;
|
|
38
61
|
}
|
|
39
62
|
for (const part of debugOptimizeVariable.split(',')) {
|
|
@@ -51,11 +74,20 @@ const debugOptimize = (() => {
|
|
|
51
74
|
}
|
|
52
75
|
return debugValue;
|
|
53
76
|
})();
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
77
|
+
/**
|
|
78
|
+
* Allows disabling of code mangling when the `NG_BUILD_MANGLE` environment variable is set to `0` or `false`.
|
|
79
|
+
* This is useful for debugging build output.
|
|
80
|
+
*/
|
|
81
|
+
exports.allowMangle = parseTristate(process.env['NG_BUILD_MANGLE']) ?? debugOptimize.mangle;
|
|
82
|
+
/**
|
|
83
|
+
* Allows beautification of build output when the `NG_BUILD_DEBUG_OPTIMIZE` environment variable is enabled.
|
|
84
|
+
* This is useful for debugging build output.
|
|
85
|
+
*/
|
|
58
86
|
exports.shouldBeautify = debugOptimize.beautify;
|
|
87
|
+
/**
|
|
88
|
+
* Allows disabling of code minification when the `NG_BUILD_DEBUG_OPTIMIZE` environment variable is enabled.
|
|
89
|
+
* This is useful for debugging build output.
|
|
90
|
+
*/
|
|
59
91
|
exports.allowMinify = debugOptimize.minify;
|
|
60
92
|
/**
|
|
61
93
|
* Some environments, like CircleCI which use Docker report a number of CPUs by the host and not the count of available.
|
|
@@ -67,24 +99,46 @@ exports.allowMinify = debugOptimize.minify;
|
|
|
67
99
|
*
|
|
68
100
|
*/
|
|
69
101
|
const maxWorkersVariable = process.env['NG_BUILD_MAX_WORKERS'];
|
|
102
|
+
/**
|
|
103
|
+
* The maximum number of workers to use for parallel processing.
|
|
104
|
+
* This can be controlled by the `NG_BUILD_MAX_WORKERS` environment variable.
|
|
105
|
+
*/
|
|
70
106
|
exports.maxWorkers = isPresent(maxWorkersVariable)
|
|
71
107
|
? +maxWorkersVariable
|
|
72
108
|
: Math.min(4, Math.max((0, node_os_1.availableParallelism)() - 1, 1));
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
exports.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
exports.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
exports.
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
exports.
|
|
89
|
-
|
|
90
|
-
|
|
109
|
+
/**
|
|
110
|
+
* When `NG_BUILD_PARALLEL_TS` is set to `0` or `false`, parallel TypeScript compilation is disabled.
|
|
111
|
+
*/
|
|
112
|
+
exports.useParallelTs = parseTristate(process.env['NG_BUILD_PARALLEL_TS']) !== false;
|
|
113
|
+
/**
|
|
114
|
+
* When `NG_BUILD_DEBUG_PERF` is enabled, performance debugging information is printed.
|
|
115
|
+
*/
|
|
116
|
+
exports.debugPerformance = parseTristate(process.env['NG_BUILD_DEBUG_PERF']) === true;
|
|
117
|
+
/**
|
|
118
|
+
* When `NG_BUILD_WATCH_ROOT` is enabled, the build will watch the root directory for changes.
|
|
119
|
+
*/
|
|
120
|
+
exports.shouldWatchRoot = parseTristate(process.env['NG_BUILD_WATCH_ROOT']) === true;
|
|
121
|
+
/**
|
|
122
|
+
* When `NG_BUILD_TYPE_CHECK` is set to `0` or `false`, type checking is disabled.
|
|
123
|
+
*/
|
|
124
|
+
exports.useTypeChecking = parseTristate(process.env['NG_BUILD_TYPE_CHECK']) !== false;
|
|
125
|
+
/**
|
|
126
|
+
* When `NG_BUILD_LOGS_JSON` is enabled, build logs will be output in JSON format.
|
|
127
|
+
*/
|
|
128
|
+
exports.useJSONBuildLogs = parseTristate(process.env['NG_BUILD_LOGS_JSON']) === true;
|
|
129
|
+
/**
|
|
130
|
+
* When `NG_BUILD_OPTIMIZE_CHUNKS` is enabled, the build will optimize chunks.
|
|
131
|
+
*/
|
|
132
|
+
exports.shouldOptimizeChunks = parseTristate(process.env['NG_BUILD_OPTIMIZE_CHUNKS']) === true;
|
|
133
|
+
/**
|
|
134
|
+
* When `NG_HMR_CSTYLES` is enabled, component styles will be hot-reloaded.
|
|
135
|
+
*/
|
|
136
|
+
exports.useComponentStyleHmr = parseTristate(process.env['NG_HMR_CSTYLES']) === true;
|
|
137
|
+
/**
|
|
138
|
+
* When `NG_HMR_TEMPLATES` is set to `0` or `false`, component templates will not be hot-reloaded.
|
|
139
|
+
*/
|
|
140
|
+
exports.useComponentTemplateHmr = parseTristate(process.env['NG_HMR_TEMPLATES']) !== false;
|
|
141
|
+
/**
|
|
142
|
+
* When `NG_BUILD_PARTIAL_SSR` is enabled, a partial server-side rendering build will be performed.
|
|
143
|
+
*/
|
|
144
|
+
exports.usePartialSsrBuild = parseTristate(process.env['NG_BUILD_PARTIAL_SSR']) === true;
|
|
@@ -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 = '
|
|
13
|
+
const VERSION = '21.0.0-next.0';
|
|
14
14
|
function hasCacheMetadata(value) {
|
|
15
15
|
return (!!value &&
|
|
16
16
|
typeof value === 'object' &&
|
package/src/utils/version.js
CHANGED
|
@@ -28,7 +28,7 @@ function assertCompatibleAngularVersion(projectRoot) {
|
|
|
28
28
|
'This likely indicates a corrupted local installation. Please try reinstalling your packages.');
|
|
29
29
|
process.exit(2);
|
|
30
30
|
}
|
|
31
|
-
const supportedAngularSemver = '^
|
|
31
|
+
const supportedAngularSemver = '^21.0.0-next.0';
|
|
32
32
|
if (angularPkgJson['version'] === '0.0.0' || supportedAngularSemver.startsWith('0.0.0')) {
|
|
33
33
|
// Internal CLI and FW testing version.
|
|
34
34
|
return;
|
|
@@ -1,42 +0,0 @@
|
|
|
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 type { BuilderContext } from '@angular-devkit/architect';
|
|
9
|
-
import type { Plugin } from 'esbuild';
|
|
10
|
-
import type { Connect, InlineConfig } from 'vite';
|
|
11
|
-
import type { ComponentStyleRecord } from '../../tools/vite/middlewares';
|
|
12
|
-
import { ServerSsrMode } from '../../tools/vite/plugins';
|
|
13
|
-
import { EsbuildLoaderOption } from '../../tools/vite/utils';
|
|
14
|
-
import { Result } from '../application/results';
|
|
15
|
-
import { type ApplicationBuilderInternalOptions, BuildOutputFileType, type ExternalResultMetadata, JavaScriptTransformer } from './internal';
|
|
16
|
-
import type { NormalizedDevServerOptions } from './options';
|
|
17
|
-
import type { DevServerBuilderOutput } from './output';
|
|
18
|
-
interface OutputFileRecord {
|
|
19
|
-
contents: Uint8Array;
|
|
20
|
-
size: number;
|
|
21
|
-
hash: string;
|
|
22
|
-
updated: boolean;
|
|
23
|
-
servable: boolean;
|
|
24
|
-
type: BuildOutputFileType;
|
|
25
|
-
}
|
|
26
|
-
interface OutputAssetRecord {
|
|
27
|
-
source: string;
|
|
28
|
-
updated: boolean;
|
|
29
|
-
}
|
|
30
|
-
interface DevServerExternalResultMetadata extends Omit<ExternalResultMetadata, 'explicit'> {
|
|
31
|
-
explicitBrowser: string[];
|
|
32
|
-
explicitServer: string[];
|
|
33
|
-
}
|
|
34
|
-
export type BuilderAction = (options: ApplicationBuilderInternalOptions, context: BuilderContext, plugins?: Plugin[]) => AsyncIterable<Result>;
|
|
35
|
-
export declare function serveWithVite(serverOptions: NormalizedDevServerOptions, builderName: string, builderAction: BuilderAction, context: BuilderContext, transformers?: {
|
|
36
|
-
indexHtml?: (content: string) => Promise<string>;
|
|
37
|
-
}, extensions?: {
|
|
38
|
-
middleware?: Connect.NextHandleFunction[];
|
|
39
|
-
buildPlugins?: Plugin[];
|
|
40
|
-
}): AsyncIterableIterator<DevServerBuilderOutput>;
|
|
41
|
-
export declare function setupServer(serverOptions: NormalizedDevServerOptions, outputFiles: Map<string, OutputFileRecord>, assets: Map<string, OutputAssetRecord>, preserveSymlinks: boolean | undefined, externalMetadata: DevServerExternalResultMetadata, ssrMode: ServerSsrMode, prebundleTransformer: JavaScriptTransformer, target: string[], zoneless: boolean, componentStyles: Map<string, ComponentStyleRecord>, templateUpdates: Map<string, string>, prebundleLoaderExtensions: EsbuildLoaderOption | undefined, define: ApplicationBuilderInternalOptions['define'], extensionMiddleware?: Connect.NextHandleFunction[], indexHtmlTransformer?: (content: string) => Promise<string>, thirdPartySourcemaps?: boolean): Promise<InlineConfig>;
|
|
42
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
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 type { BuilderContext, BuilderOutput } from '@angular-devkit/architect';
|
|
9
|
-
import { type NormalizedUnitTestBuilderOptions } from './options';
|
|
10
|
-
export declare function useKarmaBuilder(context: BuilderContext, unitTestOptions: NormalizedUnitTestBuilderOptions): Promise<AsyncIterable<BuilderOutput>>;
|
|
@@ -1,82 +0,0 @@
|
|
|
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
-
}
|
|
15
|
-
Object.defineProperty(o, k2, desc);
|
|
16
|
-
}) : (function(o, m, k, k2) {
|
|
17
|
-
if (k2 === undefined) k2 = k;
|
|
18
|
-
o[k2] = m[k];
|
|
19
|
-
}));
|
|
20
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
-
}) : function(o, v) {
|
|
23
|
-
o["default"] = v;
|
|
24
|
-
});
|
|
25
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
-
var ownKeys = function(o) {
|
|
27
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
-
var ar = [];
|
|
29
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
-
return ar;
|
|
31
|
-
};
|
|
32
|
-
return ownKeys(o);
|
|
33
|
-
};
|
|
34
|
-
return function (mod) {
|
|
35
|
-
if (mod && mod.__esModule) return mod;
|
|
36
|
-
var result = {};
|
|
37
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
-
__setModuleDefault(result, mod);
|
|
39
|
-
return result;
|
|
40
|
-
};
|
|
41
|
-
})();
|
|
42
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.useKarmaBuilder = useKarmaBuilder;
|
|
44
|
-
const options_1 = require("./options");
|
|
45
|
-
async function useKarmaBuilder(context, unitTestOptions) {
|
|
46
|
-
if (unitTestOptions.debug) {
|
|
47
|
-
context.logger.warn('The "karma" test runner does not support the "debug" option. The option will be ignored.');
|
|
48
|
-
}
|
|
49
|
-
if (unitTestOptions.setupFiles.length) {
|
|
50
|
-
context.logger.warn('The "karma" test runner does not support the "setupFiles" option. The option will be ignored.');
|
|
51
|
-
}
|
|
52
|
-
const buildTargetOptions = (await context.validateOptions(await context.getTargetOptions(unitTestOptions.buildTarget), await context.getBuilderNameForTarget(unitTestOptions.buildTarget)));
|
|
53
|
-
buildTargetOptions.polyfills = (0, options_1.injectTestingPolyfills)(buildTargetOptions.polyfills);
|
|
54
|
-
const options = {
|
|
55
|
-
tsConfig: unitTestOptions.tsConfig,
|
|
56
|
-
polyfills: buildTargetOptions.polyfills,
|
|
57
|
-
assets: buildTargetOptions.assets,
|
|
58
|
-
scripts: buildTargetOptions.scripts,
|
|
59
|
-
styles: buildTargetOptions.styles,
|
|
60
|
-
inlineStyleLanguage: buildTargetOptions.inlineStyleLanguage,
|
|
61
|
-
stylePreprocessorOptions: buildTargetOptions.stylePreprocessorOptions,
|
|
62
|
-
externalDependencies: buildTargetOptions.externalDependencies,
|
|
63
|
-
loader: buildTargetOptions.loader,
|
|
64
|
-
define: buildTargetOptions.define,
|
|
65
|
-
include: unitTestOptions.include,
|
|
66
|
-
exclude: unitTestOptions.exclude,
|
|
67
|
-
sourceMap: buildTargetOptions.sourceMap,
|
|
68
|
-
progress: buildTargetOptions.progress,
|
|
69
|
-
watch: unitTestOptions.watch,
|
|
70
|
-
poll: buildTargetOptions.poll,
|
|
71
|
-
preserveSymlinks: buildTargetOptions.preserveSymlinks,
|
|
72
|
-
browsers: unitTestOptions.browsers?.join(','),
|
|
73
|
-
codeCoverage: !!unitTestOptions.codeCoverage,
|
|
74
|
-
codeCoverageExclude: unitTestOptions.codeCoverage?.exclude,
|
|
75
|
-
fileReplacements: buildTargetOptions.fileReplacements,
|
|
76
|
-
reporters: unitTestOptions.reporters,
|
|
77
|
-
webWorkerTsConfig: buildTargetOptions.webWorkerTsConfig,
|
|
78
|
-
aot: buildTargetOptions.aot,
|
|
79
|
-
};
|
|
80
|
-
const { execute } = await Promise.resolve().then(() => __importStar(require('../karma')));
|
|
81
|
-
return execute(options, context);
|
|
82
|
-
}
|