Currently, patches are locked to a specific version of a package. If that package gets updated, Bun will silently stop applying the patch with no warnings or errors. If the patched package is a transitive dependency this is even worse.
Incredibly easy to break the application without knowing.
Furthermore it's hard to recreate the patch file. We have to manually re-patch the package from scratch every time it is updated.
pnpm has the allowNonAppliedPatches which will at least error when the patch becomes outdated.
But I think that patch-package is the gold-standard here when it comes to DX, where we have the following behaviour
Non-applied patches error by default
Updating the patch for the new version is as simple as rerunning the command (if patch is still compatible)
What is the feature you are proposing to solve the problem?
Maybe introduce allowNonAppliedPatches and I'd advocate for enabling it by default.
Maybe provide a command for migrating patches to a new version.
What is the problem this feature would solve?
Currently, patches are locked to a specific version of a package. If that package gets updated, Bun will silently stop applying the patch with no warnings or errors. If the patched package is a transitive dependency this is even worse.
Incredibly easy to break the application without knowing.
Furthermore it's hard to recreate the patch file. We have to manually re-patch the package from scratch every time it is updated.
pnpm has the
allowNonAppliedPatches
which will at least error when the patch becomes outdated.But I think that
patch-package
is the gold-standard here when it comes to DX, where we have the following behaviourWhat is the feature you are proposing to solve the problem?
allowNonAppliedPatches
and I'd advocate for enabling it by default.What alternatives have you considered?
No response