@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 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 content = await result.value;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gi-tcg/gts-transpiler",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/piovium/gts.git"
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
- const content = await toRead;
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;