mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 15:14:33 +00:00
fix(install): Properly handle dist tags when setting up node_modules (#24968)
Fixes https://github.com/denoland/deno/issues/24966. Fixes https://github.com/denoland/deno/issues/24932.
This commit is contained in:
parent
f474c4f4ff
commit
854c7ba198
4 changed files with 49 additions and 3 deletions
|
@ -612,12 +612,21 @@ async fn sync_resolution_with_fs(
|
|||
// 4. Create symlinks for package json dependencies
|
||||
{
|
||||
for remote in pkg_json_deps_provider.remote_pkgs() {
|
||||
let Some(remote_id) = snapshot
|
||||
let remote_pkg = if let Ok(remote_pkg) =
|
||||
snapshot.resolve_pkg_from_pkg_req(&remote.req)
|
||||
{
|
||||
remote_pkg
|
||||
} else if remote.req.version_req.tag().is_some() {
|
||||
// couldn't find a match, and `resolve_best_package_id`
|
||||
// panics if you give it a tag
|
||||
continue;
|
||||
} else if let Some(remote_id) = snapshot
|
||||
.resolve_best_package_id(&remote.req.name, &remote.req.version_req)
|
||||
else {
|
||||
{
|
||||
snapshot.package_from_id(&remote_id).unwrap()
|
||||
} else {
|
||||
continue; // skip, package not found
|
||||
};
|
||||
let remote_pkg = snapshot.package_from_id(&remote_id).unwrap();
|
||||
let alias_clashes = remote.req.name != remote.alias
|
||||
&& newest_packages_by_name.contains_key(&remote.alias);
|
||||
let install_in_child = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue