@content-collections/core 0.15.4 → 0.15.5

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -266,9 +266,16 @@ var match = (id, patterns) => {
266
266
 
267
267
  //#endregion
268
268
  //#region src/esbuild.ts
269
+ function safeLoadTsConfig(directory) {
270
+ try {
271
+ return directory ? loadTsConfig(directory) : loadTsConfig();
272
+ } catch {
273
+ return null;
274
+ }
275
+ }
269
276
  function tsconfigResolvePaths(configPath) {
270
- let tsconfig = loadTsConfig(dirname(configPath));
271
- if (!tsconfig) tsconfig = loadTsConfig();
277
+ let tsconfig = safeLoadTsConfig(dirname(configPath));
278
+ if (!tsconfig) tsconfig = safeLoadTsConfig();
272
279
  return tsconfig?.data?.compilerOptions?.paths || {};
273
280
  }
274
281
  const NON_NODE_MODULE_RE = /^[A-Z]:[/\\]|^\.{0,2}\/|^\.{1,2}$/;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@content-collections/core",
3
3
  "type": "module",
4
- "version": "0.15.4",
4
+ "version": "0.15.5",
5
5
  "description": "Core of Content Collections",
6
6
  "author": "Sebastian Sdorra <s.sdorra@gmail.com>",
7
7
  "license": "MIT",