@angular-devkit/schematics 18.1.0 → 18.2.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/package.json +2 -2
- package/src/rules/template.js +3 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0-next.0",
|
|
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": "18.
|
|
21
|
+
"@angular-devkit/core": "18.2.0-next.0",
|
|
22
22
|
"jsonc-parser": "3.3.1",
|
|
23
23
|
"magic-string": "0.30.10",
|
|
24
24
|
"ora": "5.4.1",
|
package/src/rules/template.js
CHANGED
|
@@ -105,11 +105,12 @@ function applyPathTemplate(data, options = {
|
|
|
105
105
|
if (!(pipe in data)) {
|
|
106
106
|
throw new UnknownPipeException(pipe);
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
const pipeFn = data[pipe];
|
|
109
|
+
if (typeof pipeFn != 'function') {
|
|
109
110
|
throw new InvalidPipeException(pipe);
|
|
110
111
|
}
|
|
111
112
|
// Coerce to string.
|
|
112
|
-
return '' +
|
|
113
|
+
return '' + pipeFn(acc);
|
|
113
114
|
}, '' + replacement);
|
|
114
115
|
}
|
|
115
116
|
path = path.substring(0, start) + replacement + path.substring(end + ieL);
|