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

@travetto/transformer

Package Overview
Dependencies
Maintainers
0
Versions
146
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 5.0.0-rc.4 to 5.0.0-rc.5

4

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

@@ -27,3 +27,3 @@ "keywords": [

"dependencies": {
"@travetto/manifest": "^5.0.0-rc.3",
"@travetto/manifest": "^5.0.0-rc.4",
"tslib": "^2.6.3",

@@ -30,0 +30,0 @@ "typescript": "^5.5.3"

@@ -108,3 +108,3 @@ <!-- This file was generated by @travetto/doc and should not be modified directly -->

const Ⲑ_function_1 = tslib_1.__importStar(require("@travetto/runtime/src/function.js"));
var ᚕm = ["@travetto/transformer", "doc/upper"];
var ᚕm = ["@travetto/transformer", "doc/upper.ts"];
class TEST {

@@ -111,0 +111,0 @@ static Ⲑinit = Ⲑ_function_1.registerFunction(TEST, ᚕm, { hash: 649563175, lines: [1, 9] }, { COMPUTEAGE: { hash: 1286718349, lines: [6, 8, 7] } }, false, false);

import ts from 'typescript';
import { PackageUtil, path } from '@travetto/manifest';
import { ManifestModuleUtil, PackageUtil, path } from '@travetto/manifest';

@@ -107,2 +107,6 @@ import { AnyType, TransformResolver, ManagedType } from './resolver/types';

if (file.endsWith('.ts') && !file.endsWith('.d.ts')) {
file = ManifestModuleUtil.withOutputExtension(file);
}
// Allow for node classes to be imported directly

@@ -109,0 +113,0 @@ if (/@types\/node/.test(file)) {

import ts from 'typescript';
import { ManifestIndex } from '@travetto/manifest';
import { ManifestIndex, ManifestModuleUtil } from '@travetto/manifest';

@@ -28,3 +28,3 @@ import { NodeTransformer } from './types/visitor';

const entry = manifestIndex.getEntry(file)!;
transformers.push(...getAllTransformers(await import(entry.import), entry.module));
transformers.push(...getAllTransformers(await import(ManifestModuleUtil.withOutputExtension(entry.import)), entry.module));
}

@@ -31,0 +31,0 @@

@@ -44,4 +44,5 @@ import ts from 'typescript';

return this.#manifestIndex.getEntry(ManifestModuleUtil.getFileType(sourceFile) === 'ts' ? sourceFile : `${sourceFile}.js`) ??
this.#manifestIndex.getFromImport(ManifestModuleUtil.sourceToBlankExt(sourceFile).replace(/^.*node_modules\//, ''));
this.#manifestIndex.getFromImport(ManifestModuleUtil.withoutSourceExtension(sourceFile).replace(/^.*node_modules\//, ''));
}
/**

@@ -52,3 +53,3 @@ * Resolve an import name (e.g. @module/path/file) for a file

const imp = this.getFileImport(file)?.import ?? file;
return removeExt ? ManifestModuleUtil.sourceToBlankExt(imp) : imp;
return removeExt ? ManifestModuleUtil.withoutSourceExtension(imp) : imp;
}

@@ -55,0 +56,0 @@

import ts from 'typescript';
import { path, ManifestIndex, ManifestModuleUtil } from '@travetto/manifest';
import { path, ManifestIndex } from '@travetto/manifest';

@@ -269,3 +269,3 @@ import { ManagedType, AnyType, ForeignType } from './resolver/types';

const decl = this.factory.createVariableDeclaration(this.#modIdent, undefined, undefined,
this.fromLiteral([entry?.module, ManifestModuleUtil.sourceToBlankExt(entry?.relativeFile ?? '')])
this.fromLiteral([entry?.module, entry?.relativeFile ?? ''])
);

@@ -272,0 +272,0 @@ this.addStatements([

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