Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/transformer

Package Overview
Dependencies
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/transformer - npm Package Compare versions

Comparing version 3.1.0-rc.4 to 3.1.0-rc.5

2

package.json
{
"name": "@travetto/transformer",
"version": "3.1.0-rc.4",
"version": "3.1.0-rc.5",
"description": "Functionality for AST transformations, with transformer registration, and general utils",

@@ -5,0 +5,0 @@ "keywords": [

@@ -56,9 +56,10 @@ /* eslint-disable no-bitwise */

} else if (objectFlags & ts.ObjectFlags.Anonymous) {
const source = DeclarationUtil.getPrimaryDeclarationNode(type).getSourceFile();
const sourceFile = source.fileName;
if (sourceFile?.endsWith('.d.ts') && !resolver.isKnownFile(sourceFile)) {
return { category: 'foreign', type };
} else {
return { category: 'shape', type };
}
try {
const source = DeclarationUtil.getPrimaryDeclarationNode(type).getSourceFile();
const sourceFile = source.fileName;
if (sourceFile?.endsWith('.d.ts') && !resolver.isKnownFile(sourceFile)) {
return { category: 'foreign', type };
}
} catch { }
return { category: 'shape', type };
} else if (objectFlags & (ts.ObjectFlags.Reference | ts.ObjectFlags.Class | ts.ObjectFlags.Interface)) {

@@ -65,0 +66,0 @@ let resolvedType = type;

@@ -5,3 +5,3 @@ import ts from 'typescript';

import { ManagedType, AnyType } from './resolver/types';
import { ManagedType, AnyType, ForeignType } from './resolver/types';
import { State, DecoratorMeta, Transformer, ModuleNameⲐ } from './types/visitor';

@@ -360,2 +360,11 @@ import { SimpleResolver } from './resolver/service';

}
/**
* Get foreign target
*/
getForeignTarget(state: TransformerState, ret: ForeignType): ts.Expression {
return state.fromLiteral({
Ⲑid: `${ret.source.split('node_modules')[1]}+${ret.name}`
});
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc