Comparing version 1.8.9 to 1.8.10
@@ -14,2 +14,5 @@ #! /usr/bin/env node | ||
.option('-f, --resolve-full-paths', 'Attempt to fully resolve import paths if the corresponding .js file can be found') | ||
.addOption(new commander_1.Option('-fe, --resolve-full-extension [ext]', 'Specify the extension of incomplete import paths, works with resolveFullPaths') | ||
.choices(['.js', '.mjs', '.cjs']) | ||
.default('.js')) | ||
.option('-s, --silent', 'Reduced terminal output (default: true) [deprecated]') | ||
@@ -24,2 +27,3 @@ .option('-v, --verbose', 'Additional information is send to the terminal') | ||
(0, __1.replaceTscAliasPaths)({ | ||
resolveFullExtension: options.resolveFullExtension, | ||
configFile: options.project, | ||
@@ -26,0 +30,0 @@ watch: !!options.watch, |
@@ -69,3 +69,3 @@ "use strict"; | ||
const loadConfig = (file, output) => { | ||
var _a, _b; | ||
var _a, _b, _c; | ||
if (!(0, fs_1.existsSync)(file)) { | ||
@@ -105,6 +105,4 @@ output.error(`File ${file} not found`, true); | ||
} | ||
if (TSCAliasConfig === null || TSCAliasConfig === void 0 ? void 0 : TSCAliasConfig.fileExtensions) { | ||
config.fileExtensions = TSCAliasConfig.fileExtensions; | ||
} | ||
const replacerFile = (_b = (_a = config.replacers) === null || _a === void 0 ? void 0 : _a.pathReplacer) === null || _b === void 0 ? void 0 : _b.file; | ||
config.fileExtensions = (_a = TSCAliasConfig === null || TSCAliasConfig === void 0 ? void 0 : TSCAliasConfig.fileExtensions) !== null && _a !== void 0 ? _a : {}; | ||
const replacerFile = (_c = (_b = config.replacers) === null || _b === void 0 ? void 0 : _b.pathReplacer) === null || _c === void 0 ? void 0 : _c.file; | ||
if (replacerFile) { | ||
@@ -111,0 +109,0 @@ config.replacers.pathReplacer.file = (0, path_1.join)(configDir, replacerFile); |
@@ -49,3 +49,4 @@ "use strict"; | ||
resolveFullPath(importPath, ext = '.js') { | ||
if (importPath.match(new RegExp(`\${ext}$`))) { | ||
if (!importPath.startsWith('.') || | ||
importPath.match(new RegExp(`\${ext}$`))) { | ||
return importPath; | ||
@@ -52,0 +53,0 @@ } |
{ | ||
"name": "tsc-alias", | ||
"version": "1.8.9", | ||
"version": "1.8.10", | ||
"description": "Replace alias paths with relative paths after typescript compilation.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
131556
1054