rollup-plugin-node-resolve
Advanced tools
Comparing version 4.2.2 to 4.2.3
# rollup-plugin-node-resolve changelog | ||
## 4.2.3 (2019-04-11) | ||
* Fix ordering of jsnext:main when using the jsnext option ([#209](https://github.com/rollup/rollup-plugin-node-resolve/pull/209) by @lukastaegert) | ||
## 4.2.2 (2019-04-10) | ||
@@ -4,0 +8,0 @@ |
@@ -52,6 +52,7 @@ 'use strict'; | ||
} else { | ||
mainFields = ['module', 'main']; | ||
[['module', 'module'], ['jsnext', 'jsnext:main'], ['main', 'main']].forEach(function (ref) { | ||
mainFields = []; | ||
[['module', 'module', true], ['jsnext', 'jsnext:main', false], ['main', 'main', true]].forEach(function (ref) { | ||
var option = ref[0]; | ||
var field = ref[1]; | ||
var defaultIncluded = ref[2]; | ||
@@ -61,7 +62,7 @@ if (option in options) { | ||
console.warn(("node-resolve: setting options." + option + " is deprecated, please override options.mainFields instead")); | ||
if (options[option] === false) { | ||
mainFields = mainFields.filter(function (mainField) { return mainField !== field; }); | ||
} else if (options[option] === true && mainFields.indexOf(field) === -1) { | ||
if (options[option]) { | ||
mainFields.push(field); | ||
} | ||
} else if (defaultIncluded) { | ||
mainFields.push(field); | ||
} | ||
@@ -68,0 +69,0 @@ }); |
@@ -48,6 +48,7 @@ import { dirname, join, resolve, normalize, sep, extname } from 'path'; | ||
} else { | ||
mainFields = ['module', 'main']; | ||
[['module', 'module'], ['jsnext', 'jsnext:main'], ['main', 'main']].forEach(function (ref) { | ||
mainFields = []; | ||
[['module', 'module', true], ['jsnext', 'jsnext:main', false], ['main', 'main', true]].forEach(function (ref) { | ||
var option = ref[0]; | ||
var field = ref[1]; | ||
var defaultIncluded = ref[2]; | ||
@@ -57,7 +58,7 @@ if (option in options) { | ||
console.warn(("node-resolve: setting options." + option + " is deprecated, please override options.mainFields instead")); | ||
if (options[option] === false) { | ||
mainFields = mainFields.filter(function (mainField) { return mainField !== field; }); | ||
} else if (options[option] === true && mainFields.indexOf(field) === -1) { | ||
if (options[option]) { | ||
mainFields.push(field); | ||
} | ||
} else if (defaultIncluded) { | ||
mainFields.push(field); | ||
} | ||
@@ -64,0 +65,0 @@ }); |
{ | ||
"name": "rollup-plugin-node-resolve", | ||
"description": "Bundle third-party dependencies in node_modules", | ||
"version": "4.2.2", | ||
"version": "4.2.3", | ||
"devDependencies": { | ||
@@ -9,9 +9,8 @@ "buble": "^0.19.7", | ||
"eslint": "^5.16.0", | ||
"mocha": "^6.0.2", | ||
"rollup": "^1.8.0", | ||
"mocha": "^6.1.2", | ||
"rollup": "^1.9.3", | ||
"rollup-plugin-buble": "^0.19.6", | ||
"rollup-plugin-commonjs": "^9.3.4", | ||
"string-capitalize": "^1.0.1", | ||
"typescript": "^3.4.1", | ||
"vlq": "^1.0.0" | ||
"typescript": "^3.4.3" | ||
}, | ||
@@ -37,3 +36,3 @@ "main": "dist/rollup-plugin-node-resolve.cjs.js", | ||
"@types/resolve": "0.0.8", | ||
"builtin-modules": "^3.0.0", | ||
"builtin-modules": "^3.1.0", | ||
"is-module": "^1.0.0", | ||
@@ -40,0 +39,0 @@ "resolve": "^1.10.0" |
@@ -1,2 +0,2 @@ | ||
import {dirname, extname, normalize, resolve, sep, join} from 'path'; | ||
import {dirname, extname, join, normalize, resolve, sep} from 'path'; | ||
import builtins from 'builtin-modules'; | ||
@@ -48,12 +48,12 @@ import resolveId from 'resolve'; | ||
} else { | ||
mainFields = ['module', 'main']; | ||
[['module', 'module'], ['jsnext', 'jsnext:main'], ['main', 'main']].forEach(([option, field]) => { | ||
mainFields = []; | ||
[['module', 'module', true], ['jsnext', 'jsnext:main', false], ['main', 'main', true]].forEach(([option, field, defaultIncluded]) => { | ||
if (option in options) { | ||
// eslint-disable-next-line no-console | ||
console.warn(`node-resolve: setting options.${option} is deprecated, please override options.mainFields instead`); | ||
if (options[option] === false) { | ||
mainFields = mainFields.filter(mainField => mainField !== field); | ||
} else if (options[option] === true && mainFields.indexOf(field) === -1) { | ||
if (options[option]) { | ||
mainFields.push(field); | ||
} | ||
} else if (defaultIncluded) { | ||
mainFields.push(field); | ||
} | ||
@@ -60,0 +60,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
9
738
38319
Updatedbuiltin-modules@^3.1.0