@rollup/plugin-node-resolve
Advanced tools
Comparing version 13.1.1 to 13.1.2
# @rollup/plugin-node-resolve ChangeLog | ||
## v13.1.2 | ||
_2021-12-31_ | ||
### Bugfixes | ||
- fix: forward meta-information from other plugins (#1062) | ||
## v13.1.1 | ||
@@ -4,0 +12,0 @@ |
@@ -24,3 +24,3 @@ 'use strict'; | ||
var version = "13.1.0"; | ||
var version = "13.1.1"; | ||
@@ -99,2 +99,49 @@ util.promisify(fs__default["default"].access); | ||
function handleDeprecatedOptions(opts) { | ||
const warnings = []; | ||
if (opts.customResolveOptions) { | ||
const { customResolveOptions } = opts; | ||
if (customResolveOptions.moduleDirectory) { | ||
// eslint-disable-next-line no-param-reassign | ||
opts.moduleDirectories = Array.isArray(customResolveOptions.moduleDirectory) | ||
? customResolveOptions.moduleDirectory | ||
: [customResolveOptions.moduleDirectory]; | ||
warnings.push( | ||
'node-resolve: The `customResolveOptions.moduleDirectory` option has been deprecated. Use `moduleDirectories`, which must be an array.' | ||
); | ||
} | ||
if (customResolveOptions.preserveSymlinks) { | ||
throw new Error( | ||
'node-resolve: `customResolveOptions.preserveSymlinks` is no longer an option. We now always use the rollup `preserveSymlinks` option.' | ||
); | ||
} | ||
[ | ||
'basedir', | ||
'package', | ||
'extensions', | ||
'includeCoreModules', | ||
'readFile', | ||
'isFile', | ||
'isDirectory', | ||
'realpath', | ||
'packageFilter', | ||
'pathFilter', | ||
'paths', | ||
'packageIterator' | ||
].forEach((resolveOption) => { | ||
if (customResolveOptions[resolveOption]) { | ||
throw new Error( | ||
`node-resolve: \`customResolveOptions.${resolveOption}\` is no longer an option. If you need this, please open an issue.` | ||
); | ||
} | ||
}); | ||
} | ||
return { warnings }; | ||
} | ||
// returns the imported package name for bare module imports | ||
@@ -868,49 +915,2 @@ function getPackageName(id) { | ||
function handleDeprecatedOptions(opts) { | ||
const warnings = []; | ||
if (opts.customResolveOptions) { | ||
const { customResolveOptions } = opts; | ||
if (customResolveOptions.moduleDirectory) { | ||
// eslint-disable-next-line no-param-reassign | ||
opts.moduleDirectories = Array.isArray(customResolveOptions.moduleDirectory) | ||
? customResolveOptions.moduleDirectory | ||
: [customResolveOptions.moduleDirectory]; | ||
warnings.push( | ||
'node-resolve: The `customResolveOptions.moduleDirectory` option has been deprecated. Use `moduleDirectories`, which must be an array.' | ||
); | ||
} | ||
if (customResolveOptions.preserveSymlinks) { | ||
throw new Error( | ||
'node-resolve: `customResolveOptions.preserveSymlinks` is no longer an option. We now always use the rollup `preserveSymlinks` option.' | ||
); | ||
} | ||
[ | ||
'basedir', | ||
'package', | ||
'extensions', | ||
'includeCoreModules', | ||
'readFile', | ||
'isFile', | ||
'isDirectory', | ||
'realpath', | ||
'packageFilter', | ||
'pathFilter', | ||
'paths', | ||
'packageIterator' | ||
].forEach((resolveOption) => { | ||
if (customResolveOptions[resolveOption]) { | ||
throw new Error( | ||
`node-resolve: \`customResolveOptions.${resolveOption}\` is no longer an option. If you need this, please open an issue.` | ||
); | ||
} | ||
}); | ||
} | ||
return { warnings }; | ||
} | ||
/* eslint-disable no-param-reassign, no-shadow, no-undefined */ | ||
@@ -1130,7 +1130,6 @@ | ||
} | ||
const result = { | ||
return { | ||
id: `${location}${importSuffix}`, | ||
moduleSideEffects: hasModuleSideEffects(location) | ||
}; | ||
return result; | ||
}; | ||
@@ -1177,5 +1176,9 @@ | ||
); | ||
const isExternal = !!(resolvedResolved && resolvedResolved.external); | ||
if (isExternal) { | ||
return false; | ||
if (resolvedResolved) { | ||
// Handle plugins that manually make the result external | ||
if (resolvedResolved.external) { | ||
return false; | ||
} | ||
// Pass on meta information added by other plugins | ||
return { ...resolved, meta: resolvedResolved.meta }; | ||
} | ||
@@ -1182,0 +1185,0 @@ } |
@@ -11,3 +11,3 @@ import path, { dirname, resolve, extname, normalize, sep } from 'path'; | ||
var version = "13.1.0"; | ||
var version = "13.1.1"; | ||
@@ -86,2 +86,49 @@ promisify(fs.access); | ||
function handleDeprecatedOptions(opts) { | ||
const warnings = []; | ||
if (opts.customResolveOptions) { | ||
const { customResolveOptions } = opts; | ||
if (customResolveOptions.moduleDirectory) { | ||
// eslint-disable-next-line no-param-reassign | ||
opts.moduleDirectories = Array.isArray(customResolveOptions.moduleDirectory) | ||
? customResolveOptions.moduleDirectory | ||
: [customResolveOptions.moduleDirectory]; | ||
warnings.push( | ||
'node-resolve: The `customResolveOptions.moduleDirectory` option has been deprecated. Use `moduleDirectories`, which must be an array.' | ||
); | ||
} | ||
if (customResolveOptions.preserveSymlinks) { | ||
throw new Error( | ||
'node-resolve: `customResolveOptions.preserveSymlinks` is no longer an option. We now always use the rollup `preserveSymlinks` option.' | ||
); | ||
} | ||
[ | ||
'basedir', | ||
'package', | ||
'extensions', | ||
'includeCoreModules', | ||
'readFile', | ||
'isFile', | ||
'isDirectory', | ||
'realpath', | ||
'packageFilter', | ||
'pathFilter', | ||
'paths', | ||
'packageIterator' | ||
].forEach((resolveOption) => { | ||
if (customResolveOptions[resolveOption]) { | ||
throw new Error( | ||
`node-resolve: \`customResolveOptions.${resolveOption}\` is no longer an option. If you need this, please open an issue.` | ||
); | ||
} | ||
}); | ||
} | ||
return { warnings }; | ||
} | ||
// returns the imported package name for bare module imports | ||
@@ -855,49 +902,2 @@ function getPackageName(id) { | ||
function handleDeprecatedOptions(opts) { | ||
const warnings = []; | ||
if (opts.customResolveOptions) { | ||
const { customResolveOptions } = opts; | ||
if (customResolveOptions.moduleDirectory) { | ||
// eslint-disable-next-line no-param-reassign | ||
opts.moduleDirectories = Array.isArray(customResolveOptions.moduleDirectory) | ||
? customResolveOptions.moduleDirectory | ||
: [customResolveOptions.moduleDirectory]; | ||
warnings.push( | ||
'node-resolve: The `customResolveOptions.moduleDirectory` option has been deprecated. Use `moduleDirectories`, which must be an array.' | ||
); | ||
} | ||
if (customResolveOptions.preserveSymlinks) { | ||
throw new Error( | ||
'node-resolve: `customResolveOptions.preserveSymlinks` is no longer an option. We now always use the rollup `preserveSymlinks` option.' | ||
); | ||
} | ||
[ | ||
'basedir', | ||
'package', | ||
'extensions', | ||
'includeCoreModules', | ||
'readFile', | ||
'isFile', | ||
'isDirectory', | ||
'realpath', | ||
'packageFilter', | ||
'pathFilter', | ||
'paths', | ||
'packageIterator' | ||
].forEach((resolveOption) => { | ||
if (customResolveOptions[resolveOption]) { | ||
throw new Error( | ||
`node-resolve: \`customResolveOptions.${resolveOption}\` is no longer an option. If you need this, please open an issue.` | ||
); | ||
} | ||
}); | ||
} | ||
return { warnings }; | ||
} | ||
/* eslint-disable no-param-reassign, no-shadow, no-undefined */ | ||
@@ -1117,7 +1117,6 @@ | ||
} | ||
const result = { | ||
return { | ||
id: `${location}${importSuffix}`, | ||
moduleSideEffects: hasModuleSideEffects(location) | ||
}; | ||
return result; | ||
}; | ||
@@ -1164,5 +1163,9 @@ | ||
); | ||
const isExternal = !!(resolvedResolved && resolvedResolved.external); | ||
if (isExternal) { | ||
return false; | ||
if (resolvedResolved) { | ||
// Handle plugins that manually make the result external | ||
if (resolvedResolved.external) { | ||
return false; | ||
} | ||
// Pass on meta information added by other plugins | ||
return { ...resolved, meta: resolvedResolved.meta }; | ||
} | ||
@@ -1169,0 +1172,0 @@ } |
{ | ||
"name": "@rollup/plugin-node-resolve", | ||
"version": "13.1.1", | ||
"version": "13.1.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
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
93302
2156