@travetto/transformer 4.0.0-rc.2 → 4.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/transformer",
3
- "version": "4.0.0-rc.2",
3
+ "version": "4.0.0-rc.4",
4
4
  "description": "Functionality for AST transformations, with transformer registration, and general utils",
5
5
  "keywords": [
6
6
  "typescript",
@@ -24,7 +24,7 @@
24
24
  "directory": "module/transformer"
25
25
  },
26
26
  "dependencies": {
27
- "@travetto/manifest": "^4.0.0-rc.2",
27
+ "@travetto/manifest": "^4.0.0-rc.4",
28
28
  "tslib": "^2.6.2",
29
29
  "typescript": "^5.3.3"
30
30
  },
package/src/importer.ts CHANGED
@@ -65,7 +65,8 @@ export class ImportManager {
65
65
  const type = this.#resolver.getType(el.name);
66
66
  const objFlags = DeclarationUtil.getObjectFlags(type);
67
67
  const typeFlags = type.getFlags();
68
- if (objFlags || typeFlags !== 1) {
68
+ // eslint-disable-next-line no-bitwise
69
+ if (!(objFlags & (ts.SymbolFlags.Type | ts.SymbolFlags.Interface)) || !(typeFlags & ts.TypeFlags.Any)) {
69
70
  newBindings.push(el);
70
71
  }
71
72
  }
package/src/visitor.ts CHANGED
@@ -79,7 +79,7 @@ export class VisitorFactory<S extends State = State> {
79
79
  visitor(): ts.TransformerFactory<ts.SourceFile> {
80
80
  return (context: ts.TransformationContext) => (file: ts.SourceFile): ts.SourceFile => {
81
81
  const type = ManifestModuleUtil.getFileType(file.fileName);
82
- if (type !== 'ts') { // Skip all non-ts files
82
+ if (type !== 'ts' || /^\/\/\s*@trv-no-transform/.test(file.getFullText())) { // Skip all non-ts files
83
83
  return file;
84
84
  }
85
85