Skip to content
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

Fix bugs and DX issues with bun patch #11719

Closed
8 of 9 tasks
Jarred-Sumner opened this issue Jun 9, 2024 · 3 comments · Fixed by #11858
Closed
8 of 9 tasks

Fix bugs and DX issues with bun patch #11719

Jarred-Sumner opened this issue Jun 9, 2024 · 3 comments · Fixed by #11858
Assignees

Comments

@Jarred-Sumner
Copy link
Collaborator

Jarred-Sumner commented Jun 9, 2024

TODOs for @zackradisic:

  • Replace bun patch-commit with bun patch --commit package-name
  • Don't copy it into a temporary directory, instead overwrite each file individually in node_modules/package-name with a copy of itself (excluding node_modules, like patch-package). This lets developers test their patches locally before committing them, and avoids the issue where hardlinks can potentially overwrite the cached package. This does not handle postinstall scripts
  • Optional, but nice: bun patch --revert package-name
  • bun patch --commit needs tests. I am surprised that we merged bun patch when bun patch-commit had zero test coverage.
  • bun patch --commit should handle when the patch already exists
  • bun patch --commit should work with scoped packages
  • bun patch --commit should never cause "Resolving..." to happen indefinitely on install
  • bun patch should not be missing from the help menu
  • Documentation page
@TheKnightCoder
Copy link

This is probably the biggest blocker for myself and many others from adopting bun.. would love to know how soon this feature could be implemented

@zackradisic zackradisic mentioned this issue Jun 13, 2024
@zackradisic
Copy link
Contributor

This is probably the biggest blocker for myself and many others from adopting bun.. would love to know how soon this feature could be implemented

I have a PR open now for these changes here: #11858

@vijaybritto
Copy link

This is probably the biggest blocker for myself and many others from adopting bun.. would love to know how soon this feature could be implemented
This is sort of doable with patch-package.
#2336 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants