@rollup/plugin-node-resolve
Advanced tools
Comparing version 11.1.0 to 11.1.1
# @rollup/plugin-node-resolve ChangeLog | ||
## v11.1.1 | ||
_2021-01-29_ | ||
### Bugfixes | ||
- fix: only log last resolve error (#750) | ||
### Updates | ||
- docs: add clarification on the order of package entrypoints (#768) | ||
## v11.1.0 | ||
@@ -4,0 +16,0 @@ |
@@ -656,7 +656,6 @@ 'use strict'; | ||
} catch (error) { | ||
if (!(error instanceof ResolveError)) { | ||
throw error; | ||
if (error instanceof ResolveError) { | ||
return error; | ||
} | ||
warn(error); | ||
return null; | ||
throw error; | ||
} | ||
@@ -708,5 +707,7 @@ } | ||
}) { | ||
let lastResolveError; | ||
for (let i = 0; i < importSpecifierList.length; i++) { | ||
// eslint-disable-next-line no-await-in-loop | ||
const resolved = await resolveId({ | ||
const result = await resolveId({ | ||
importer, | ||
@@ -724,6 +725,14 @@ importSpecifier: importSpecifierList[i], | ||
}); | ||
if (resolved) { | ||
return resolved; | ||
if (result instanceof ResolveError) { | ||
lastResolveError = result; | ||
} else if (result) { | ||
return result; | ||
} | ||
} | ||
if (lastResolveError) { | ||
// only log the last failed resolve error | ||
warn(lastResolveError); | ||
} | ||
return null; | ||
@@ -730,0 +739,0 @@ } |
@@ -643,7 +643,6 @@ import path, { dirname, resolve, extname, normalize, sep } from 'path'; | ||
} catch (error) { | ||
if (!(error instanceof ResolveError)) { | ||
throw error; | ||
if (error instanceof ResolveError) { | ||
return error; | ||
} | ||
warn(error); | ||
return null; | ||
throw error; | ||
} | ||
@@ -695,5 +694,7 @@ } | ||
}) { | ||
let lastResolveError; | ||
for (let i = 0; i < importSpecifierList.length; i++) { | ||
// eslint-disable-next-line no-await-in-loop | ||
const resolved = await resolveId({ | ||
const result = await resolveId({ | ||
importer, | ||
@@ -711,6 +712,14 @@ importSpecifier: importSpecifierList[i], | ||
}); | ||
if (resolved) { | ||
return resolved; | ||
if (result instanceof ResolveError) { | ||
lastResolveError = result; | ||
} else if (result) { | ||
return result; | ||
} | ||
} | ||
if (lastResolveError) { | ||
// only log the last failed resolve error | ||
warn(lastResolveError); | ||
} | ||
return null; | ||
@@ -717,0 +726,0 @@ } |
{ | ||
"name": "@rollup/plugin-node-resolve", | ||
"version": "11.1.0", | ||
"version": "11.1.1", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -47,3 +47,3 @@ [npm]: https://img.shields.io/npm/v/@rollup/plugin-node-resolve | ||
This plugin supports the package entrypoints feature from node js, specified in the `exports` or `imports` field of a package. Check the [official documentation](https://nodejs.org/api/packages.html#packages_package_entry_points) for more information on how this works. | ||
This plugin supports the package entrypoints feature from node js, specified in the `exports` or `imports` field of a package. Check the [official documentation](https://nodejs.org/api/packages.html#packages_package_entry_points) for more information on how this works. This is the default behavior. In the abscence of these fields, the fields in `mainFields` will be the ones to be used. | ||
@@ -50,0 +50,0 @@ ## Options |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
85633
1895
0