@travetto/transformer
Advanced tools
Comparing version 5.0.13 to 5.1.0
{ | ||
"name": "@travetto/transformer", | ||
"version": "5.0.13", | ||
"version": "5.1.0", | ||
"description": "Functionality for AST transformations, with transformer registration, and general utils", | ||
@@ -27,5 +27,5 @@ "keywords": [ | ||
"dependencies": { | ||
"@travetto/manifest": "^5.0.12", | ||
"@travetto/manifest": "^5.1.0", | ||
"tslib": "^2.8.1", | ||
"typescript": "^5.7.2" | ||
"typescript": "^5.7.3" | ||
}, | ||
@@ -32,0 +32,0 @@ "travetto": { |
@@ -26,6 +26,11 @@ import ts from 'typescript'; | ||
constructor(public source: ts.SourceFile, public factory: ts.NodeFactory, resolver: TransformResolver) { | ||
source: ts.SourceFile; | ||
factory: ts.NodeFactory; | ||
constructor(source: ts.SourceFile, factory: ts.NodeFactory, resolver: TransformResolver) { | ||
this.#imports = ImportUtil.collectImports(source); | ||
this.#resolver = resolver; | ||
this.#importName = this.#resolver.getFileImportName(source.fileName); | ||
this.source = source; | ||
this.factory = factory; | ||
} | ||
@@ -113,3 +118,2 @@ | ||
const suffix = this.#idx[key] = (this.#idx[key] ?? -1) + 1; | ||
// eslint-disable-next-line no-bitwise | ||
this.#ids.set(file, this.factory.createIdentifier(`Δ${key}${suffix ? suffix : ''}`)); | ||
@@ -116,0 +120,0 @@ } |
@@ -40,12 +40,17 @@ import ts from 'typescript'; | ||
#decorators = new Map<string, ts.PropertyAccessExpression>(); | ||
added = new Map<number, ts.Statement[]>(); | ||
importName: string; | ||
file: string; | ||
source: ts.SourceFile; | ||
factory: ts.NodeFactory; | ||
constructor(public source: ts.SourceFile, public factory: ts.NodeFactory, checker: ts.TypeChecker, manifestIndex: ManifestIndex) { | ||
constructor(source: ts.SourceFile, factory: ts.NodeFactory, checker: ts.TypeChecker, manifestIndex: ManifestIndex) { | ||
this.#manifestIndex = manifestIndex; | ||
this.#resolver = new SimpleResolver(checker, manifestIndex); | ||
this.#imports = new ImportManager(source, factory, this.#resolver); | ||
this.file = path.toPosix(this.source.fileName); | ||
this.file = path.toPosix(source.fileName); | ||
this.importName = this.#resolver.getFileImportName(this.file, true); | ||
this.source = source; | ||
this.factory = factory; | ||
} | ||
@@ -52,0 +57,0 @@ |
2442
94725
23
Updated@travetto/manifest@^5.1.0
Updatedtypescript@^5.7.3