@rollup/plugin-node-resolve
Advanced tools
Comparing version 15.3.1 to 16.0.0
@@ -15,3 +15,3 @@ 'use strict'; | ||
var version = "15.3.1"; | ||
var version = "16.0.0"; | ||
var peerDependencies = { | ||
@@ -1071,4 +1071,13 @@ rollup: "^2.78.0||^3.0.0||^4.0.0" | ||
const { extensions, jail, moduleDirectories, modulePaths, ignoreSideEffectsForRoot } = options; | ||
const conditionsEsm = [...baseConditionsEsm, ...(options.exportConditions || [])]; | ||
const conditionsCjs = [...baseConditionsCjs, ...(options.exportConditions || [])]; | ||
const exportConditions = options.exportConditions || []; | ||
const devProdCondition = | ||
exportConditions.includes('development') || exportConditions.includes('production') | ||
? [] | ||
: [ | ||
process.env.NODE_ENV && process.env.NODE_ENV !== 'production' | ||
? 'development' | ||
: 'production' | ||
]; | ||
const conditionsEsm = [...baseConditionsEsm, ...exportConditions, ...devProdCondition]; | ||
const conditionsCjs = [...baseConditionsCjs, ...exportConditions, ...devProdCondition]; | ||
const packageInfoCache = new Map(); | ||
@@ -1191,3 +1200,2 @@ const idToPackageInfo = new Map(); | ||
const exportConditions = isRequire ? conditionsCjs : conditionsEsm; | ||
if (useBrowserOverrides && !exportConditions.includes('browser')) | ||
@@ -1194,0 +1202,0 @@ exportConditions.push('browser'); |
@@ -15,3 +15,3 @@ 'use strict'; | ||
var version = "15.3.1"; | ||
var version = "16.0.0"; | ||
var peerDependencies = { | ||
@@ -1071,4 +1071,13 @@ rollup: "^2.78.0||^3.0.0||^4.0.0" | ||
const { extensions, jail, moduleDirectories, modulePaths, ignoreSideEffectsForRoot } = options; | ||
const conditionsEsm = [...baseConditionsEsm, ...(options.exportConditions || [])]; | ||
const conditionsCjs = [...baseConditionsCjs, ...(options.exportConditions || [])]; | ||
const exportConditions = options.exportConditions || []; | ||
const devProdCondition = | ||
exportConditions.includes('development') || exportConditions.includes('production') | ||
? [] | ||
: [ | ||
process.env.NODE_ENV && process.env.NODE_ENV !== 'production' | ||
? 'development' | ||
: 'production' | ||
]; | ||
const conditionsEsm = [...baseConditionsEsm, ...exportConditions, ...devProdCondition]; | ||
const conditionsCjs = [...baseConditionsCjs, ...exportConditions, ...devProdCondition]; | ||
const packageInfoCache = new Map(); | ||
@@ -1191,3 +1200,2 @@ const idToPackageInfo = new Map(); | ||
const exportConditions = isRequire ? conditionsCjs : conditionsEsm; | ||
if (useBrowserOverrides && !exportConditions.includes('browser')) | ||
@@ -1194,0 +1202,0 @@ exportConditions.push('browser'); |
@@ -11,3 +11,3 @@ import path, { dirname, resolve, extname, normalize, sep } from 'path'; | ||
var version = "15.3.1"; | ||
var version = "16.0.0"; | ||
var peerDependencies = { | ||
@@ -1067,4 +1067,13 @@ rollup: "^2.78.0||^3.0.0||^4.0.0" | ||
const { extensions, jail, moduleDirectories, modulePaths, ignoreSideEffectsForRoot } = options; | ||
const conditionsEsm = [...baseConditionsEsm, ...(options.exportConditions || [])]; | ||
const conditionsCjs = [...baseConditionsCjs, ...(options.exportConditions || [])]; | ||
const exportConditions = options.exportConditions || []; | ||
const devProdCondition = | ||
exportConditions.includes('development') || exportConditions.includes('production') | ||
? [] | ||
: [ | ||
process.env.NODE_ENV && process.env.NODE_ENV !== 'production' | ||
? 'development' | ||
: 'production' | ||
]; | ||
const conditionsEsm = [...baseConditionsEsm, ...exportConditions, ...devProdCondition]; | ||
const conditionsCjs = [...baseConditionsCjs, ...exportConditions, ...devProdCondition]; | ||
const packageInfoCache = new Map(); | ||
@@ -1187,3 +1196,2 @@ const idToPackageInfo = new Map(); | ||
const exportConditions = isRequire ? conditionsCjs : conditionsEsm; | ||
if (useBrowserOverrides && !exportConditions.includes('browser')) | ||
@@ -1190,0 +1198,0 @@ exportConditions.push('browser'); |
{ | ||
"name": "@rollup/plugin-node-resolve", | ||
"version": "15.3.1", | ||
"version": "16.0.0", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -56,3 +56,3 @@ [npm]: https://img.shields.io/npm/v/@rollup/plugin-node-resolve | ||
Additional conditions of the package.json exports field to match when resolving modules. By default, this plugin looks for the `['default', 'module', 'import']` conditions when resolving imports. | ||
Additional conditions of the package.json exports field to match when resolving modules. By default, this plugin looks for the `['default', 'module', 'import', 'development|production']` conditions when resolving imports. If neither the `development` or `production` conditions are provided it will default to `production` - or `development` if `NODE_ENV` is set to a value other than `production`. | ||
@@ -59,0 +59,0 @@ When using `@rollup/plugin-commonjs` v16 or higher, this plugin will use the `['default', 'module', 'require']` conditions when resolving require statements. |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
155678
3878
13