Lines Matching refs:resolved

121  * @param {URL} url - The URL of the module being resolved.
123 * @param {string | URL} [base] - The base URL for the module being resolved.
144 `excluding the full filename and extension to the resolved file at "${
268 * Finalizes the resolution of a module specifier by checking if the resolved pathname contains encoded "/" or "\\"
269 * characters, checking if the resolved pathname is a directory or file, and resolving any symlinks if necessary.
270 * @param {URL} resolved - The resolved URL object.
274 * @throws {ERR_INVALID_MODULE_SPECIFIER} - If the resolved pathname contains encoded "/" or "\\" characters.
275 * @throws {ERR_UNSUPPORTED_DIR_IMPORT} - If the resolved pathname is a directory.
276 * @throws {ERR_MODULE_NOT_FOUND} - If the resolved pathname is not a file.
278 function finalizeResolution(resolved, base, preserveSymlinks) {
279 if (RegExpPrototypeExec(encodedSepRegEx, resolved.pathname) !== null) {
281 resolved.pathname, 'must not include encoded "/" or "\\" characters',
287 path = fileURLToPath(resolved);
290 setOwnProperty(err, 'input', `${resolved}`);
296 let file = resolveExtensionsWithTryExactName(resolved);
301 (resolveDirectoryEntry(resolved) || resolved) : resolveDirectoryEntry(new URL(`${resolved}/`));
303 if (file === resolved) { return file; }
307 resolved.pathname, fileURLToPath(base), 'module');
310 // If `preserveSymlinks` is false, `resolved` is returned and `path`
311 // is used only to check that the resolved path exists.
312 resolved = file;
313 path = fileURLToPath(resolved);
321 throw new ERR_UNSUPPORTED_DIR_IMPORT(path, fileURLToPath(base), String(resolved));
325 process.send({ 'watch:require': [path || resolved.pathname] });
328 path || resolved.pathname, base && fileURLToPath(base), resolved);
335 const { search, hash } = resolved;
336 resolved =
338 resolved.search = search;
339 resolved.hash = hash;
342 return resolved;
375 * @param {URL} packageJSONUrl - The URL of the package.json file being resolved.
417 * @param {string} subpath - The subpath to append to the resolved URL.
425 * @returns {URL} - The resolved URL object.
476 const resolved = new URL(target, packageJSONUrl);
477 const resolvedPath = resolved.pathname;
484 if (subpath === '') { return resolved; }
502 RegExpPrototypeSymbolReplace(patternRegEx, resolved.href, () => subpath),
506 return new URL(subpath, resolved);
531 * @returns {URL | null | undefined} - The resolved target, or null if not found, or undefined if not resolvable.
637 * @returns {URL} - The resolved package target.
743 * @throws {ERR_PACKAGE_IMPORT_NOT_DEFINED} If the import name cannot be resolved.
744 * @returns {URL} The resolved import URL.
859 * @returns {URL} - The resolved URL.
956 * @param {boolean} preserveSymlinks - Whether to preserve symlinks in the resolved URL.
963 let resolved;
965 resolved = new URL(specifier, base);
967 resolved = packageImportsResolve(specifier, base, conditions);
970 resolved = new URL(specifier);
973 resolved = packageResolve(specifier, base, conditions);
977 if (resolved.protocol !== 'file:') {
978 return resolved;
980 return finalizeResolution(resolved, base, preserveSymlinks);
1201 // resolved CommonJS module