mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 21:01:52 +00:00
choose correct resolved package for peer dependencies (#7192)
* fix sometimes failing install test * loop to make sure it happens
This commit is contained in:
@@ -2793,10 +2793,6 @@ pub const PackageManager = struct {
|
||||
) !?ResolvedPackageResult {
|
||||
name.assertDefined();
|
||||
|
||||
if (resolution < this.lockfile.packages.len) {
|
||||
return .{ .package = this.lockfile.packages.get(resolution) };
|
||||
}
|
||||
|
||||
if (install_peer and behavior.isPeer()) {
|
||||
if (this.lockfile.package_index.get(name_hash)) |index| {
|
||||
const resolutions: []Resolution = this.lockfile.packages.items(.resolution);
|
||||
@@ -2875,6 +2871,10 @@ pub const PackageManager = struct {
|
||||
}
|
||||
}
|
||||
|
||||
if (resolution < this.lockfile.packages.len) {
|
||||
return .{ .package = this.lockfile.packages.get(resolution) };
|
||||
}
|
||||
|
||||
switch (version.tag) {
|
||||
.npm, .dist_tag => {
|
||||
if (version.tag == .npm) {
|
||||
|
||||
Reference in New Issue
Block a user