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

rollup-plugin-commonjs

Package Overview
Dependencies
Maintainers
4
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 9.0.0 to 9.1.0

12

CHANGELOG.md
# rollup-plugin-commonjs changelog
## 9.1.0
* Do not automatically wrap modules with return statements in top level arrow functions ([#302](https://github.com/rollup/rollup-plugin-commonjs/issues/302))
## 9.0.0
* Make rollup a peer dependency with a version range ([#300](https://github.com/rollup/rollup-plugin-commonjs/issues/300))
## 8.4.1
* Re-release of 8.3.0 as #287 was actually a breaking change
## 8.4.0

@@ -4,0 +16,0 @@

5

dist/rollup-plugin-commonjs.cjs.js

@@ -180,2 +180,3 @@ 'use strict';

var importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
var functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;

@@ -312,3 +313,3 @@ function deconflict ( scope, globals, identifier ) {

if ( node.scope ) { scope = node.scope; }
if ( /^Function/.test( node.type ) ) { lexicalDepth += 1; }
if ( functionType.test( node.type ) ) { lexicalDepth += 1; }

@@ -437,3 +438,3 @@ // if toplevel return, we need to wrap it

if ( node.scope ) { scope = scope.parent; }
if ( /^Function/.test( node.type ) ) { lexicalDepth -= 1; }
if ( functionType.test( node.type ) ) { lexicalDepth -= 1; }

@@ -440,0 +441,0 @@ if ( node.type === 'VariableDeclaration' ) {

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

var importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
var functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;

@@ -308,3 +309,3 @@ function deconflict ( scope, globals, identifier ) {

if ( node.scope ) { scope = node.scope; }
if ( /^Function/.test( node.type ) ) { lexicalDepth += 1; }
if ( functionType.test( node.type ) ) { lexicalDepth += 1; }

@@ -433,3 +434,3 @@ // if toplevel return, we need to wrap it

if ( node.scope ) { scope = scope.parent; }
if ( /^Function/.test( node.type ) ) { lexicalDepth -= 1; }
if ( functionType.test( node.type ) ) { lexicalDepth -= 1; }

@@ -436,0 +437,0 @@ if ( node.type === 'VariableDeclaration' ) {

2

package.json
{
"name": "rollup-plugin-commonjs",
"version": "9.0.0",
"version": "9.1.0",
"description": "Convert CommonJS modules to ES2015",

@@ -5,0 +5,0 @@ "main": "dist/rollup-plugin-commonjs.cjs.js",

@@ -17,2 +17,3 @@ import { walk } from 'estree-walker';

const importExportDeclaration = /^(?:Import|Export(?:Named|Default))Declaration/;
const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;

@@ -147,3 +148,3 @@ function deconflict ( scope, globals, identifier ) {

if ( node.scope ) scope = node.scope;
if ( /^Function/.test( node.type ) ) lexicalDepth += 1;
if ( functionType.test( node.type ) ) lexicalDepth += 1;

@@ -272,3 +273,3 @@ // if toplevel return, we need to wrap it

if ( node.scope ) scope = scope.parent;
if ( /^Function/.test( node.type ) ) lexicalDepth -= 1;
if ( functionType.test( node.type ) ) lexicalDepth -= 1;

@@ -275,0 +276,0 @@ if ( node.type === 'VariableDeclaration' ) {

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