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

rollup-plugin-commonjs

Package Overview
Dependencies
Maintainers
2
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 4.0.0 to 4.0.1

4

CHANGELOG.md
# rollup-plugin-commonjs changelog
## 4.0.1
* Fix `ignoreGlobal` option ([#86](https://github.com/rollup/rollup-plugin-commonjs/pull/86))
## 4.0.0

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

6

dist/rollup-plugin-commonjs.cjs.js

@@ -196,3 +196,3 @@ 'use strict';

uses[ node.name ] = true;
if ( node.name === 'global' ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal") );
if ( node.name === 'global' && !ignoreGlobal ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal") );
}

@@ -204,3 +204,3 @@ return;

uses.global = true;
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true );
if ( !ignoreGlobal ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true );
return;

@@ -243,3 +243,3 @@ }

if ( !sources.length && !uses.module && !uses.exports && !uses.global ) {
if ( !sources.length && !uses.module && !uses.exports && ( ignoreGlobal || !uses.global ) ) {
if ( Object.keys( namedExports ).length ) {

@@ -246,0 +246,0 @@ throw new Error( ("Custom named exports were specified for " + id + " but it does not appear to be a CommonJS module") );

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

uses[ node.name ] = true;
if ( node.name === 'global' ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal") );
if ( node.name === 'global' && !ignoreGlobal ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal") );
}

@@ -201,3 +201,3 @@ return;

uses.global = true;
magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true );
if ( !ignoreGlobal ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal"), true );
return;

@@ -240,3 +240,3 @@ }

if ( !sources.length && !uses.module && !uses.exports && !uses.global ) {
if ( !sources.length && !uses.module && !uses.exports && ( ignoreGlobal || !uses.global ) ) {
if ( Object.keys( namedExports ).length ) {

@@ -243,0 +243,0 @@ throw new Error( ("Custom named exports were specified for " + id + " but it does not appear to be a CommonJS module") );

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

@@ -5,0 +5,0 @@ "devDependencies": {

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

uses[ node.name ] = true;
if ( node.name === 'global' ) magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal` );
if ( node.name === 'global' && !ignoreGlobal ) magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal` );
}

@@ -118,3 +118,3 @@ return;

uses.global = true;
magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, true );
if ( !ignoreGlobal ) magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal`, true );
return;

@@ -157,3 +157,3 @@ }

if ( !sources.length && !uses.module && !uses.exports && !uses.global ) {
if ( !sources.length && !uses.module && !uses.exports && ( ignoreGlobal || !uses.global ) ) {
if ( Object.keys( namedExports ).length ) {

@@ -160,0 +160,0 @@ throw new Error( `Custom named exports were specified for ${id} but it does not appear to be a CommonJS module` );

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