@angular-devkit/schematics 17.3.7 → 17.3.9
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 +4 -1
- package/src/tree/host-tree.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular-devkit/schematics",
|
|
3
|
-
"version": "17.3.
|
|
3
|
+
"version": "17.3.9",
|
|
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.3.
|
|
21
|
+
"@angular-devkit/core": "17.3.9",
|
|
22
22
|
"jsonc-parser": "3.2.1",
|
|
23
23
|
"magic-string": "0.30.8",
|
|
24
24
|
"ora": "5.4.1",
|
package/src/rules/template.js
CHANGED
|
@@ -42,7 +42,10 @@ function applyContentTemplate(options) {
|
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
catch (e) {
|
|
45
|
-
|
|
45
|
+
// The second part should not be needed. But Jest does not support instanceof correctly.
|
|
46
|
+
// See: https://github.com/jestjs/jest/issues/2549
|
|
47
|
+
if (e instanceof TypeError ||
|
|
48
|
+
e.code === 'ERR_ENCODING_INVALID_ENCODED_DATA') {
|
|
46
49
|
return entry;
|
|
47
50
|
}
|
|
48
51
|
throw e;
|
package/src/tree/host-tree.js
CHANGED
|
@@ -227,7 +227,10 @@ class HostTree {
|
|
|
227
227
|
return decoder.decode(data);
|
|
228
228
|
}
|
|
229
229
|
catch (e) {
|
|
230
|
-
|
|
230
|
+
// The second part should not be needed. But Jest does not support instanceof correctly.
|
|
231
|
+
// See: https://github.com/jestjs/jest/issues/2549
|
|
232
|
+
if (e instanceof TypeError ||
|
|
233
|
+
e.code === 'ERR_ENCODING_INVALID_ENCODED_DATA') {
|
|
231
234
|
throw new Error(`Failed to decode "${path}" as UTF-8 text.`);
|
|
232
235
|
}
|
|
233
236
|
throw e;
|