@angular-devkit/schematics 17.0.0-rc.1 → 17.0.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics",
|
|
3
|
-
"version": "17.0.0-rc.
|
|
3
|
+
"version": "17.0.0-rc.3",
|
|
4
4
|
"description": "Angular Schematics - Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"typings": "src/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"tooling"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@angular-devkit/core": "17.0.0-rc.
|
|
21
|
+
"@angular-devkit/core": "17.0.0-rc.3",
|
|
22
22
|
"jsonc-parser": "3.2.0",
|
|
23
23
|
"magic-string": "0.30.5",
|
|
24
24
|
"ora": "5.4.1",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"url": "https://github.com/angular/angular-cli.git"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
|
-
"node": "
|
|
32
|
+
"node": "^18.13.0 || >=20.9.0",
|
|
33
33
|
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
|
|
34
34
|
"yarn": ">= 1.13.0"
|
|
35
35
|
},
|
|
@@ -29,6 +29,7 @@ class NodeModulesEngineHost extends file_system_engine_host_base_1.FileSystemEng
|
|
|
29
29
|
this.paths = paths;
|
|
30
30
|
}
|
|
31
31
|
resolve(name, requester, references = new Set()) {
|
|
32
|
+
// Keep track of the package requesting the schematic, in order to avoid infinite recursion
|
|
32
33
|
if (requester) {
|
|
33
34
|
if (references.has(requester)) {
|
|
34
35
|
references.add(requester);
|
|
@@ -53,7 +54,16 @@ class NodeModulesEngineHost extends file_system_engine_host_base_1.FileSystemEng
|
|
|
53
54
|
if (!schematics || typeof schematics !== 'string') {
|
|
54
55
|
throw new NodePackageDoesNotSupportSchematics(name);
|
|
55
56
|
}
|
|
56
|
-
|
|
57
|
+
// If this is a relative path to the collection, then create the collection
|
|
58
|
+
// path in relation to the package path
|
|
59
|
+
if (schematics.startsWith('.')) {
|
|
60
|
+
const packageDirectory = (0, path_1.dirname)(packageJsonPath);
|
|
61
|
+
collectionPath = (0, path_1.resolve)(packageDirectory, schematics);
|
|
62
|
+
}
|
|
63
|
+
// Otherwise treat this as a package, and recurse to find the collection path
|
|
64
|
+
else {
|
|
65
|
+
collectionPath = this.resolve(schematics, packageJsonPath, references);
|
|
66
|
+
}
|
|
57
67
|
}
|
|
58
68
|
catch (e) {
|
|
59
69
|
if (e.code !== 'MODULE_NOT_FOUND') {
|