Socket
Socket
Sign inDemoInstall

rollup-plugin-node-resolve

Package Overview
Dependencies
3
Maintainers
4
Versions
34
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.4.0 to 4.0.0

32

CHANGELOG.md
# rollup-plugin-node-resolve changelog
## 4.0.0 (2018-12-09)
This release will support rollup@1.0
### Features
* Resolve modules used to define manual chunks ([#185](https://github.com/rollup/rollup-plugin-node-resolve/pull/185) by @mcshaman)
* Update dependencies and plugin hook usage ([#187](https://github.com/rollup/rollup-plugin-node-resolve/pull/187) by @lukastaegert)
## 3.4.0 (2018-09-04)
This release now supports `.mjs` files by default
### Features
* feat: Support .mjs files by default (https://github.com/rollup/rollup-plugin-node-resolve/pull/151, by @leebyron)
## 3.3.0 (2018-03-17)
This release adds the `only` option
### New Features
* feat: add `only` option (#83; @arantes555)
### Docs
* docs: correct description of `jail` option (#120; @GeorgeTaveras1231)
## 3.2.0 (2018-03-07)
This release caches reading/statting of files, to improve speed.
### Performance Improvements
* perf: cache file stats/reads (#126; @keithamus)
## 3.0.4 (unreleased)

@@ -4,0 +36,0 @@

23

dist/rollup-plugin-node-resolve.cjs.js

@@ -12,8 +12,2 @@ 'use strict';

var ES6_BROWSER_EMPTY = path.resolve( __dirname, '../src/empty.js' );
var CONSOLE_WARN = function () {
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];
return console.warn.apply( console, args );
}; // eslint-disable-line no-console
// It is important that .mjs occur before .js so that Rollup will interpret npm modules

@@ -71,4 +65,2 @@ // which deploy both ESM .mjs and CommonJS .js files as ESM.

var onwarn = options.onwarn || CONSOLE_WARN;
if ( options.skip ) {

@@ -91,3 +83,3 @@ throw new Error( 'options.skip is no longer supported — you should use the main Rollup `external` option instead' );

onwrite: function onwrite () {
generateBundle: function generateBundle () {
isFileCache = {};

@@ -98,9 +90,10 @@ readFileCache = {};

resolveId: function resolveId$$1 ( importee, importer ) {
var this$1 = this;
if ( /\0/.test( importee ) ) { return null; } // ignore IDs with null character, these belong to other plugins
// disregard entry module
if ( !importer ) { return null; }
var basedir = importer ? path.dirname( importer ) : process.cwd();
if (options.browser && browserMapCache[importer]) {
var resolvedImportee = path.resolve( path.dirname( importer ), importee );
var resolvedImportee = path.resolve( basedir, importee );
var browser = browserMapCache[importer];

@@ -124,3 +117,3 @@ if (browser[importee] === false || browser[resolvedImportee] === false) {

// an import relative to the parent dir of the importer
id = path.resolve( importer, '..', importee );
id = path.resolve( basedir, importee );
}

@@ -135,3 +128,3 @@

var resolveOptions = {
basedir: path.dirname( importer ),
basedir: basedir,
packageFilter: function packageFilter ( pkg, pkgPath ) {

@@ -199,3 +192,3 @@ var pkgRoot = path.dirname( pkgPath );

if ( !isPreferBuiltinsSet ) {
onwarn(
this$1.warn(
"preferring built-in module '" + importee + "' over local alternative " +

@@ -202,0 +195,0 @@ "at '" + resolved + "', pass 'preferBuiltins: false' to disable this " +

@@ -1,2 +0,2 @@

import { dirname, resolve, extname, normalize, sep } from 'path';
import { dirname, extname, normalize, resolve, sep } from 'path';
import builtins from 'builtin-modules';

@@ -8,8 +8,2 @@ import resolveId from 'resolve';

var ES6_BROWSER_EMPTY = resolve( __dirname, '../src/empty.js' );
var CONSOLE_WARN = function () {
var args = [], len = arguments.length;
while ( len-- ) args[ len ] = arguments[ len ];
return console.warn.apply( console, args );
}; // eslint-disable-line no-console
// It is important that .mjs occur before .js so that Rollup will interpret npm modules

@@ -67,4 +61,2 @@ // which deploy both ESM .mjs and CommonJS .js files as ESM.

var onwarn = options.onwarn || CONSOLE_WARN;
if ( options.skip ) {

@@ -87,3 +79,3 @@ throw new Error( 'options.skip is no longer supported — you should use the main Rollup `external` option instead' );

onwrite: function onwrite () {
generateBundle: function generateBundle () {
isFileCache = {};

@@ -94,9 +86,10 @@ readFileCache = {};

resolveId: function resolveId$$1 ( importee, importer ) {
var this$1 = this;
if ( /\0/.test( importee ) ) { return null; } // ignore IDs with null character, these belong to other plugins
// disregard entry module
if ( !importer ) { return null; }
var basedir = importer ? dirname( importer ) : process.cwd();
if (options.browser && browserMapCache[importer]) {
var resolvedImportee = resolve( dirname( importer ), importee );
var resolvedImportee = resolve( basedir, importee );
var browser = browserMapCache[importer];

@@ -120,3 +113,3 @@ if (browser[importee] === false || browser[resolvedImportee] === false) {

// an import relative to the parent dir of the importer
id = resolve( importer, '..', importee );
id = resolve( basedir, importee );
}

@@ -131,3 +124,3 @@

var resolveOptions = {
basedir: dirname( importer ),
basedir: basedir,
packageFilter: function packageFilter ( pkg, pkgPath ) {

@@ -195,3 +188,3 @@ var pkgRoot = dirname( pkgPath );

if ( !isPreferBuiltinsSet ) {
onwarn(
this$1.warn(
"preferring built-in module '" + importee + "' over local alternative " +

@@ -198,0 +191,0 @@ "at '" + resolved + "', pass 'preferBuiltins: false' to disable this " +

{
"name": "rollup-plugin-node-resolve",
"description": "Bundle third-party dependencies in node_modules",
"version": "3.4.0",
"version": "4.0.0",
"devDependencies": {
"buble": "^0.19.3",
"es5-ext": "^0.10.39",
"eslint": "^4.18.0",
"mocha": "^5.0.1",
"rollup": "^0.56.3",
"rollup-plugin-buble": "^0.19.2",
"rollup-plugin-commonjs": "^8.3.0",
"buble": "^0.19.6",
"es5-ext": "^0.10.46",
"eslint": "^5.10.0",
"mocha": "^5.2.0",
"rollup": "^0.67.4",
"rollup-plugin-buble": "^0.19.4",
"rollup-plugin-commonjs": "^9.2.0",
"string-capitalize": "^1.0.1",

@@ -33,5 +33,5 @@ "vlq": "^1.0.0"

"dependencies": {
"builtin-modules": "^2.0.0",
"builtin-modules": "^3.0.0",
"is-module": "^1.0.0",
"resolve": "^1.1.6"
"resolve": "^1.8.1"
},

@@ -38,0 +38,0 @@ "repository": "rollup/rollup-plugin-node-resolve",

@@ -32,3 +32,5 @@ # rollup-plugin-node-resolve

// use "jsnext:main" if possible
// – see https://github.com/rollup/rollup/wiki/jsnext:main
// legacy field pointing to ES6 module in third-party libraries,
// deprecated in favor of "pkg.module":
// - see: https://github.com/rollup/rollup/wiki/pkg.module
jsnext: true, // Default: false

@@ -35,0 +37,0 @@

@@ -1,2 +0,2 @@

import { dirname, resolve, extname, normalize, sep } from 'path';
import {dirname, extname, normalize, resolve, sep} from 'path';
import builtins from 'builtin-modules';

@@ -8,3 +8,2 @@ import resolveId from 'resolve';

const ES6_BROWSER_EMPTY = resolve( __dirname, '../src/empty.js' );
const CONSOLE_WARN = ( ...args ) => console.warn( ...args ); // eslint-disable-line no-console
// It is important that .mjs occur before .js so that Rollup will interpret npm modules

@@ -60,4 +59,2 @@ // which deploy both ESM .mjs and CommonJS .js files as ESM.

const onwarn = options.onwarn || CONSOLE_WARN;
if ( options.skip ) {

@@ -80,3 +77,3 @@ throw new Error( 'options.skip is no longer supported — you should use the main Rollup `external` option instead' );

onwrite () {
generateBundle () {
isFileCache = {};

@@ -89,7 +86,6 @@ readFileCache = {};

// disregard entry module
if ( !importer ) return null;
const basedir = importer ? dirname( importer ) : process.cwd();
if (options.browser && browserMapCache[importer]) {
const resolvedImportee = resolve( dirname( importer ), importee );
const resolvedImportee = resolve( basedir, importee );
const browser = browserMapCache[importer];

@@ -113,3 +109,3 @@ if (browser[importee] === false || browser[resolvedImportee] === false) {

// an import relative to the parent dir of the importer
id = resolve( importer, '..', importee );
id = resolve( basedir, importee );
}

@@ -124,3 +120,3 @@

const resolveOptions = {
basedir: dirname( importer ),
basedir,
packageFilter ( pkg, pkgPath ) {

@@ -188,3 +184,3 @@ const pkgRoot = dirname( pkgPath );

if ( !isPreferBuiltinsSet ) {
onwarn(
this.warn(
`preferring built-in module '${importee}' over local alternative ` +

@@ -191,0 +187,0 @@ `at '${resolved}', pass 'preferBuiltins: false' to disable this ` +

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc