@angular-builders/custom-esbuild 20.1.0-beta.0 → 21.0.0-beta.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/README.md +2 -1
- package/dist/dev-server/schema.json +7 -0
- package/dist/unit-test/schema.json +208 -41
- package/package.json +8 -9
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ Allow customizing ESBuild configuration
|
|
|
26
26
|
<details>
|
|
27
27
|
<summary>Click to expand</summary>
|
|
28
28
|
|
|
29
|
+
- [Version 20](https://github.com/just-jeb/angular-builders/blob/20.x.x/packages/custom-esbuild/README.md)
|
|
29
30
|
- [Version 19](https://github.com/just-jeb/angular-builders/blob/19.x.x/packages/custom-esbuild/README.md)
|
|
30
31
|
- [Version 18](https://github.com/just-jeb/angular-builders/blob/18.x.x/packages/custom-esbuild/README.md)
|
|
31
32
|
- [Version 17](https://github.com/just-jeb/angular-builders/blob/17.x.x/packages/custom-esbuild/README.md)
|
|
@@ -34,7 +35,7 @@ Allow customizing ESBuild configuration
|
|
|
34
35
|
|
|
35
36
|
## Prerequisites:
|
|
36
37
|
|
|
37
|
-
- [Angular CLI
|
|
38
|
+
- [Angular CLI 21](https://www.npmjs.com/package/@angular/cli)
|
|
38
39
|
|
|
39
40
|
# Usage
|
|
40
41
|
|
|
@@ -53,6 +53,13 @@
|
|
|
53
53
|
}
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
|
+
"define": {
|
|
57
|
+
"description": "Defines global identifiers that will be replaced with a specified constant value when found in any JavaScript or TypeScript code including libraries. The value will be used directly. String values must be put in quotes. Identifiers within Angular metadata such as Component Decorators will not be replaced.",
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
56
63
|
"headers": {
|
|
57
64
|
"type": "object",
|
|
58
65
|
"description": "Custom HTTP headers to be added to all responses.",
|
|
@@ -6,68 +6,105 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"buildTarget": {
|
|
8
8
|
"type": "string",
|
|
9
|
-
"description": "
|
|
9
|
+
"description": "Specifies the build target to use for the unit test build in the format `project:target[:configuration]`. This defaults to the `build` target of the current project with the `development` configuration. You can also pass a comma-separated list of configurations. Example: `project:target:production,staging`.",
|
|
10
10
|
"pattern": "^[^:\\s]*:[^:\\s]*(:[^\\s]+)?$"
|
|
11
11
|
},
|
|
12
12
|
"tsConfig": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"description": "The
|
|
14
|
+
"description": "The path to the TypeScript configuration file, relative to the workspace root. Defaults to `tsconfig.spec.json` in the project root if it exists. If not specified and the default does not exist, the `tsConfig` from the specified `buildTarget` will be used."
|
|
15
|
+
},
|
|
16
|
+
"runnerConfig": {
|
|
17
|
+
"type": [
|
|
18
|
+
"string",
|
|
19
|
+
"boolean"
|
|
20
|
+
],
|
|
21
|
+
"description": "Specifies the configuration file for the selected test runner. If a string is provided, it will be used as the path to the configuration file. If `true`, the builder will search for a default configuration file (e.g., `vitest.config.ts` or `karma.conf.js`). If `false`, no external configuration file will be used.\\nFor Vitest, this enables advanced options and the use of custom plugins. Please note that while the file is loaded, the Angular team does not provide direct support for its specific contents or any third-party plugins used within it.",
|
|
22
|
+
"default": false
|
|
15
23
|
},
|
|
16
24
|
"browsers": {
|
|
17
|
-
"description": "
|
|
25
|
+
"description": "Specifies the browsers to use for test execution. When not specified, tests are run in a Node.js environment using jsdom. For both Vitest and Karma, browser names ending with 'Headless' (e.g., 'ChromeHeadless') will enable headless mode.",
|
|
18
26
|
"type": "array",
|
|
19
27
|
"items": {
|
|
20
28
|
"type": "string"
|
|
21
29
|
},
|
|
22
30
|
"minItems": 1
|
|
23
31
|
},
|
|
32
|
+
"browserViewport": {
|
|
33
|
+
"description": "Specifies the browser viewport dimensions for browser-based tests in the format `widthxheight`.",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"pattern": "^\\d+x\\d+$"
|
|
36
|
+
},
|
|
24
37
|
"include": {
|
|
25
38
|
"type": "array",
|
|
26
39
|
"items": {
|
|
27
40
|
"type": "string"
|
|
28
41
|
},
|
|
29
42
|
"default": [
|
|
30
|
-
"**/*.spec.ts"
|
|
43
|
+
"**/*.spec.ts",
|
|
44
|
+
"**/*.test.ts"
|
|
31
45
|
],
|
|
32
|
-
"description": "
|
|
46
|
+
"description": "Specifies glob patterns of files to include for testing, relative to the project root. This option also has special handling for directory paths (includes all test files within) and file paths (includes the corresponding test file if one exists)."
|
|
33
47
|
},
|
|
34
48
|
"exclude": {
|
|
35
49
|
"type": "array",
|
|
36
50
|
"items": {
|
|
37
51
|
"type": "string"
|
|
38
52
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
53
|
+
"description": "Specifies glob patterns of files to exclude from testing, relative to the project root."
|
|
54
|
+
},
|
|
55
|
+
"filter": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "Specifies a regular expression pattern to match against test suite and test names. Only tests with a name matching the pattern will be executed. For example, `^App` will run only tests in suites beginning with 'App'."
|
|
41
58
|
},
|
|
42
59
|
"watch": {
|
|
43
60
|
"type": "boolean",
|
|
44
|
-
"description": "
|
|
61
|
+
"description": "Enables watch mode, which re-runs tests when source files change. Defaults to `true` in TTY environments and `false` otherwise."
|
|
45
62
|
},
|
|
46
63
|
"debug": {
|
|
47
64
|
"type": "boolean",
|
|
48
|
-
"description": "
|
|
65
|
+
"description": "Enables debugging mode for tests, allowing the use of the Node Inspector.",
|
|
49
66
|
"default": false
|
|
50
67
|
},
|
|
51
|
-
"
|
|
68
|
+
"ui": {
|
|
52
69
|
"type": "boolean",
|
|
53
|
-
"description": "
|
|
70
|
+
"description": "Enables the Vitest UI for interactive test execution. This option is only available for the Vitest runner.",
|
|
54
71
|
"default": false
|
|
55
72
|
},
|
|
56
|
-
"
|
|
73
|
+
"coverage": {
|
|
74
|
+
"type": "boolean",
|
|
75
|
+
"description": "Enables coverage reporting for tests.",
|
|
76
|
+
"default": false
|
|
77
|
+
},
|
|
78
|
+
"coverageInclude": {
|
|
57
79
|
"type": "array",
|
|
58
|
-
"description": "
|
|
80
|
+
"description": "Specifies glob patterns of files to include in the coverage report.",
|
|
59
81
|
"items": {
|
|
60
82
|
"type": "string"
|
|
61
|
-
}
|
|
62
|
-
"default": []
|
|
83
|
+
}
|
|
63
84
|
},
|
|
64
|
-
"
|
|
85
|
+
"coverageExclude": {
|
|
65
86
|
"type": "array",
|
|
66
|
-
"description": "
|
|
87
|
+
"description": "Specifies glob patterns of files to exclude from the coverage report.",
|
|
88
|
+
"items": {
|
|
89
|
+
"type": "string"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"coverageReporters": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"description": "Specifies the reporters to use for coverage results. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'html', 'lcov', 'lcovonly', 'text', 'text-summary', 'cobertura', 'json', and 'json-summary'.",
|
|
67
95
|
"items": {
|
|
68
96
|
"oneOf": [
|
|
69
97
|
{
|
|
70
|
-
"
|
|
98
|
+
"enum": [
|
|
99
|
+
"html",
|
|
100
|
+
"lcov",
|
|
101
|
+
"lcovonly",
|
|
102
|
+
"text",
|
|
103
|
+
"text-summary",
|
|
104
|
+
"cobertura",
|
|
105
|
+
"json",
|
|
106
|
+
"json-summary"
|
|
107
|
+
]
|
|
71
108
|
},
|
|
72
109
|
{
|
|
73
110
|
"type": "array",
|
|
@@ -75,7 +112,16 @@
|
|
|
75
112
|
"maxItems": 2,
|
|
76
113
|
"items": [
|
|
77
114
|
{
|
|
78
|
-
"
|
|
115
|
+
"enum": [
|
|
116
|
+
"html",
|
|
117
|
+
"lcov",
|
|
118
|
+
"lcovonly",
|
|
119
|
+
"text",
|
|
120
|
+
"text-summary",
|
|
121
|
+
"cobertura",
|
|
122
|
+
"json",
|
|
123
|
+
"json-summary"
|
|
124
|
+
]
|
|
79
125
|
},
|
|
80
126
|
{
|
|
81
127
|
"type": "object"
|
|
@@ -85,16 +131,139 @@
|
|
|
85
131
|
]
|
|
86
132
|
}
|
|
87
133
|
},
|
|
134
|
+
"coverageThresholds": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"description": "Specifies minimum coverage thresholds that must be met. If thresholds are not met, the builder will exit with an error.",
|
|
137
|
+
"properties": {
|
|
138
|
+
"perFile": {
|
|
139
|
+
"type": "boolean",
|
|
140
|
+
"description": "When true, thresholds are enforced for each file individually."
|
|
141
|
+
},
|
|
142
|
+
"statements": {
|
|
143
|
+
"type": "number",
|
|
144
|
+
"description": "Minimum percentage of statements covered."
|
|
145
|
+
},
|
|
146
|
+
"branches": {
|
|
147
|
+
"type": "number",
|
|
148
|
+
"description": "Minimum percentage of branches covered."
|
|
149
|
+
},
|
|
150
|
+
"functions": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"description": "Minimum percentage of functions covered."
|
|
153
|
+
},
|
|
154
|
+
"lines": {
|
|
155
|
+
"type": "number",
|
|
156
|
+
"description": "Minimum percentage of lines covered."
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"additionalProperties": false
|
|
160
|
+
},
|
|
161
|
+
"coverageWatermarks": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"description": "Specifies coverage watermarks for the HTML reporter. These determine the color coding for high, medium, and low coverage.",
|
|
164
|
+
"properties": {
|
|
165
|
+
"statements": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"description": "The high and low watermarks for statements coverage. `[low, high]`",
|
|
168
|
+
"items": {
|
|
169
|
+
"type": "number"
|
|
170
|
+
},
|
|
171
|
+
"minItems": 2,
|
|
172
|
+
"maxItems": 2
|
|
173
|
+
},
|
|
174
|
+
"branches": {
|
|
175
|
+
"type": "array",
|
|
176
|
+
"description": "The high and low watermarks for branches coverage. `[low, high]`",
|
|
177
|
+
"items": {
|
|
178
|
+
"type": "number"
|
|
179
|
+
},
|
|
180
|
+
"minItems": 2,
|
|
181
|
+
"maxItems": 2
|
|
182
|
+
},
|
|
183
|
+
"functions": {
|
|
184
|
+
"type": "array",
|
|
185
|
+
"description": "The high and low watermarks for functions coverage. `[low, high]`",
|
|
186
|
+
"items": {
|
|
187
|
+
"type": "number"
|
|
188
|
+
},
|
|
189
|
+
"minItems": 2,
|
|
190
|
+
"maxItems": 2
|
|
191
|
+
},
|
|
192
|
+
"lines": {
|
|
193
|
+
"type": "array",
|
|
194
|
+
"description": "The high and low watermarks for lines coverage. `[low, high]`",
|
|
195
|
+
"items": {
|
|
196
|
+
"type": "number"
|
|
197
|
+
},
|
|
198
|
+
"minItems": 2,
|
|
199
|
+
"maxItems": 2
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"additionalProperties": false
|
|
203
|
+
},
|
|
88
204
|
"reporters": {
|
|
89
205
|
"type": "array",
|
|
90
|
-
"description": "
|
|
206
|
+
"description": "Specifies the reporters to use during test execution. Each reporter can be a string representing its name, or a tuple containing the name and an options object. Built-in reporters include 'default', 'verbose', 'dots', 'json', 'junit', 'tap', 'tap-flat', and 'html'. You can also provide a path to a custom reporter.",
|
|
91
207
|
"items": {
|
|
92
|
-
"
|
|
208
|
+
"oneOf": [
|
|
209
|
+
{
|
|
210
|
+
"anyOf": [
|
|
211
|
+
{
|
|
212
|
+
"type": "string"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"enum": [
|
|
216
|
+
"default",
|
|
217
|
+
"verbose",
|
|
218
|
+
"dots",
|
|
219
|
+
"json",
|
|
220
|
+
"junit",
|
|
221
|
+
"tap",
|
|
222
|
+
"tap-flat",
|
|
223
|
+
"html"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"type": "array",
|
|
230
|
+
"minItems": 1,
|
|
231
|
+
"maxItems": 2,
|
|
232
|
+
"items": [
|
|
233
|
+
{
|
|
234
|
+
"anyOf": [
|
|
235
|
+
{
|
|
236
|
+
"type": "string"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"enum": [
|
|
240
|
+
"default",
|
|
241
|
+
"verbose",
|
|
242
|
+
"dots",
|
|
243
|
+
"json",
|
|
244
|
+
"junit",
|
|
245
|
+
"tap",
|
|
246
|
+
"tap-flat",
|
|
247
|
+
"html"
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"type": "object"
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
]
|
|
93
258
|
}
|
|
94
259
|
},
|
|
260
|
+
"outputFile": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"description": "Specifies a file path for the test report, applying only to the first reporter. To configure output files for multiple reporters, use the tuple format `['reporter-name', { outputFile: '...' }]` within the `reporters` option. When not provided, output is written to the console."
|
|
263
|
+
},
|
|
95
264
|
"providersFile": {
|
|
96
265
|
"type": "string",
|
|
97
|
-
"description": "TypeScript file that
|
|
266
|
+
"description": "Specifies the path to a TypeScript file that provides an array of Angular providers for the test environment. The file must contain a default export of the provider array.",
|
|
98
267
|
"minLength": 1
|
|
99
268
|
},
|
|
100
269
|
"setupFiles": {
|
|
@@ -102,7 +271,22 @@
|
|
|
102
271
|
"items": {
|
|
103
272
|
"type": "string"
|
|
104
273
|
},
|
|
105
|
-
"description": "A list of global setup
|
|
274
|
+
"description": "A list of paths to global setup files that are executed before the test files. The application's polyfills and the Angular TestBed are always initialized before these files."
|
|
275
|
+
},
|
|
276
|
+
"progress": {
|
|
277
|
+
"type": "boolean",
|
|
278
|
+
"description": "Shows build progress information in the console. Defaults to the `progress` setting of the specified `buildTarget`."
|
|
279
|
+
},
|
|
280
|
+
"listTests": {
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"description": "Lists all discovered test files and exits the process without building or executing the tests.",
|
|
283
|
+
"default": false
|
|
284
|
+
},
|
|
285
|
+
"dumpVirtualFiles": {
|
|
286
|
+
"type": "boolean",
|
|
287
|
+
"description": "Dumps build output files to the `.angular/cache` directory for debugging purposes.",
|
|
288
|
+
"default": false,
|
|
289
|
+
"visible": false
|
|
106
290
|
},
|
|
107
291
|
"plugins": {
|
|
108
292
|
"type": "array",
|
|
@@ -133,23 +317,6 @@
|
|
|
133
317
|
}
|
|
134
318
|
},
|
|
135
319
|
"additionalProperties": false,
|
|
136
|
-
"required": [
|
|
137
|
-
"buildTarget",
|
|
138
|
-
"tsConfig"
|
|
139
|
-
],
|
|
140
|
-
"definitions": {
|
|
141
|
-
"coverage-reporters": {
|
|
142
|
-
"enum": [
|
|
143
|
-
"html",
|
|
144
|
-
"lcov",
|
|
145
|
-
"lcovonly",
|
|
146
|
-
"text",
|
|
147
|
-
"text-summary",
|
|
148
|
-
"cobertura",
|
|
149
|
-
"json",
|
|
150
|
-
"json-summary"
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
},
|
|
320
|
+
"required": [],
|
|
154
321
|
"$id": "UnitTestCustomApplicationSchema"
|
|
155
322
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-builders/custom-esbuild",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-beta.0",
|
|
4
4
|
"description": "Custom esbuild builders for Angular build facade. Allow to modify Angular build configuration without ejecting it",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
},
|
|
41
41
|
"builders": "builders.json",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@angular-builders/common": "
|
|
44
|
-
"@angular-devkit/architect": ">=0.
|
|
45
|
-
"@angular-devkit/core": "^
|
|
46
|
-
"@angular/build": "^
|
|
43
|
+
"@angular-builders/common": "workspace:*",
|
|
44
|
+
"@angular-devkit/architect": ">=0.2100.0 < 0.2200.0",
|
|
45
|
+
"@angular-devkit/core": "^21.0.0",
|
|
46
|
+
"@angular/build": "^21.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@angular/compiler-cli": "^
|
|
49
|
+
"@angular/compiler-cli": "^21.0.0",
|
|
50
50
|
"vitest": ">=2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"jest": "29.7.0",
|
|
55
55
|
"rimraf": "^5.0.0",
|
|
56
56
|
"ts-node": "^10.0.0",
|
|
57
|
-
"typescript": "5.
|
|
58
|
-
}
|
|
59
|
-
"gitHead": "0756041cfa2de2234ccb5a9129d332affaf60b7b"
|
|
57
|
+
"typescript": "5.9.3"
|
|
58
|
+
}
|
|
60
59
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018 Evgeny Barabanov
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|