Socket
Socket
Sign inDemoInstall

rollup-plugin-cjs-es

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-cjs-es - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

lib/unwrap-import.js

30

index.js

@@ -9,3 +9,4 @@ const path = require("path");

const nodeResolve = promisify(require("resolve"));
const {wrapImport, unwrapImport} = require("./lib/transform");
const {wrapImport} = require("./lib/wrap-import");
const {unwrapImport} = require("./lib/unwrap-import");

@@ -119,20 +120,13 @@ function joinMaps(maps) {

if (options.splitCode) {
let result;
try {
result = wrapImport({
code,
parse,
ast,
shouldSplitCode: importee => {
if (typeof options.splitCode === "function") {
return options.splitCode(id, importee);
}
return false;
const result = wrapImport({
code,
parse,
ast,
shouldSplitCode: importee => {
if (typeof options.splitCode === "function") {
return options.splitCode(id, importee);
}
});
} catch (err) {
const pos = err.node ? err.node.start : null;
this.error(err, pos);
return;
}
return false;
}
});
if (result.isTouched) {

@@ -139,0 +133,0 @@ code = result.code;

7

package.json
{
"name": "rollup-plugin-cjs-es",
"version": "0.3.0",
"version": "0.3.1",
"description": "Convert CommonJS module into ES module",

@@ -17,3 +17,4 @@ "keywords": [

"scripts": {
"test": "eslint **/*.js && mocha",
"test": "eslint **/*.js && nyc --reporter=html mocha",
"coverage": "nyc report --reporter=text-lcov | coveralls",
"preversion": "npm test",

@@ -26,4 +27,6 @@ "postversion": "git push --follow-tags && npm publish"

"devDependencies": {
"coveralls": "^3.0.0",
"eslint": "^4.19.1",
"mocha": "^5.1.1",
"nyc": "^11.7.1",
"rollup": "^0.58.2"

@@ -30,0 +33,0 @@ },

@@ -5,2 +5,3 @@ rollup-plugin-cjs-es

[![Build Status](https://travis-ci.org/eight04/rollup-plugin-cjs-es.svg?branch=master)](https://travis-ci.org/eight04/rollup-plugin-cjs-es)
[![Coverage Status](https://coveralls.io/repos/github/eight04/rollup-plugin-cjs-es/badge.svg?branch=master)](https://coveralls.io/github/eight04/rollup-plugin-cjs-es?branch=master)

@@ -371,2 +372,6 @@ Convert CommonJS module into ES module. Powered by [cjs-es](https://github.com/eight04/cjs-es).

* 0.3.1 (May 1, 2018)
- Fix: scope is not correctly analyzed in splitCodeTransformer.
* 0.3.0 (May 1, 2018)

@@ -373,0 +378,0 @@

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