rollup-plugin-commonjs
Advanced tools
Comparing version 7.0.0 to 7.0.1
# 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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
148853
10
1409
+ Addedestree-walker@0.6.1(transitive)
+ Addedrollup-pluginutils@2.8.2(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedestree-walker@0.2.1(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedrollup-pluginutils@1.5.2(transitive)
Updatedrollup-pluginutils@^2.0.1