@sprucelabs/resolve-path-aliases 1.1.188 → 1.1.190

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/index.js CHANGED
@@ -29,13 +29,16 @@ function buildResolvers(destination) {
29
29
  const outResolver = buildOutResolver(config);
30
30
  return { outResolver, srcResolver };
31
31
  }
32
- function resolvePathAliases(destination, options = {}) {
32
+ function resolvePathAliases(destination, options = {}, globUtil = globby_1.default) {
33
33
  let { outResolver, srcResolver } = buildResolvers(destination);
34
34
  const { patterns = ['**/*.js'], absoluteOrRelative = 'relative', beVerbose: isVerbose = false, } = options;
35
35
  const log = isVerbose ? logLive : logStub;
36
36
  let totalMappedPaths = 0;
37
37
  let totalFilesWithMappedPaths = 0;
38
- const files = globby_1.default.sync(patterns.map((pattern) => path_1.default.join(destination, '/', pattern)), {
38
+ const files = globUtil.sync(patterns.map((pattern) => path_1.default.posix
39
+ .join(destination, '/', pattern)
40
+ .split(path_1.default.sep)
41
+ .join(path_1.default.posix.sep)), {
39
42
  dot: true,
40
43
  });
41
44
  log.info(`Checking ${files.length} files for path aliases...`);
@@ -32,7 +32,7 @@ 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, {
34
34
  absoluteOrRelative,
35
- patterns: patterns ? patterns.split(',') : undefined,
35
+ patterns: patterns ? patterns.replace(/'/g, '').split(',') : undefined,
36
36
  beVerbose: verbose,
37
37
  });
38
38
  if (results.totalMappedPaths === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprucelabs/resolve-path-aliases",
3
- "version": "1.1.188",
3
+ "version": "1.1.190",
4
4
  "description": "Script that resolves paths from your tsconfig",
5
5
  "main": "build/index.js",
6
6
  "repository": "git@github.com:sprucelabsai/resolve-path-aliases.git",