@gi-tcg/gts-transpiler 0.3.6 → 0.3.7
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/dist/index.js +2 -1
- package/package.json +1 -1
- package/src/config.ts +3 -1
package/dist/index.js
CHANGED
|
@@ -1954,7 +1954,8 @@ async function resolveGtsConfig(filePath, inlineConfig, options) {
|
|
|
1954
1954
|
const generator = resolveGtsConfigImpl(filePath, inlineConfig, options);
|
|
1955
1955
|
let result = generator.next();
|
|
1956
1956
|
while (!result.done) {
|
|
1957
|
-
const
|
|
1957
|
+
const toRead = result.value;
|
|
1958
|
+
const content = await Promise.resolve(toRead).catch(() => "");
|
|
1958
1959
|
result = generator.next(content);
|
|
1959
1960
|
}
|
|
1960
1961
|
return result.value;
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -66,7 +66,9 @@ export async function resolveGtsConfig(
|
|
|
66
66
|
let result = generator.next();
|
|
67
67
|
while (!result.done) {
|
|
68
68
|
const toRead = result.value;
|
|
69
|
-
|
|
69
|
+
// return an invalid JSON if readFile fails, so that the generator
|
|
70
|
+
// can catch the error and try next one
|
|
71
|
+
const content = await Promise.resolve(toRead).catch(() => "");
|
|
70
72
|
result = generator.next(content);
|
|
71
73
|
}
|
|
72
74
|
return result.value;
|