@atscript/core 0.0.1 → 0.0.15

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.cjs CHANGED
@@ -948,7 +948,7 @@ async function resolveConfigFile(docUri, _root) {
948
948
  const rootId = "file://" + root$1;
949
949
  while (true) {
950
950
  const candidate = await findConfigFileName(currentDir);
951
- if (candidate) return candidate;
951
+ if (candidate) return node_path.default.join(currentDir, candidate).replace(/^file:/, "");
952
952
  const parentDir = node_path.default.dirname(currentDir);
953
953
  if (currentDir === rootId || parentDir === currentDir) break;
954
954
  currentDir = parentDir;
@@ -983,6 +983,7 @@ else if (SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) {
983
983
  return await loadTsConfig(rawConfigPath, forceFormat);
984
984
  } else throw new Error(`Unsupported config format. Expected: \`${SUPPORTED_CONFIG_FORMATS.join(",")}\` but got \`${ext}\``);
985
985
  } catch (error) {
986
+ console.error(error);
986
987
  throw new Error("Error happened while loading config.");
987
988
  }
988
989
  }
package/dist/index.mjs CHANGED
@@ -924,7 +924,7 @@ async function resolveConfigFile(docUri, _root) {
924
924
  const rootId = "file://" + root$1;
925
925
  while (true) {
926
926
  const candidate = await findConfigFileName(currentDir);
927
- if (candidate) return candidate;
927
+ if (candidate) return path.join(currentDir, candidate).replace(/^file:/, "");
928
928
  const parentDir = path.dirname(currentDir);
929
929
  if (currentDir === rootId || parentDir === currentDir) break;
930
930
  currentDir = parentDir;
@@ -959,6 +959,7 @@ else if (SUPPORTED_TS_CONFIG_FORMATS.includes(ext)) {
959
959
  return await loadTsConfig(rawConfigPath, forceFormat);
960
960
  } else throw new Error(`Unsupported config format. Expected: \`${SUPPORTED_CONFIG_FORMATS.join(",")}\` but got \`${ext}\``);
961
961
  } catch (error) {
962
+ console.error(error);
962
963
  throw new Error("Error happened while loading config.");
963
964
  }
964
965
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atscript/core",
3
- "version": "0.0.1",
3
+ "version": "0.0.15",
4
4
  "description": "Core library for Atscript parsing and file generation.",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",