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

rollup-plugin-commonjs

Package Overview
Dependencies
Maintainers
1
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 3.0.1 to 3.0.2

4

CHANGELOG.md
# rollup-plugin-commonjs changelog
## 3.0.2
* Handle multiple references to `global`
## 3.0.1

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

2

dist/rollup-plugin-commonjs.cjs.js

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

if ( node.type === 'Identifier' ) {
if ( ( node.name in uses && !uses[ node.name ] ) && isReference( node, parent ) && !scope.contains( node.name ) ) {
if ( ( node.name in uses ) && isReference( node, parent ) && !scope.contains( node.name ) ) {
uses[ node.name ] = true;

@@ -209,0 +209,0 @@ if ( node.name === 'global' ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal") );

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

if ( node.type === 'Identifier' ) {
if ( ( node.name in uses && !uses[ node.name ] ) && isReference( node, parent ) && !scope.contains( node.name ) ) {
if ( ( node.name in uses ) && isReference( node, parent ) && !scope.contains( node.name ) ) {
uses[ node.name ] = true;

@@ -205,0 +205,0 @@ if ( node.name === 'global' ) magicString.overwrite( node.start, node.end, (HELPERS_NAME + ".commonjsGlobal") );

{
"name": "rollup-plugin-commonjs",
"version": "3.0.1",
"version": "3.0.2",
"description": "Convert CommonJS modules to ES2015",
"devDependencies": {
"buble": "^0.10.6",
"eslint": "^2.11.1",
"buble": "^0.12.3",
"eslint": "^2.13.1",
"mocha": "^2.5.3",
"rollup": "^0.27.1",
"rollup-plugin-buble": "^0.10.0",
"rollup-plugin-node-resolve": "^1.6.0",
"rollup": "^0.33.0",
"rollup-plugin-buble": "^0.12.1",
"rollup-plugin-node-resolve": "^1.7.1",
"source-map": "^0.5.6"

@@ -28,5 +28,5 @@ },

"dependencies": {
"acorn": "^3.1.0",
"acorn": "^3.2.0",
"estree-walker": "^0.2.1",
"magic-string": "^0.15.0",
"magic-string": "^0.15.2",
"resolve": "^1.1.7",

@@ -33,0 +33,0 @@ "rollup-pluginutils": "^1.5.0"

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

if ( node.type === 'Identifier' ) {
if ( ( node.name in uses && !uses[ node.name ] ) && isReference( node, parent ) && !scope.contains( node.name ) ) {
if ( ( node.name in uses ) && isReference( node, parent ) && !scope.contains( node.name ) ) {
uses[ node.name ] = true;

@@ -175,0 +175,0 @@ if ( node.name === 'global' ) magicString.overwrite( node.start, node.end, `${HELPERS_NAME}.commonjsGlobal` );

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