-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch #11858
Patch #11858
Conversation
❌ @zackradisic, your commit has failing tests :( 💻 1 failing tests Darwin x64 baseline
🐧💪 1 failing tests Linux AARCH64
🪟💻 1 failing tests Windows x64 baseline
🪟💻 1 failing tests Windows x64
|
const pkg = lockfile.packages.get(pkg_id); | ||
if (version) |v| { | ||
const label = std.fmt.bufPrint(buf[0..], "{}", .{pkg.resolution.fmt(strbuf, .posix)}) catch @panic("Resolution name too long"); | ||
if (std.mem.eql(u8, label, v)) break :brk .{ @intCast(dep_id), pkg_id }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like not a great way to do it but I'm not sure
@dylan-conway wdyt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yeah this won't work if version is a range like ^4.0.0
because the resolution
will have the exact version. I'm not sure if version ranges are allowed with pnpm patch
so it might be fine
.{name}, | ||
); | ||
var i: usize = 0; | ||
const pkg_hashes = lockfile.packages.items(.name_hash); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the future, this is where you would get the package_id
for the current workspace and only loop through it's packages, instead of all packages
What does this PR do?
Fixes #11719
bun patch --commit