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

rollup-plugin-commonjs

Package Overview
Dependencies
Maintainers
3
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-commonjs - npm Package Compare versions

Comparing version 7.0.0 to 7.0.1

4

CHANGELOG.md
# rollup-plugin-commonjs changelog
## 7.0.1
* Fix exports with parentheses ([#168](https://github.com/rollup/rollup-plugin-commonjs/issues/168))
## 7.0.0

@@ -4,0 +8,0 @@

6

dist/rollup-plugin-commonjs.cjs.js

@@ -401,5 +401,3 @@ 'use strict';

if ( node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression' ) {
var ref = node.expression;
var left = ref.left;
var right = ref.right;
var left = node.expression.left;
var flattened = flatten( left );

@@ -421,3 +419,3 @@

magicString.overwrite( node.start, right.start, ("var " + deconflicted + " = ") );
magicString.overwrite( node.start, left.end, ("var " + deconflicted) );

@@ -424,0 +422,0 @@ var declaration = name === deconflicted ?

@@ -398,5 +398,3 @@ import { statSync } from 'fs';

if ( node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression' ) {
var ref = node.expression;
var left = ref.left;
var right = ref.right;
var left = node.expression.left;
var flattened = flatten( left );

@@ -418,3 +416,3 @@

magicString.overwrite( node.start, right.start, ("var " + deconflicted + " = ") );
magicString.overwrite( node.start, left.end, ("var " + deconflicted) );

@@ -421,0 +419,0 @@ var declaration = name === deconflicted ?

{
"name": "rollup-plugin-commonjs",
"version": "7.0.0",
"version": "7.0.1",
"description": "Convert CommonJS modules to ES2015",

@@ -13,2 +13,3 @@ "main": "dist/rollup-plugin-commonjs.cjs.js",

"build": "rm -rf dist/* && rollup -c",
"dev": "rollup -c -w",
"lint": "eslint src",

@@ -27,3 +28,3 @@ "prepublish": "npm run lint && npm test"

"resolve": "^1.1.7",
"rollup-pluginutils": "^1.5.1"
"rollup-pluginutils": "^2.0.1"
},

@@ -35,5 +36,6 @@ "devDependencies": {

"mocha": "^3.0.2",
"rollup": "^0.37.0",
"rollup": "^0.40.2",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-node-resolve": "^2.0.0",
"rollup-watch": "^3.1.0",
"source-map": "^0.5.6",

@@ -40,0 +42,0 @@ "source-map-support": "^0.4.2"

@@ -83,10 +83,10 @@ # rollup-plugin-commonjs [![Build Status][travis-img]][travis]

```js
commonjs({
namedExports: {
// left-hand side can be an absolute path, a path
// relative to the current directory, or the name
// of a module in node_modules
'node_modules/my-lib/index.js': [ 'named' ]
}
});
commonjs({
namedExports: {
// left-hand side can be an absolute path, a path
// relative to the current directory, or the name
// of a module in node_modules
'node_modules/my-lib/index.js': [ 'named' ]
}
})
```

@@ -93,0 +93,0 @@

@@ -273,3 +273,3 @@ import acorn from 'acorn';

if ( node.type === 'ExpressionStatement' && node.expression.type === 'AssignmentExpression' ) {
const { left, right } = node.expression;
const left = node.expression.left;
const flattened = flatten( left );

@@ -291,3 +291,3 @@

magicString.overwrite( node.start, right.start, `var ${deconflicted} = ` );
magicString.overwrite( node.start, left.end, `var ${deconflicted}` );

@@ -294,0 +294,0 @@ const declaration = name === deconflicted ?

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