@stryke/fs 0.21.2 → 0.21.3

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/tsconfig.cjs CHANGED
@@ -9,14 +9,14 @@ var _filePathFns = require("@stryke/path/file-path-fns");
9
9
  var _joinPaths = require("@stryke/path/join-paths");
10
10
  var _defu = _interopRequireDefault(require("defu"));
11
11
  var _mlly = require("mlly");
12
- var _readFile = require("./read-file.cjs");
12
+ var _json = require("./json.cjs");
13
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
14
  async function loadTsConfig(e = process.cwd()) {
15
15
  let s = e.endsWith(".json") ? e : (0, _joinPaths.joinPaths)(e, "tsconfig.json");
16
16
  if (!(0, _exists.existsSync)(s) && (s = await (0, _mlly.resolvePath)(e, {
17
17
  url: require('url').pathToFileURL(__filename).toString()
18
18
  }), !(0, _exists.existsSync)(s))) throw new Error(`tsconfig.json not found at ${s}. Please ensure the file exists.`);
19
- let o = await (0, _readFile.readJsonFile)(s);
19
+ let o = await (0, _json.readJsonFile)(s);
20
20
  if (o?.compilerOptions?.baseUrl && (o.compilerOptions.baseUrl = (0, _joinPaths.joinPaths)((0, _filePathFns.findFilePath)(s), o.compilerOptions.baseUrl)), o?.extends) {
21
21
  const f = Array.isArray(o.extends) ? o.extends : [o.extends];
22
22
  for (const m of f) {
package/dist/tsconfig.mjs CHANGED
@@ -1 +1 @@
1
- import{existsSync as i}from"@stryke/path/exists";import{findFilePath as r}from"@stryke/path/file-path-fns";import{joinPaths as t}from"@stryke/path/join-paths";import a from"defu";import{resolvePath as p}from"mlly";import{readJsonFile as c}from"./read-file";export async function loadTsConfig(e=process.cwd()){let s=e.endsWith(".json")?e:t(e,"tsconfig.json");if(!i(s)&&(s=await p(e,{url:import.meta.url}),!i(s)))throw new Error(`tsconfig.json not found at ${s}. Please ensure the file exists.`);let o=await c(s);if(o?.compilerOptions?.baseUrl&&(o.compilerOptions.baseUrl=t(r(s),o.compilerOptions.baseUrl)),o?.extends){const f=Array.isArray(o.extends)?o.extends:[o.extends];for(const m of f){const n=await loadTsConfig(t(r(s),m));n&&(o=a(o,n??{}))}}return o.extends=void 0,o}
1
+ import{existsSync as i}from"@stryke/path/exists";import{findFilePath as r}from"@stryke/path/file-path-fns";import{joinPaths as t}from"@stryke/path/join-paths";import a from"defu";import{resolvePath as p}from"mlly";import{readJsonFile as c}from"./json";export async function loadTsConfig(e=process.cwd()){let s=e.endsWith(".json")?e:t(e,"tsconfig.json");if(!i(s)&&(s=await p(e,{url:import.meta.url}),!i(s)))throw new Error(`tsconfig.json not found at ${s}. Please ensure the file exists.`);let o=await c(s);if(o?.compilerOptions?.baseUrl&&(o.compilerOptions.baseUrl=t(r(s),o.compilerOptions.baseUrl)),o?.extends){const f=Array.isArray(o.extends)?o.extends:[o.extends];for(const m of f){const n=await loadTsConfig(t(r(s),m));n&&(o=a(o,n??{}))}}return o.extends=void 0,o}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/fs",
3
- "version": "0.21.2",
3
+ "version": "0.21.3",
4
4
  "type": "module",
5
5
  "description": "A package containing various file system utilities that expand the functionality of NodeJs's built-in `fs` module.",
6
6
  "repository": {