* Throws an error indicating that the given request is not a valid subpath match for the specified pattern. * @param {string} request - The request that failed to match the pattern. * @param {string} match - The pattern that the request was compared against. * @param {URL} packageJSONUrl - The UR
(request, match, packageJSONUrl, internal, base)
| 327 | * @throws {ERR_INVALID_MODULE_SPECIFIER} When the request is not a valid match for the pattern. |
| 328 | */ |
| 329 | function throwInvalidSubpath(request, match, packageJSONUrl, internal, base) { |
| 330 | const reason = `request is not a valid match in pattern "${match}" for the "${ |
| 331 | internal ? 'imports' : 'exports'}" resolution of ${ |
| 332 | fileURLToPath(packageJSONUrl)}`; |
| 333 | throw new ERR_INVALID_MODULE_SPECIFIER(request, reason, |
| 334 | base && fileURLToPath(base)); |
| 335 | } |
| 336 | |
| 337 | /** |
| 338 | * Creates an error object for an invalid package target. |
no test coverage detected
searching dependent graphs…