@sprucelabs/resolve-path-aliases 2.0.10 → 2.0.11

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.
@@ -11,18 +11,15 @@ const globby_1 = __importDefault(require("globby"));
11
11
  const tsconfig_paths_1 = require("tsconfig-paths");
12
12
  const posixPath_1 = __importDefault(require("./posixPath"));
13
13
  class PathResolver {
14
- static Class;
15
- outResolver;
16
- srcResolver;
17
- globby;
18
- totalMappedPaths = 0;
19
- totalFilesWithMappedPaths = 0;
20
- log = exports.logLive;
21
14
  constructor(globbyUtil) {
15
+ this.totalMappedPaths = 0;
16
+ this.totalFilesWithMappedPaths = 0;
17
+ this.log = exports.logLive;
22
18
  this.globby = globbyUtil;
23
19
  }
24
20
  static Resolver(globbyUtil = globby_1.default) {
25
- return new (this.Class ?? this)(globbyUtil);
21
+ var _a;
22
+ return new ((_a = this.Class) !== null && _a !== void 0 ? _a : this)(globbyUtil);
26
23
  }
27
24
  buildResolvers(destination) {
28
25
  const config = (0, tsconfig_paths_1.loadConfig)(destination);
@@ -107,7 +104,7 @@ class PathResolver {
107
104
  const resolver = (0, tsconfig_paths_1.createMatchPath)(config.absoluteBaseUrl, config.paths);
108
105
  outResolver = (requested, readJson, fileExists, extensions) => {
109
106
  let resolved = resolver(requested, readJson, fileExists, extensions);
110
- resolved = resolved?.replace(`${path_1.default.sep}${baseUrl}${path_1.default.sep}`, `${path_1.default.sep}${outDir}${path_1.default.sep}`);
107
+ resolved = resolved === null || resolved === void 0 ? void 0 : resolved.replace(`${path_1.default.sep}${baseUrl}${path_1.default.sep}`, `${path_1.default.sep}${outDir}${path_1.default.sep}`);
111
108
  return resolved;
112
109
  };
113
110
  }
@@ -27,7 +27,7 @@ const argv = yargs_1.default.options({
27
27
  const { patterns, target, absoluteOrRelative, verbose } = argv;
28
28
  const cwd = target && target[0] === path_1.default.sep
29
29
  ? target
30
- : path_1.default.join(process.cwd(), target ?? '');
30
+ : path_1.default.join(process.cwd(), target !== null && target !== void 0 ? target : '');
31
31
  const processCwd = process.cwd();
32
32
  console.log(chalk_1.default.green(`Mapping tsconfig paths in '${path_1.default.relative(processCwd, cwd)}'`));
33
33
  const results = (0, index_1.resolvePathAliases)(cwd, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprucelabs/resolve-path-aliases",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "description": "Script that resolves paths from your tsconfig",
5
5
  "main": "build/index.js",
6
6
  "repository": "git@github.com:sprucelabsai-community/resolve-path-aliases.git",
@@ -57,14 +57,14 @@
57
57
  "watch.tsc": "tsc -w"
58
58
  },
59
59
  "dependencies": {
60
- "@sprucelabs/globby": "^2.0.6",
60
+ "@sprucelabs/globby": "^2.0.8",
61
61
  "chalk": "^4.1.2",
62
62
  "tsconfig-paths": "^4.2.0",
63
63
  "yargs": "^17.7.2"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@sprucelabs/semantic-release": "^5.0.1",
67
- "@sprucelabs/test": "^9.0.6",
67
+ "@sprucelabs/test": "^9.0.7",
68
68
  "@types/fs-extra": "^11.0.4",
69
69
  "chokidar-cli": "^3.0.0",
70
70
  "concurrently": "^8.2.2",