@angular/build 22.2.2 → 22.3.0-next.1
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/builders.json +5 -0
- package/package.json +19 -18
- package/src/builders/application/chunk-optimizer.js +2 -1
- package/src/builders/application/chunk-optimizer.js.map +1 -1
- package/src/builders/application/options.js +1 -2
- package/src/builders/application/options.js.map +1 -1
- package/src/builders/dev-server/options.js +1 -1
- package/src/builders/dev-server/options.js.map +1 -1
- package/src/builders/dev-server/vite/server.js +1 -1
- package/src/builders/dev-server/vite/server.js.map +1 -1
- package/src/builders/library/builder.d.ts +19 -0
- package/src/builders/library/builder.js +285 -0
- package/src/builders/library/builder.js.map +1 -0
- package/src/builders/library/index.d.ts +13 -0
- package/src/builders/library/index.js +17 -0
- package/src/builders/library/index.js.map +1 -0
- package/src/builders/library/options.d.ts +11 -0
- package/src/builders/library/options.js +107 -0
- package/src/builders/library/options.js.map +1 -0
- package/src/builders/library/pipeline/assets.d.ts +18 -0
- package/src/builders/library/pipeline/assets.js +67 -0
- package/src/builders/library/pipeline/assets.js.map +1 -0
- package/src/builders/library/pipeline/build-action.d.ts +56 -0
- package/src/builders/library/pipeline/build-action.js +170 -0
- package/src/builders/library/pipeline/build-action.js.map +1 -0
- package/src/builders/library/pipeline/bundler.d.ts +44 -0
- package/src/builders/library/pipeline/bundler.js +336 -0
- package/src/builders/library/pipeline/bundler.js.map +1 -0
- package/src/builders/library/pipeline/compilation.d.ts +39 -0
- package/src/builders/library/pipeline/compilation.js +197 -0
- package/src/builders/library/pipeline/compilation.js.map +1 -0
- package/src/builders/library/pipeline/entry-points.d.ts +34 -0
- package/src/builders/library/pipeline/entry-points.js +194 -0
- package/src/builders/library/pipeline/entry-points.js.map +1 -0
- package/src/builders/library/pipeline/package-manifests.d.ts +17 -0
- package/src/builders/library/pipeline/package-manifests.js +119 -0
- package/src/builders/library/pipeline/package-manifests.js.map +1 -0
- package/src/builders/library/pipeline/stylesheet-bundler.d.ts +19 -0
- package/src/builders/library/pipeline/stylesheet-bundler.js +39 -0
- package/src/builders/library/pipeline/stylesheet-bundler.js.map +1 -0
- package/src/builders/library/pipeline/types.d.ts +54 -0
- package/src/builders/library/pipeline/utils.d.ts +69 -0
- package/src/builders/library/pipeline/utils.js +73 -0
- package/src/builders/library/pipeline/utils.js.map +1 -0
- package/src/builders/library/schema.d.ts +149 -0
- package/src/builders/library/schema.js +26 -0
- package/src/builders/library/schema.js.map +1 -0
- package/src/builders/library/schema.json +168 -0
- package/src/builders/library/types.d.ts +125 -0
- package/src/builders/library/types.js +10 -0
- package/src/builders/library/types.js.map +1 -0
- package/src/builders/ng-packagr/builder.js +2 -2
- package/src/builders/ng-packagr/builder.js.map +1 -1
- package/src/builders/unit-test/builder.js +25 -3
- package/src/builders/unit-test/builder.js.map +1 -1
- package/src/builders/unit-test/options.d.ts +1 -0
- package/src/builders/unit-test/options.js +3 -3
- package/src/builders/unit-test/options.js.map +1 -1
- package/src/builders/unit-test/runners/api.d.ts +1 -1
- package/src/builders/unit-test/runners/karma/executor.js +1 -1
- package/src/builders/unit-test/runners/karma/executor.js.map +1 -1
- package/src/builders/unit-test/runners/vitest/build-options.d.ts +8 -2
- package/src/builders/unit-test/runners/vitest/build-options.js +21 -45
- package/src/builders/unit-test/runners/vitest/build-options.js.map +1 -1
- package/src/builders/unit-test/runners/vitest/index.js +2 -2
- package/src/builders/unit-test/runners/vitest/index.js.map +1 -1
- package/src/builders/unit-test/schema.d.ts +6 -0
- package/src/builders/unit-test/schema.js.map +1 -1
- package/src/builders/unit-test/schema.json +8 -0
- package/src/tools/angular/compilation/angular-compilation.d.ts +2 -1
- package/src/tools/angular/compilation/angular-compilation.js.map +1 -1
- package/src/tools/angular/compilation/aot-compilation.d.ts +1 -1
- package/src/tools/angular/compilation/aot-compilation.js +20 -11
- package/src/tools/angular/compilation/aot-compilation.js.map +1 -1
- package/src/tools/angular/compilation/compiler-options.d.ts +4 -1
- package/src/tools/angular/compilation/compiler-options.js +24 -7
- package/src/tools/angular/compilation/compiler-options.js.map +1 -1
- package/src/tools/angular/compilation/jit-compilation.d.ts +1 -1
- package/src/tools/angular/compilation/jit-compilation.js +2 -2
- package/src/tools/angular/compilation/jit-compilation.js.map +1 -1
- package/src/tools/angular/compilation/parallel-compilation.d.ts +1 -1
- package/src/tools/angular/compilation/parallel-compilation.js +2 -1
- package/src/tools/angular/compilation/parallel-compilation.js.map +1 -1
- package/src/tools/angular/compilation/parallel-worker.d.ts +1 -0
- package/src/tools/angular/compilation/parallel-worker.js +2 -1
- package/src/tools/angular/compilation/parallel-worker.js.map +1 -1
- package/src/tools/angular/compilation/typescript-compilation.d.ts +1 -1
- package/src/tools/angular/compilation/typescript-compilation.js +2 -2
- package/src/tools/angular/compilation/typescript-compilation.js.map +1 -1
- package/src/tools/esbuild/stylesheets/stylesheet-cache-key.d.ts +1 -0
- package/src/tools/esbuild/stylesheets/stylesheet-cache-key.js +2 -0
- package/src/tools/esbuild/stylesheets/stylesheet-cache-key.js.map +1 -1
- package/src/utils/load-rolldown.d.ts +27 -0
- package/src/utils/load-rolldown.js +79 -0
- package/src/utils/load-rolldown.js.map +1 -0
- package/src/utils/normalize-cache.d.ts +14 -1
- package/src/utils/normalize-cache.js +18 -4
- package/src/utils/normalize-cache.js.map +1 -1
- package/src/utils/resolve-assets.js +1 -1
- package/src/utils/resolve-assets.js.map +1 -1
- package/src/utils/version.js +1 -1
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Library builder target options for Build Architect. Builds an Angular library package
|
|
3
|
+
* conforming to the Angular Package Format (APF).
|
|
4
|
+
*/
|
|
5
|
+
export type Schema = {
|
|
6
|
+
/**
|
|
7
|
+
* A list of package names allowed in the 'dependencies' and 'optionalDependencies' sections
|
|
8
|
+
* of package.json. Values can be regular expression patterns.
|
|
9
|
+
*/
|
|
10
|
+
allowedNonPeerDependencies?: string[];
|
|
11
|
+
/**
|
|
12
|
+
* Define the assets to be copied to the output directory. These assets are copied as-is
|
|
13
|
+
* without any further processing or hashing.
|
|
14
|
+
*/
|
|
15
|
+
assets?: AssetPattern[];
|
|
16
|
+
/**
|
|
17
|
+
* Automatically clear the terminal screen during rebuilds.
|
|
18
|
+
*/
|
|
19
|
+
clearScreen?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Angular compilation mode. Use 'partial' when publishing to npm (APF requirement). Use
|
|
22
|
+
* 'full' only during development or for private, internal monorepo packages that are never
|
|
23
|
+
* published.
|
|
24
|
+
*/
|
|
25
|
+
compilationMode?: CompilationMode;
|
|
26
|
+
/**
|
|
27
|
+
* Generates a sourcemap for each corresponding '.d.ts' file.
|
|
28
|
+
*/
|
|
29
|
+
declarationMap?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Delete the output path before building.
|
|
32
|
+
*/
|
|
33
|
+
deleteOutputPath?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The stylesheet language to use for the library's inline component styles.
|
|
36
|
+
*/
|
|
37
|
+
inlineStyleLanguage?: InlineStyleLanguage;
|
|
38
|
+
/**
|
|
39
|
+
* Enable this to keep the 'scripts' section in the published package.json.
|
|
40
|
+
*/
|
|
41
|
+
keepLifecycleScripts?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Specify the output directory for the built package, relative to the workspace root.
|
|
44
|
+
*/
|
|
45
|
+
outputPath?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Enable and define the file watching poll time period in milliseconds.
|
|
48
|
+
*/
|
|
49
|
+
poll?: number;
|
|
50
|
+
/**
|
|
51
|
+
* Do not use the real path when resolving modules. If unset then will default to `true` if
|
|
52
|
+
* NodeJS option --preserve-symlinks is set.
|
|
53
|
+
*/
|
|
54
|
+
preserveSymlinks?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Log progress to the console while building.
|
|
57
|
+
*/
|
|
58
|
+
progress?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Options to pass to style preprocessors.
|
|
61
|
+
*/
|
|
62
|
+
stylePreprocessorOptions?: StylePreprocessorOptions;
|
|
63
|
+
/**
|
|
64
|
+
* The full path for the TypeScript configuration file, relative to the current workspace
|
|
65
|
+
* root.
|
|
66
|
+
*/
|
|
67
|
+
tsConfig: string;
|
|
68
|
+
/**
|
|
69
|
+
* Run build when files change.
|
|
70
|
+
*/
|
|
71
|
+
watch?: boolean;
|
|
72
|
+
};
|
|
73
|
+
export type AssetPattern = AssetPatternClass | string;
|
|
74
|
+
export type AssetPatternClass = {
|
|
75
|
+
/**
|
|
76
|
+
* Allow glob patterns to follow symlink directories. This allows subdirectories of the
|
|
77
|
+
* symlink to be searched.
|
|
78
|
+
*/
|
|
79
|
+
followSymlinks?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* The pattern to match.
|
|
82
|
+
*/
|
|
83
|
+
glob: string;
|
|
84
|
+
/**
|
|
85
|
+
* An array of globs to ignore.
|
|
86
|
+
*/
|
|
87
|
+
ignore?: string[];
|
|
88
|
+
/**
|
|
89
|
+
* The input directory path in which to apply 'glob'. Defaults to the project root.
|
|
90
|
+
*/
|
|
91
|
+
input: string;
|
|
92
|
+
/**
|
|
93
|
+
* Absolute path within the output.
|
|
94
|
+
*/
|
|
95
|
+
output?: string;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Angular compilation mode. Use 'partial' when publishing to npm (APF requirement). Use
|
|
99
|
+
* 'full' only during development or for private, internal monorepo packages that are never
|
|
100
|
+
* published.
|
|
101
|
+
*/
|
|
102
|
+
export declare enum CompilationMode {
|
|
103
|
+
Full = "full",
|
|
104
|
+
Partial = "partial"
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The stylesheet language to use for the library's inline component styles.
|
|
108
|
+
*/
|
|
109
|
+
export declare enum InlineStyleLanguage {
|
|
110
|
+
Css = "css",
|
|
111
|
+
Less = "less",
|
|
112
|
+
Sass = "sass",
|
|
113
|
+
Scss = "scss"
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Options to pass to style preprocessors.
|
|
117
|
+
*/
|
|
118
|
+
export type StylePreprocessorOptions = {
|
|
119
|
+
/**
|
|
120
|
+
* Paths to include. Paths will be resolved to workspace root.
|
|
121
|
+
*/
|
|
122
|
+
includePaths?: string[];
|
|
123
|
+
/**
|
|
124
|
+
* Options to pass to the sass preprocessor.
|
|
125
|
+
*/
|
|
126
|
+
sass?: Sass;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Options to pass to the sass preprocessor.
|
|
130
|
+
*/
|
|
131
|
+
export type Sass = {
|
|
132
|
+
/**
|
|
133
|
+
* A set of deprecations to treat as fatal. If a deprecation warning of any provided type is
|
|
134
|
+
* encountered during compilation, the compiler will error instead. If a Version is
|
|
135
|
+
* provided, then all deprecations that were active in that compiler version will be treated
|
|
136
|
+
* as fatal.
|
|
137
|
+
*/
|
|
138
|
+
fatalDeprecations?: string[];
|
|
139
|
+
/**
|
|
140
|
+
* A set of future deprecations to opt into early. Future deprecations passed here will be
|
|
141
|
+
* treated as active by the compiler, emitting warnings as necessary.
|
|
142
|
+
*/
|
|
143
|
+
futureDeprecations?: string[];
|
|
144
|
+
/**
|
|
145
|
+
* A set of active deprecations to ignore. If a deprecation warning of any provided type is
|
|
146
|
+
* encountered during compilation, the compiler will ignore it instead.
|
|
147
|
+
*/
|
|
148
|
+
silenceDeprecations?: string[];
|
|
149
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// THIS FILE IS AUTOMATICALLY GENERATED. TO UPDATE THIS FILE YOU NEED TO CHANGE THE
|
|
3
|
+
// CORRESPONDING JSON SCHEMA FILE, THEN RUN devkit-admin build (or bazel build ...).
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.InlineStyleLanguage = exports.CompilationMode = void 0;
|
|
6
|
+
/**
|
|
7
|
+
* Angular compilation mode. Use 'partial' when publishing to npm (APF requirement). Use
|
|
8
|
+
* 'full' only during development or for private, internal monorepo packages that are never
|
|
9
|
+
* published.
|
|
10
|
+
*/
|
|
11
|
+
var CompilationMode;
|
|
12
|
+
(function (CompilationMode) {
|
|
13
|
+
CompilationMode["Full"] = "full";
|
|
14
|
+
CompilationMode["Partial"] = "partial";
|
|
15
|
+
})(CompilationMode || (exports.CompilationMode = CompilationMode = {}));
|
|
16
|
+
/**
|
|
17
|
+
* The stylesheet language to use for the library's inline component styles.
|
|
18
|
+
*/
|
|
19
|
+
var InlineStyleLanguage;
|
|
20
|
+
(function (InlineStyleLanguage) {
|
|
21
|
+
InlineStyleLanguage["Css"] = "css";
|
|
22
|
+
InlineStyleLanguage["Less"] = "less";
|
|
23
|
+
InlineStyleLanguage["Sass"] = "sass";
|
|
24
|
+
InlineStyleLanguage["Scss"] = "scss";
|
|
25
|
+
})(InlineStyleLanguage || (exports.InlineStyleLanguage = InlineStyleLanguage = {}));
|
|
26
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":";AACA,mFAAmF;AACnF,oFAAoF;;;AAqGpF;;;;GAIG;AACH,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,sCAAmB,CAAA;AACvB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B;AAED;;GAEG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,oCAAa,CAAA;IACb,oCAAa,CAAA;AACjB,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema",
|
|
3
|
+
"title": "Library builder target options",
|
|
4
|
+
"description": "Library builder target options for Build Architect. Builds an Angular library package conforming to the Angular Package Format (APF).",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"tsConfig": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The full path for the TypeScript configuration file, relative to the current workspace root."
|
|
10
|
+
},
|
|
11
|
+
"outputPath": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Specify the output directory for the built package, relative to the workspace root."
|
|
14
|
+
},
|
|
15
|
+
"assets": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"description": "Define the assets to be copied to the output directory. These assets are copied as-is without any further processing or hashing.",
|
|
18
|
+
"default": [],
|
|
19
|
+
"items": {
|
|
20
|
+
"$ref": "#/definitions/assetPattern"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"inlineStyleLanguage": {
|
|
24
|
+
"description": "The stylesheet language to use for the library's inline component styles.",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"default": "css",
|
|
27
|
+
"enum": ["css", "less", "sass", "scss"]
|
|
28
|
+
},
|
|
29
|
+
"stylePreprocessorOptions": {
|
|
30
|
+
"description": "Options to pass to style preprocessors.",
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"includePaths": {
|
|
34
|
+
"description": "Paths to include. Paths will be resolved to workspace root.",
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"default": []
|
|
40
|
+
},
|
|
41
|
+
"sass": {
|
|
42
|
+
"description": "Options to pass to the sass preprocessor.",
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"fatalDeprecations": {
|
|
46
|
+
"description": "A set of deprecations to treat as fatal. If a deprecation warning of any provided type is encountered during compilation, the compiler will error instead. If a Version is provided, then all deprecations that were active in that compiler version will be treated as fatal.",
|
|
47
|
+
"type": "array",
|
|
48
|
+
"items": {
|
|
49
|
+
"type": "string"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"silenceDeprecations": {
|
|
53
|
+
"description": " A set of active deprecations to ignore. If a deprecation warning of any provided type is encountered during compilation, the compiler will ignore it instead.",
|
|
54
|
+
"type": "array",
|
|
55
|
+
"items": {
|
|
56
|
+
"type": "string"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"futureDeprecations": {
|
|
60
|
+
"description": "A set of future deprecations to opt into early. Future deprecations passed here will be treated as active by the compiler, emitting warnings as necessary.",
|
|
61
|
+
"type": "array",
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "string"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"additionalProperties": false
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": false
|
|
71
|
+
},
|
|
72
|
+
"declarationMap": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"description": "Generates a sourcemap for each corresponding '.d.ts' file.",
|
|
75
|
+
"default": false
|
|
76
|
+
},
|
|
77
|
+
"compilationMode": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "Angular compilation mode. Use 'partial' when publishing to npm (APF requirement). Use 'full' only during development or for private, internal monorepo packages that are never published.",
|
|
80
|
+
"enum": ["partial", "full"],
|
|
81
|
+
"default": "partial"
|
|
82
|
+
},
|
|
83
|
+
"allowedNonPeerDependencies": {
|
|
84
|
+
"description": "A list of package names allowed in the 'dependencies' and 'optionalDependencies' sections of package.json. Values can be regular expression patterns.",
|
|
85
|
+
"type": "array",
|
|
86
|
+
"items": {
|
|
87
|
+
"type": "string"
|
|
88
|
+
},
|
|
89
|
+
"default": []
|
|
90
|
+
},
|
|
91
|
+
"keepLifecycleScripts": {
|
|
92
|
+
"description": "Enable this to keep the 'scripts' section in the published package.json.",
|
|
93
|
+
"type": "boolean",
|
|
94
|
+
"default": false
|
|
95
|
+
},
|
|
96
|
+
"deleteOutputPath": {
|
|
97
|
+
"type": "boolean",
|
|
98
|
+
"description": "Delete the output path before building.",
|
|
99
|
+
"default": true
|
|
100
|
+
},
|
|
101
|
+
"watch": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"description": "Run build when files change.",
|
|
104
|
+
"default": false
|
|
105
|
+
},
|
|
106
|
+
"poll": {
|
|
107
|
+
"type": "number",
|
|
108
|
+
"description": "Enable and define the file watching poll time period in milliseconds."
|
|
109
|
+
},
|
|
110
|
+
"preserveSymlinks": {
|
|
111
|
+
"type": "boolean",
|
|
112
|
+
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
|
|
113
|
+
},
|
|
114
|
+
"progress": {
|
|
115
|
+
"type": "boolean",
|
|
116
|
+
"description": "Log progress to the console while building.",
|
|
117
|
+
"default": true
|
|
118
|
+
},
|
|
119
|
+
"clearScreen": {
|
|
120
|
+
"type": "boolean",
|
|
121
|
+
"default": false,
|
|
122
|
+
"description": "Automatically clear the terminal screen during rebuilds."
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"additionalProperties": false,
|
|
126
|
+
"required": ["tsConfig"],
|
|
127
|
+
"definitions": {
|
|
128
|
+
"assetPattern": {
|
|
129
|
+
"oneOf": [
|
|
130
|
+
{
|
|
131
|
+
"type": "object",
|
|
132
|
+
"properties": {
|
|
133
|
+
"followSymlinks": {
|
|
134
|
+
"type": "boolean",
|
|
135
|
+
"default": false,
|
|
136
|
+
"description": "Allow glob patterns to follow symlink directories. This allows subdirectories of the symlink to be searched."
|
|
137
|
+
},
|
|
138
|
+
"glob": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"description": "The pattern to match."
|
|
141
|
+
},
|
|
142
|
+
"input": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "The input directory path in which to apply 'glob'. Defaults to the project root."
|
|
145
|
+
},
|
|
146
|
+
"ignore": {
|
|
147
|
+
"description": "An array of globs to ignore.",
|
|
148
|
+
"type": "array",
|
|
149
|
+
"items": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"output": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"default": "",
|
|
156
|
+
"description": "Absolute path within the output."
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"additionalProperties": false,
|
|
160
|
+
"required": ["glob", "input"]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "string"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
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 { AngularCompilation } from '../../tools/angular/compilation';
|
|
9
|
+
import type { StylesheetPluginsass } from '../../tools/esbuild/stylesheets/stylesheet-plugin-factory';
|
|
10
|
+
import type { normalizeAssetPatterns } from '../../utils';
|
|
11
|
+
import type { normalizeCacheOptions } from '../../utils/normalize-cache';
|
|
12
|
+
import type { PostcssConfiguration } from '../../utils/postcss-configuration';
|
|
13
|
+
/**
|
|
14
|
+
* Normalized representation of an entry point in the library.
|
|
15
|
+
*/
|
|
16
|
+
export interface NormalizedEntryPoint {
|
|
17
|
+
/** The subpath in package.json exports (e.g. '.' or './testing'). */
|
|
18
|
+
subpath: string;
|
|
19
|
+
/** Subpath name without leading './' (e.g. '.' or 'testing'). */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Display name of the entry point (e.g. '@my/lib' or '@my/lib/testing'). */
|
|
22
|
+
displayName: string;
|
|
23
|
+
/** Base name of the output bundle (e.g. 'my-lib' or 'my-lib-testing'). */
|
|
24
|
+
bundleName: string;
|
|
25
|
+
/** Absolute path to entry file. */
|
|
26
|
+
entryFilePath: string;
|
|
27
|
+
/** Is this the primary entry point ('.')? */
|
|
28
|
+
isPrimary: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Partial package.json data structure for library packaging.
|
|
32
|
+
*/
|
|
33
|
+
export interface PackageJsonData {
|
|
34
|
+
name: string;
|
|
35
|
+
version?: string;
|
|
36
|
+
type?: string;
|
|
37
|
+
main?: string;
|
|
38
|
+
module?: string;
|
|
39
|
+
typings?: string;
|
|
40
|
+
types?: string;
|
|
41
|
+
sideEffects?: boolean | string[];
|
|
42
|
+
exports?: string | unknown[] | Record<string, unknown>;
|
|
43
|
+
scripts?: Record<string, string>;
|
|
44
|
+
workspaces?: unknown;
|
|
45
|
+
dependencies?: Record<string, string>;
|
|
46
|
+
optionalDependencies?: Record<string, string>;
|
|
47
|
+
peerDependencies?: Record<string, string>;
|
|
48
|
+
peerDependenciesMeta?: Record<string, {
|
|
49
|
+
optional?: boolean;
|
|
50
|
+
}>;
|
|
51
|
+
[key: string]: unknown;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Normalized options for the library builder.
|
|
55
|
+
*/
|
|
56
|
+
export interface NormalizedLibraryOptions {
|
|
57
|
+
workspaceRoot: string;
|
|
58
|
+
projectRoot: string;
|
|
59
|
+
packageName: string;
|
|
60
|
+
packageJson: PackageJsonData;
|
|
61
|
+
outputPath: string;
|
|
62
|
+
deleteOutputPath: boolean;
|
|
63
|
+
packageJsonPath: string;
|
|
64
|
+
tsConfigPath: string;
|
|
65
|
+
entryPoints: Map<string, NormalizedEntryPoint>;
|
|
66
|
+
inlineStyleLanguage: 'css' | 'less' | 'sass' | 'scss';
|
|
67
|
+
styleIncludePaths: string[];
|
|
68
|
+
sass?: StylesheetPluginsass;
|
|
69
|
+
assets: ReturnType<typeof normalizeAssetPatterns>;
|
|
70
|
+
compilationMode: 'partial' | 'full';
|
|
71
|
+
declarationMap: boolean;
|
|
72
|
+
allowedNonPeerDependencies: RegExp[];
|
|
73
|
+
keepLifecycleScripts: boolean;
|
|
74
|
+
watch: boolean;
|
|
75
|
+
poll?: number;
|
|
76
|
+
preserveSymlinks: boolean;
|
|
77
|
+
progress: boolean;
|
|
78
|
+
clearScreen?: boolean;
|
|
79
|
+
cacheOptions: ReturnType<typeof normalizeCacheOptions>;
|
|
80
|
+
postcssConfiguration?: {
|
|
81
|
+
config: PostcssConfiguration;
|
|
82
|
+
configPath: string;
|
|
83
|
+
};
|
|
84
|
+
tailwindConfiguration?: {
|
|
85
|
+
file: string;
|
|
86
|
+
package: string;
|
|
87
|
+
};
|
|
88
|
+
colors: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Cached module ID sets for a bundled entry point.
|
|
92
|
+
*/
|
|
93
|
+
export interface BundleResult {
|
|
94
|
+
/** Exact set of virtual ESM module IDs bundled into this entry point. */
|
|
95
|
+
esmModuleIds: ReadonlySet<string>;
|
|
96
|
+
/** Exact set of virtual DTS module IDs bundled into this entry point. */
|
|
97
|
+
dtsModuleIds: ReadonlySet<string>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Cached state for the single unified library compilation.
|
|
101
|
+
*/
|
|
102
|
+
export interface SingleProgramCache {
|
|
103
|
+
/** The active Angular compilation instance. */
|
|
104
|
+
readonly compilationInstance: AngularCompilation;
|
|
105
|
+
/** In-memory map of emitted JavaScript files keyed by relative output path. */
|
|
106
|
+
readonly esmFiles: Map<string, string>;
|
|
107
|
+
/** In-memory map of emitted TypeScript declaration files keyed by relative output path. */
|
|
108
|
+
readonly dtsFiles: Map<string, string>;
|
|
109
|
+
/** Set of file paths that failed during stylesheet bundling or compilation. */
|
|
110
|
+
readonly failedFiles?: ReadonlySet<string>;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* State preserved across incremental builds in watch mode.
|
|
114
|
+
*/
|
|
115
|
+
export interface SingleBuildState {
|
|
116
|
+
singleProgramCache?: SingleProgramCache;
|
|
117
|
+
previousBundleResults: Map<string, BundleResult>;
|
|
118
|
+
pendingChangedEsmFiles: Set<string>;
|
|
119
|
+
pendingChangedDtsFiles: Set<string>;
|
|
120
|
+
hasCompilationError?: boolean;
|
|
121
|
+
hasEmittedManifests?: boolean;
|
|
122
|
+
hasEmittedAssets?: boolean;
|
|
123
|
+
hasEntryPointsChanges?: boolean;
|
|
124
|
+
directoryExists: Set<string>;
|
|
125
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
|
|
@@ -84,11 +84,11 @@ async function* execute(options, context) {
|
|
|
84
84
|
if (options.tsConfig) {
|
|
85
85
|
packager.withTsConfig((0, node_path_1.resolve)(workspaceRoot, options.tsConfig));
|
|
86
86
|
}
|
|
87
|
-
const { enabled: cacheEnabled, path: cacheDirectory } = (0, normalize_cache_1.normalizeCacheOptions)(metadata, context.workspaceRoot);
|
|
87
|
+
const { enabled: cacheEnabled, path: cacheDirectory } = (0, normalize_cache_1.normalizeCacheOptions)(metadata, context.workspaceRoot, projectName, context.builder.builderName);
|
|
88
88
|
const ngPackagrOptions = {
|
|
89
89
|
cacheEnabled,
|
|
90
90
|
poll: options.poll,
|
|
91
|
-
cacheDirectory:
|
|
91
|
+
cacheDirectory: cacheDirectory,
|
|
92
92
|
};
|
|
93
93
|
try {
|
|
94
94
|
if (options.watch) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["builder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBH,
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","s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,CAAC,CAAC;IAErC,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;QACrB,QAAQ,CAAC,YAAY,CAAC,IAAA,mBAAO,EAAC,aAAa,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,IAAA,uCAAqB,EAC3E,QAAQ,EACR,OAAO,CAAC,aAAa,EACrB,WAAW,EACX,OAAO,CAAC,OAAO,CAAC,WAAW,CAC5B,CAAC;IAEF,MAAM,gBAAgB,GAAqB;QACzC,YAAY;QACZ,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,cAAc,EAAE,cAAc;KAC/B,CAAC;IAEF,IAAI,CAAC;QACH,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YAClB,MAAM,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC,SAAS,EAAE,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,MAAM,QAAQ,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;QACzC,CAAC;QAED,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC1B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAA,qBAAa,EAAC,KAAK,CAAC,CAAC;QAErB,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;IACjD,CAAC;AACH,CAAC"}
|
|
@@ -274,13 +274,18 @@ async function* execute(options, context, extensions) {
|
|
|
274
274
|
if (builderName === '@angular/build:application') {
|
|
275
275
|
buildTargetOptions = (await context.validateOptions(await context.getTargetOptions(normalizedOptions.buildTarget), builderName));
|
|
276
276
|
}
|
|
277
|
+
else if (builderName === '@angular/build:library') {
|
|
278
|
+
const libraryOptions = (await context.validateOptions(await context.getTargetOptions(normalizedOptions.buildTarget), builderName));
|
|
279
|
+
buildTargetOptions = transformLibraryOptions(libraryOptions);
|
|
280
|
+
}
|
|
277
281
|
else if (builderName === '@angular/build:ng-packagr') {
|
|
278
282
|
const ngPackagrOptions = await context.validateOptions(await context.getTargetOptions(normalizedOptions.buildTarget), builderName);
|
|
279
283
|
buildTargetOptions = await transformNgPackagrOptions(context, ngPackagrOptions, normalizedOptions.projectRoot);
|
|
280
284
|
}
|
|
281
285
|
else {
|
|
282
286
|
context.logger.warn(`The 'buildTarget' is configured to use '${builderName}', which is not supported. ` +
|
|
283
|
-
`The 'unit-test' builder is designed to work with '@angular/build:application'
|
|
287
|
+
`The 'unit-test' builder is designed to work with '@angular/build:application', ` +
|
|
288
|
+
`'@angular/build:library', or '@angular/build:ng-packagr'. ` +
|
|
284
289
|
'Unexpected behavior or build failures may occur.');
|
|
285
290
|
buildTargetOptions = (await context.validateOptions(await context.getTargetOptions(normalizedOptions.buildTarget), builderName));
|
|
286
291
|
}
|
|
@@ -302,7 +307,7 @@ async function* execute(options, context, extensions) {
|
|
|
302
307
|
buildOptions: runnerBuildOptions,
|
|
303
308
|
virtualFiles,
|
|
304
309
|
testEntryPointMappings,
|
|
305
|
-
} = await runner.getBuildOptions(normalizedOptions, buildTargetOptions));
|
|
310
|
+
} = await runner.getBuildOptions(normalizedOptions, buildTargetOptions, context.logger));
|
|
306
311
|
}
|
|
307
312
|
catch (e) {
|
|
308
313
|
(0, error_1.assertIsError)(e);
|
|
@@ -319,6 +324,7 @@ async function* execute(options, context, extensions) {
|
|
|
319
324
|
const applicationBuildOptions = {
|
|
320
325
|
...buildTargetOptions,
|
|
321
326
|
...runnerBuildOptions,
|
|
327
|
+
polyfills: runnerBuildOptions.polyfills ?? normalizedOptions.polyfills,
|
|
322
328
|
watch: normalizedOptions.watch,
|
|
323
329
|
progress: normalizedOptions.buildProgress ?? buildTargetOptions.progress,
|
|
324
330
|
quiet: normalizedOptions.quiet,
|
|
@@ -326,7 +332,7 @@ async function* execute(options, context, extensions) {
|
|
|
326
332
|
preserveSymlinks: normalizedOptions.preserveSymlinks,
|
|
327
333
|
};
|
|
328
334
|
const dumpDirectory = normalizedOptions.dumpVirtualFiles
|
|
329
|
-
? node_path_1.default.join(normalizedOptions.cacheOptions.path, '
|
|
335
|
+
? node_path_1.default.join(normalizedOptions.cacheOptions.path, 'output-files')
|
|
330
336
|
: undefined;
|
|
331
337
|
yield* runBuildAndTest(executor, applicationBuildOptions, context, dumpDirectory, finalExtensions);
|
|
332
338
|
}
|
|
@@ -376,4 +382,20 @@ async function transformNgPackagrOptions(context, options, projectRoot) {
|
|
|
376
382
|
inlineStyleLanguage,
|
|
377
383
|
};
|
|
378
384
|
}
|
|
385
|
+
/**
|
|
386
|
+
* Transforms library builder options into internal application builder options for testing.
|
|
387
|
+
*
|
|
388
|
+
* @param options The raw validated options from the library build target.
|
|
389
|
+
* @returns Application builder options suitable for running tests.
|
|
390
|
+
*/
|
|
391
|
+
function transformLibraryOptions(options) {
|
|
392
|
+
const { stylePreprocessorOptions, assets, inlineStyleLanguage, preserveSymlinks, tsConfig } = options;
|
|
393
|
+
return {
|
|
394
|
+
stylePreprocessorOptions: stylePreprocessorOptions,
|
|
395
|
+
assets: Array.isArray(assets) && assets.length ? assets : undefined,
|
|
396
|
+
inlineStyleLanguage: inlineStyleLanguage,
|
|
397
|
+
preserveSymlinks: typeof preserveSymlinks === 'boolean' ? preserveSymlinks : undefined,
|
|
398
|
+
tsConfig: typeof tsConfig === 'string' ? tsConfig : undefined,
|
|
399
|
+
};
|
|
400
|
+
}
|
|
379
401
|
//# sourceMappingURL=builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["builder.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsKH,
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["builder.ts"],"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AAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;QACnE,mBAAmB,EACjB,mBAA+E;QACjF,gBAAgB,EAAE,OAAO,gBAAgB,KAAK,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS;QACtF,QAAQ,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;KACzB,CAAC;AACzC,CAAC"}
|
|
@@ -52,6 +52,7 @@ export declare function normalizeOptions(context: BuilderContext, projectName: s
|
|
|
52
52
|
dumpVirtualFiles: boolean | undefined;
|
|
53
53
|
listTests: boolean | undefined;
|
|
54
54
|
preserveSymlinks: boolean;
|
|
55
|
+
polyfills: string[] | undefined;
|
|
55
56
|
runnerConfig: string | boolean | undefined;
|
|
56
57
|
}>;
|
|
57
58
|
export declare function injectTestingPolyfills(polyfills?: string[]): string[];
|
|
@@ -52,9 +52,8 @@ async function normalizeOptions(context, projectName, options) {
|
|
|
52
52
|
const projectMetadata = await context.getProjectMetadata(projectName);
|
|
53
53
|
const { projectRoot, projectSourceRoot } = (0, project_metadata_1.getProjectRootPaths)(workspaceRoot, projectMetadata);
|
|
54
54
|
// Gather persistent caching option and provide a project specific cache location
|
|
55
|
-
const cacheOptions = (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, workspaceRoot);
|
|
56
|
-
|
|
57
|
-
const { runner, browsers, progress, filter, browserViewport, ui, runnerConfig, isolate, splitting = true, } = options;
|
|
55
|
+
const cacheOptions = (0, normalize_cache_1.normalizeCacheOptions)(projectMetadata, workspaceRoot, projectName, context.builder.builderName);
|
|
56
|
+
const { runner, browsers, progress, filter, browserViewport, ui, runnerConfig, isolate, splitting = true, polyfills, } = options;
|
|
58
57
|
if (ui && runner !== schema_1.Runner.Vitest) {
|
|
59
58
|
throw new Error('The "ui" option is only available for the "vitest" runner.');
|
|
60
59
|
}
|
|
@@ -123,6 +122,7 @@ async function normalizeOptions(context, projectName, options) {
|
|
|
123
122
|
dumpVirtualFiles: options.dumpVirtualFiles,
|
|
124
123
|
listTests: options.listTests,
|
|
125
124
|
preserveSymlinks,
|
|
125
|
+
polyfills,
|
|
126
126
|
runnerConfig: typeof runnerConfig === 'string'
|
|
127
127
|
? runnerConfig.length === 0
|
|
128
128
|
? true
|