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

@ts-liveserver/ts-transpiler

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ts-liveserver/ts-transpiler - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

11

dist/transformers/CommonJsTransformer.js

@@ -11,2 +11,3 @@ "use strict";

KEYNAME["module"] = "module";
KEYNAME["default"] = "default";
})(KEYNAME || (KEYNAME = {}));

@@ -391,8 +392,3 @@ /*

], typescript_1.default.NodeFlags.Let));
const exportDefaultStatement = typescript_1.default.factory.createExportAssignment(undefined, undefined, undefined, typescript_1.default.factory.createIdentifier(KEYNAME.exports));
const statements = [
moduleExportStatement,
...sourceFile.statements,
exportDefaultStatement,
];
const statements = [moduleExportStatement, ...sourceFile.statements];
if (exportedNames.length) {

@@ -409,2 +405,5 @@ const variableDeclarations = [];

}
if (!exportedNames.includes(KEYNAME.default)) {
statements.push(typescript_1.default.factory.createExportAssignment(undefined, undefined, undefined, typescript_1.default.factory.createIdentifier(KEYNAME.exports)));
}
return typescript_1.default.factory.updateSourceFile(sourceFile, statements);

@@ -411,0 +410,0 @@ }

{
"name": "@ts-liveserver/ts-transpiler",
"version": "0.0.14",
"version": "0.0.15",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "scripts": {

@@ -6,2 +6,3 @@ import TypeScript from 'typescript'

module = 'module',
default = 'default',
}

@@ -667,13 +668,4 @@ /*

)
const exportDefaultStatement: TypeScript.ExportAssignment = TypeScript.factory.createExportAssignment(
undefined,
undefined,
undefined,
TypeScript.factory.createIdentifier(KEYNAME.exports),
)
const statements = [
moduleExportStatement,
...sourceFile.statements,
exportDefaultStatement,
]
const statements = [moduleExportStatement, ...sourceFile.statements]
if (exportedNames.length) {

@@ -718,4 +710,14 @@ const variableDeclarations: TypeScript.VariableDeclaration[] = []

}
if (!exportedNames.includes(KEYNAME.default)) {
statements.push(
TypeScript.factory.createExportAssignment(
undefined,
undefined,
undefined,
TypeScript.factory.createIdentifier(KEYNAME.exports),
),
)
}
return TypeScript.factory.updateSourceFile(sourceFile, statements)
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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