@travetto/compiler
Advanced tools
Comparing version 0.0.31 to 0.0.33
@@ -22,3 +22,3 @@ { | ||
"scripts": {}, | ||
"version": "0.0.31" | ||
"version": "0.0.33" | ||
} |
@@ -32,6 +32,5 @@ import * as ts from 'typescript'; | ||
if (ident && ident.escapedText in patterns) { | ||
const res = state.imports.get(ident.escapedText! as string)!; | ||
const path = res && res.path; | ||
const { path } = state.imports.get(ident.escapedText! as string)!; | ||
const packages = patterns[ident.escapedText as string]; | ||
if (path && (path.includes('@travetto') || (!path.includes('node_modules') && AppInfo.PACKAGE === '@travetto'))) { | ||
if (path.includes('@travetto') || (!path.includes('node_modules') && AppInfo.PACKAGE === '@travetto')) { | ||
let pkg = ''; | ||
@@ -213,10 +212,13 @@ if (!path.includes('node_modules')) { | ||
static buildImportAliasMap(pathToType: { [key: string]: string } = {}) { | ||
static buildImportAliasMap(pathToType: { [key: string]: string | string[] } = {}) { | ||
const out: { [key: string]: Set<string> } = {}; | ||
for (const [k, v] of Object.entries(pathToType)) { | ||
if (!(v in out)) { | ||
out[v] = new Set(); | ||
const ls = Array.isArray(v) ? v : [v]; | ||
for (const lsi of ls) { | ||
if (!(lsi in out)) { | ||
out[lsi] = new Set(); | ||
} | ||
out[lsi].add(k); | ||
} | ||
out[v].add(k); | ||
} | ||
@@ -223,0 +225,0 @@ |
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
26793
731