New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@travetto/transformer

Package Overview
Dependencies
Maintainers
1
Versions
150
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.0.0-rc.0 to 3.0.0-rc.1

2

package.json
{
"name": "@travetto/transformer",
"displayName": "Transformation",
"version": "3.0.0-rc.0",
"version": "3.0.0-rc.1",
"description": "Functionality for AST transformations, with transformer registration, and general utils",

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

@@ -167,5 +167,5 @@ import * as ts from 'typescript';

getDecoratorList(node: ts.Node): DecoratorMeta[] {
return (node.decorators ?? [])
return ts.canHaveDecorators(node) ? (ts.getDecorators(node) ?? [])
.map(dec => this.getDecoratorMeta(dec))
.filter(x => !!x.ident);
.filter(x => !!x.ident) : [];
}

@@ -172,0 +172,0 @@

@@ -27,7 +27,10 @@ import * as ts from 'typescript';

*/
static spliceDecorators(node: ts.Node, target: ts.Decorator | undefined, replacements: ts.Decorator[], idx = -1): ts.Decorator[] {
static spliceDecorators(node: ts.Node, target: ts.Decorator | undefined, replacements: ts.Decorator[], idx = -1): ts.ModifierLike[] {
if (!ts.canHaveDecorators(node)) {
return [];
}
if (idx < 0 && target) {
idx = node.decorators?.indexOf(target) ?? -1;
idx = node.modifiers?.indexOf(target) ?? -1;
}
const out = (node.decorators ?? []).filter(x => x !== target);
const out = (node.modifiers ?? []).filter(x => x !== target);
if (idx < 0) {

@@ -34,0 +37,0 @@ out.push(...replacements);

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