rollup-plugin-commonjs
Advanced tools
Comparing version 8.2.0 to 8.2.1
# rollup-plugin-commonjs changelog | ||
## 8.2.1 | ||
* Fix magic-string deprecation warning | ||
## 8.2.0 | ||
@@ -4,0 +8,0 @@ |
@@ -309,3 +309,3 @@ 'use strict'; | ||
uses.global = true; | ||
if ( !ignoreGlobal ) { magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true ); } | ||
if ( !ignoreGlobal ) { magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), { storeName: true } ); } | ||
return; | ||
@@ -322,3 +322,3 @@ } | ||
if ( flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports' ) { | ||
magicString.overwrite( node.start, node.end, "'object'", false ); | ||
magicString.overwrite( node.start, node.end, "'object'", { storeName: false } ); | ||
} | ||
@@ -334,3 +334,3 @@ } | ||
if ( allowDynamicRequire ) { return; } | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsRequire"), true ); | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsRequire"), { storeName: true } ); | ||
} | ||
@@ -340,3 +340,3 @@ | ||
if ( node.name === 'global' && !ignoreGlobal ) { | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true ); | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), { storeName: true } ); | ||
} | ||
@@ -352,3 +352,3 @@ | ||
if ( node.name === 'define' ) { | ||
magicString.overwrite( node.start, node.end, 'undefined', true ); | ||
magicString.overwrite( node.start, node.end, 'undefined', { storeName: true } ); | ||
} | ||
@@ -355,0 +355,0 @@ |
@@ -305,3 +305,3 @@ import { statSync } from 'fs'; | ||
uses.global = true; | ||
if ( !ignoreGlobal ) { magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true ); } | ||
if ( !ignoreGlobal ) { magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), { storeName: true } ); } | ||
return; | ||
@@ -318,3 +318,3 @@ } | ||
if ( flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports' ) { | ||
magicString.overwrite( node.start, node.end, "'object'", false ); | ||
magicString.overwrite( node.start, node.end, "'object'", { storeName: false } ); | ||
} | ||
@@ -330,3 +330,3 @@ } | ||
if ( allowDynamicRequire ) { return; } | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsRequire"), true ); | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsRequire"), { storeName: true } ); | ||
} | ||
@@ -336,3 +336,3 @@ | ||
if ( node.name === 'global' && !ignoreGlobal ) { | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true ); | ||
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), { storeName: true } ); | ||
} | ||
@@ -348,3 +348,3 @@ | ||
if ( node.name === 'define' ) { | ||
magicString.overwrite( node.start, node.end, 'undefined', true ); | ||
magicString.overwrite( node.start, node.end, 'undefined', { storeName: true } ); | ||
} | ||
@@ -351,0 +351,0 @@ |
{ | ||
"name": "rollup-plugin-commonjs", | ||
"version": "8.2.0", | ||
"version": "8.2.1", | ||
"description": "Convert CommonJS modules to ES2015", | ||
@@ -5,0 +5,0 @@ "main": "dist/rollup-plugin-commonjs.cjs.js", |
@@ -144,3 +144,3 @@ import acorn from 'acorn'; | ||
uses.global = true; | ||
if ( !ignoreGlobal ) magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, true ); | ||
if ( !ignoreGlobal ) magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { storeName: true } ); | ||
return; | ||
@@ -157,3 +157,3 @@ } | ||
if ( flattened.keypath === 'module.exports' || flattened.keypath === 'module' || flattened.keypath === 'exports' ) { | ||
magicString.overwrite( node.start, node.end, `'object'`, false ); | ||
magicString.overwrite( node.start, node.end, `'object'`, { storeName: false } ); | ||
} | ||
@@ -169,3 +169,3 @@ } | ||
if ( allowDynamicRequire ) return; | ||
magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, true ); | ||
magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsRequire`, { storeName: true } ); | ||
} | ||
@@ -175,3 +175,3 @@ | ||
if ( node.name === 'global' && !ignoreGlobal ) { | ||
magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, true ); | ||
magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, { storeName: true } ); | ||
} | ||
@@ -187,3 +187,3 @@ | ||
if ( node.name === 'define' ) { | ||
magicString.overwrite( node.start, node.end, 'undefined', true ); | ||
magicString.overwrite( node.start, node.end, 'undefined', { storeName: true } ); | ||
} | ||
@@ -190,0 +190,0 @@ |
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
182445