@travetto/transformer
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "@travetto/transformer", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Functionality for AST transformations, with transformer registration, and general utils", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -15,2 +15,4 @@ /* eslint-disable no-bitwise */ | ||
const TYPINGS_RE = /[.]d[.][cm]?ts$/; | ||
/** | ||
@@ -64,3 +66,3 @@ * List of global types that can be parameterized | ||
const sourceFile = source.fileName; | ||
if (sourceFile?.endsWith('.d.ts') && !resolver.isKnownFile(sourceFile)) { | ||
if (sourceFile && TYPINGS_RE.test(sourceFile) && !resolver.isKnownFile(sourceFile)) { | ||
return { category: 'foreign', type }; | ||
@@ -84,3 +86,3 @@ } | ||
return { category: 'literal', type }; | ||
} else if (sourceFile?.endsWith('.d.ts') && !resolver.isKnownFile(sourceFile)) { | ||
} else if (sourceFile && TYPINGS_RE.test(sourceFile) && !resolver.isKnownFile(sourceFile)) { | ||
return { category: 'foreign', type: resolvedType }; | ||
@@ -87,0 +89,0 @@ } else if (!resolvedType.isClass()) { // Not a real type |
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
94055
2361