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

cjs-esm

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cjs-esm - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

dist/context.js

@@ -8,3 +8,3 @@ "use strict";

const context = {
ast: acorn_1.parse(code, { ecmaVersion: 'latest' }),
ast: acorn_1.parse(code, { ecmaVersion: 'latest', sourceType: 'module' }),
code,

@@ -11,0 +11,0 @@ sourcemap: null,

@@ -8,5 +8,5 @@ "use strict";

function transform(code, options = {}) {
const context = context_1.createContext({ code });
const analyze = analyze_1.createAnalyze(context);
try {
const context = context_1.createContext({ code });
const analyze = analyze_1.createAnalyze(context);
analyze.analyze();

@@ -17,2 +17,7 @@ transform_1.createTransform(context, {

}).transform();
return {
code: context.transformedCode,
sourcemap: context.sourcemap,
context,
};
}

@@ -22,8 +27,3 @@ catch (error) {

}
return {
code: context.transformedCode,
sourcemap: context.sourcemap,
context,
};
}
exports.transform = transform;
{
"name": "cjs-esm",
"version": "0.1.1",
"version": "0.1.2",
"description": "Another CommonJs transform ESModule lib.",

@@ -11,3 +11,3 @@ "main": "dist/index.js",

"dev": "tsc --watch",
"build": "tsc"
"build": "rm -rf dist && tsc"
},

@@ -14,0 +14,0 @@ "dependencies": {

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