Comparing version 1.3.1 to 1.3.2
@@ -112,3 +112,5 @@ "use strict"; | ||
const replaceImportStatement = ({ orig, file, alias }) => { | ||
const requiredModule = orig.split(/"|'/)[1]; | ||
var _a, _b; | ||
const requiredModule = (_b = (_a = orig.match(utils_1.newStringRegex())) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.path; | ||
assert(typeof requiredModule == 'string', `Unexpected import statement pattern ${orig}`); | ||
const index = orig.indexOf(alias.prefix); | ||
@@ -115,0 +117,0 @@ const isAlias = requiredModule.includes('/') |
@@ -7,4 +7,4 @@ "use strict"; | ||
const path_1 = require("path"); | ||
const anyQuote = '["\'`]'; | ||
const notQuote = '[^"\'`]'; | ||
const anyQuote = '["\']'; | ||
const notQuote = '[^"\']'; | ||
const importString = `(?:${anyQuote}${notQuote}+${anyQuote})`; | ||
@@ -11,0 +11,0 @@ const funcStyle = `(?:\\b(?:import|require)\\s*\\(\\s*${importString}\\s*\\))`; |
{ | ||
"name": "tsc-alias", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"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
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
55516
486