rollup-plugin-node-resolve
Advanced tools
Comparing version 5.1.1 to 5.2.0
# rollup-plugin-node-resolve changelog | ||
## 5.2.0 (2019-06-29) | ||
* dedupe accepts a function ([#225](https://github.com/rollup/rollup-plugin-node-resolve/pull/225) by @manucorporat) | ||
## 5.1.1 (2019-06-29) | ||
@@ -4,0 +8,0 @@ |
@@ -179,2 +179,3 @@ 'use strict'; | ||
const packageInfoCache = new Map(); | ||
const shouldDedupe = typeof dedupe === 'function' ? dedupe : importee => dedupe.includes(importee); | ||
@@ -280,3 +281,3 @@ function getCachedPackageInfo(pkg, pkgPath) { | ||
if (dedupe.indexOf(importee) !== -1) { | ||
if (shouldDedupe(importee)) { | ||
importee = path.join(process.cwd(), 'node_modules', importee); | ||
@@ -283,0 +284,0 @@ } // https://github.com/defunctzombie/package-browser-field-spec |
@@ -175,2 +175,3 @@ import { dirname, join, resolve, normalize, sep, extname } from 'path'; | ||
const packageInfoCache = new Map(); | ||
const shouldDedupe = typeof dedupe === 'function' ? dedupe : importee => dedupe.includes(importee); | ||
@@ -276,3 +277,3 @@ function getCachedPackageInfo(pkg, pkgPath) { | ||
if (dedupe.indexOf(importee) !== -1) { | ||
if (shouldDedupe(importee)) { | ||
importee = join(process.cwd(), 'node_modules', importee); | ||
@@ -279,0 +280,0 @@ } // https://github.com/defunctzombie/package-browser-field-spec |
@@ -88,3 +88,3 @@ import {Plugin} from 'rollup'; | ||
*/ | ||
dedupe?: string[]; | ||
dedupe?: string[] | ((importee: string) => boolean); | ||
@@ -91,0 +91,0 @@ /** |
{ | ||
"name": "rollup-plugin-node-resolve", | ||
"description": "Bundle third-party dependencies in node_modules", | ||
"version": "5.1.1", | ||
"version": "5.2.0", | ||
"devDependencies": { | ||
@@ -6,0 +6,0 @@ "@babel/core": "^7.4.5", |
@@ -133,2 +133,6 @@ import {dirname, extname, join, normalize, resolve, sep} from 'path'; | ||
const shouldDedupe = typeof dedupe === 'function' | ||
? dedupe | ||
: importee => dedupe.includes(importee); | ||
function getCachedPackageInfo (pkg, pkgPath) { | ||
@@ -220,3 +224,3 @@ if (packageInfoCache.has(pkgPath)) { | ||
if (dedupe.indexOf(importee) !== -1) { | ||
if (shouldDedupe(importee)) { | ||
importee = join(process.cwd(), 'node_modules', importee); | ||
@@ -223,0 +227,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55968
1058