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

@alcalzone/esm2cjs

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alcalzone/esm2cjs - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

17

bin/esm2cjs.js

@@ -27,2 +27,15 @@ #!/usr/bin/env node

})
.option("platform", {
alias: "p",
type: "string",
default: "node",
choices: ["node", "browser", "neutral"],
description: "Change the platform the code is meant to be run on. Details see https://esbuild.github.io/api/#platform"
})
.option("target", {
alias: "t",
type: "string",
default: "node10",
description: "Override the default compile target. Details see https://esbuild.github.io/api/#target"
})
.option("loglevel", {

@@ -42,3 +55,3 @@ alias: "l",

.option("writePackageJson", {
alias: "p",
alias: "j",
type: "boolean",

@@ -69,2 +82,4 @@ default: true,

globs: argv.glob,
target: argv.target,
platform: /** @type {any} */ (argv.platform),
writePackageJson: argv.writePackageJson,

@@ -71,0 +86,0 @@ logLevel: /** @type {any} */ (argv.loglevel),

4

package.json

@@ -7,3 +7,3 @@ {

"description": "Command line utility to compile a JS project from ES modules to CommonJS",
"version": "1.0.0",
"version": "1.1.0",
"bin": "bin/esm2cjs.js",

@@ -65,2 +65,2 @@ "main": "build/cjs/index.js",

}
}
}
# esm2cjs
Command line utility to compile a JS project from ES modules to CommonJS.
This is handy when building hybrid ESM/CommonJS npm packages.
Command line utility to compile a JS project from ES modules to CommonJS. This is handy when building hybrid ESM/CommonJS npm packages.
Built on top of the blazing fast [esbuild](https://github.com/evanw/esbuild) and supports all modern JS features.
## Install (globally)
```bash

@@ -26,4 +28,20 @@ # using npm

## Performance
### Test case 1: [`zwave-js`](https://github.com/zwave-js/node-zwave-js)
| No. of input files | total size | time taken |
| ------------------ | ---------- | ---------- |
| 141 | 987 KB | 390 ms |
## Changelog
<!--
Placeholder for the next version:
### **WORK IN PROGRESS**
-->
### 1.1.0 (2021-06-19)
* Support specifying output target and platform
### 1.0.0 (2021-06-16)
Initial release
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