@angular-devkit/architect 0.2000.0-rc.2 → 0.2000.0-rc.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.
|
@@ -258,19 +258,22 @@ function loadEsmModule(modulePath) {
|
|
|
258
258
|
}
|
|
259
259
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
260
260
|
async function getBuilder(builderPath) {
|
|
261
|
+
let builder;
|
|
261
262
|
switch (path.extname(builderPath)) {
|
|
262
263
|
case '.mjs':
|
|
263
264
|
// Load the ESM configuration file using the TypeScript dynamic import workaround.
|
|
264
265
|
// Once TypeScript provides support for keeping the dynamic import this workaround can be
|
|
265
266
|
// changed to a direct dynamic import.
|
|
266
|
-
|
|
267
|
+
builder = (await loadEsmModule((0, node_url_1.pathToFileURL)(builderPath))).default;
|
|
268
|
+
break;
|
|
267
269
|
case '.cjs':
|
|
268
|
-
|
|
270
|
+
builder = localRequire(builderPath);
|
|
271
|
+
break;
|
|
269
272
|
default:
|
|
270
273
|
// The file could be either CommonJS or ESM.
|
|
271
274
|
// CommonJS is tried first then ESM if loading fails.
|
|
272
275
|
try {
|
|
273
|
-
|
|
276
|
+
builder = localRequire(builderPath);
|
|
274
277
|
}
|
|
275
278
|
catch (e) {
|
|
276
279
|
if (e.code === 'ERR_REQUIRE_ESM' ||
|
|
@@ -278,9 +281,11 @@ async function getBuilder(builderPath) {
|
|
|
278
281
|
// Load the ESM configuration file using the TypeScript dynamic import workaround.
|
|
279
282
|
// Once TypeScript provides support for keeping the dynamic import this workaround can be
|
|
280
283
|
// changed to a direct dynamic import.
|
|
281
|
-
|
|
284
|
+
builder = await loadEsmModule((0, node_url_1.pathToFileURL)(builderPath));
|
|
282
285
|
}
|
|
283
286
|
throw e;
|
|
284
287
|
}
|
|
288
|
+
break;
|
|
285
289
|
}
|
|
290
|
+
return 'default' in builder ? builder.default : builder;
|
|
286
291
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/architect",
|
|
3
|
-
"version": "0.2000.0-rc.
|
|
3
|
+
"version": "0.2000.0-rc.3",
|
|
4
4
|
"description": "Angular Build Facade",
|
|
5
5
|
"experimental": true,
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"typings": "src/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@angular-devkit/core": "20.0.0-rc.
|
|
9
|
+
"@angular-devkit/core": "20.0.0-rc.3",
|
|
10
10
|
"rxjs": "7.8.2"
|
|
11
11
|
},
|
|
12
12
|
"builders": "./builders/builders.json",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"packageManager": "pnpm@9.15.9",
|
|
25
25
|
"engines": {
|
|
26
|
-
"node": "^20.
|
|
26
|
+
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
27
27
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
28
28
|
"yarn": ">= 1.13.0"
|
|
29
29
|
},
|