@sprucelabs/resolve-path-aliases 2.0.455 → 2.0.457
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/build/PathResolver.js
CHANGED
|
@@ -18,8 +18,7 @@ class PathResolver {
|
|
|
18
18
|
this.globby = globbyUtil;
|
|
19
19
|
}
|
|
20
20
|
static Resolver(globbyUtil = globby_1.default) {
|
|
21
|
-
|
|
22
|
-
return new ((_a = this.Class) !== null && _a !== void 0 ? _a : this)(globbyUtil);
|
|
21
|
+
return new (this.Class ?? this)(globbyUtil);
|
|
23
22
|
}
|
|
24
23
|
buildResolvers(destination) {
|
|
25
24
|
const config = (0, tsconfig_paths_1.loadConfig)(destination);
|
|
@@ -104,7 +103,7 @@ class PathResolver {
|
|
|
104
103
|
const resolver = (0, tsconfig_paths_1.createMatchPath)(config.absoluteBaseUrl, config.paths);
|
|
105
104
|
outResolver = (requested, readJson, fileExists, extensions) => {
|
|
106
105
|
let resolved = resolver(requested, readJson, fileExists, extensions);
|
|
107
|
-
resolved = resolved
|
|
106
|
+
resolved = resolved?.replace(`${path_1.default.sep}${baseUrl}${path_1.default.sep}`, `${path_1.default.sep}${outDir}${path_1.default.sep}`);
|
|
108
107
|
return resolved;
|
|
109
108
|
};
|
|
110
109
|
}
|
|
@@ -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 ?? '');
|
|
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.
|
|
3
|
+
"version": "2.0.457",
|
|
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",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
"watch.tsc": "tsc -w"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@sprucelabs/globby": "^2.0.
|
|
56
|
+
"@sprucelabs/globby": "^2.0.440",
|
|
57
57
|
"chalk": "^4.1.2",
|
|
58
58
|
"tsconfig-paths": "^4.2.0",
|
|
59
59
|
"yargs": "^17.7.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@sprucelabs/semantic-release": "^5.0.2",
|
|
63
|
-
"@sprucelabs/test": "^9.0.
|
|
63
|
+
"@sprucelabs/test": "^9.0.51",
|
|
64
64
|
"@types/fs-extra": "^11.0.4",
|
|
65
65
|
"chokidar-cli": "^3.0.0",
|
|
66
66
|
"eslint": "^9.12.0",
|