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
73
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 13.0.2 to 14.0.0

8

CHANGELOG.md
# @rollup/plugin-commonjs ChangeLog
## v14.0.0
_2020-07-13_
### Release Notes
This restores the fixes from v13.0.1, but as a semver compliant major version.
## v13.0.2

@@ -4,0 +12,0 @@

20

dist/index.es.js

@@ -197,6 +197,2 @@ import { statSync, existsSync, readFileSync } from 'fs';

export function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
export function createCommonjsModule(fn, basedir, module) {

@@ -553,2 +549,12 @@ return module = {

function isNodeRequireStatement(parent) {
const reservedMethod = ['resolve', 'cache', 'main'];
if (parent && parent.property && reservedMethod.indexOf(parent.property.name) > -1) {
return true;
}
return false;
}
function isIgnoredRequireStatement(requiredNode) {

@@ -720,2 +726,6 @@ return ignoreRequire(requiredNode.arguments[0].value);

if (isRequireIdentifier(node)) {
if (isNodeRequireStatement(parent)) {
return;
}
if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {

@@ -972,3 +982,3 @@ return;

const defaultExport = /__esModule/.test(code) ? `export default /*@__PURE__*/${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`;
const defaultExport = `export default ${moduleName};`;
const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str);

@@ -975,0 +985,0 @@ const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`;

@@ -201,6 +201,2 @@ 'use strict';

export function unwrapExports (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
export function createCommonjsModule(fn, basedir, module) {

@@ -557,2 +553,12 @@ return module = {

function isNodeRequireStatement(parent) {
const reservedMethod = ['resolve', 'cache', 'main'];
if (parent && parent.property && reservedMethod.indexOf(parent.property.name) > -1) {
return true;
}
return false;
}
function isIgnoredRequireStatement(requiredNode) {

@@ -724,2 +730,6 @@ return ignoreRequire(requiredNode.arguments[0].value);

if (isRequireIdentifier(node)) {
if (isNodeRequireStatement(parent)) {
return;
}
if (!isDynamicRequireModulesEnabled && isStaticRequireStatement(parent)) {

@@ -976,3 +986,3 @@ return;

const defaultExport = /__esModule/.test(code) ? `export default /*@__PURE__*/${HELPERS_NAME}.unwrapExports(${moduleName});` : `export default ${moduleName};`;
const defaultExport = `export default ${moduleName};`;
const named = namedExportDeclarations.filter(x => x.name !== 'default' || !hasDefaultExport).map(x => x.str);

@@ -979,0 +989,0 @@ const exportBlock = `\n\n${(isEsModule ? [] : [defaultExport]).concat(named).concat(hasDefaultExport ? defaultExportPropertyAssignments : []).join('\n')}`;

{
"name": "@rollup/plugin-commonjs",
"version": "13.0.2",
"version": "14.0.0",
"publishConfig": {

@@ -5,0 +5,0 @@ "access": "public"

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