Skip to content

chore(repo): migrate from patch-package to yarn patch - #2919

Closed
snaka wants to merge 1 commit into
stoplightio:developfrom
snaka:chore/migrate-to-yarn-patch
Closed

chore(repo): migrate from patch-package to yarn patch#2919
snaka wants to merge 1 commit into
stoplightio:developfrom
snaka:chore/migrate-to-yarn-patch

Conversation

@snaka

@snaka snaka commented Mar 24, 2026

Copy link
Copy Markdown

Summary

Migrate from patch-package to Yarn 3's built-in yarn patch mechanism.

The existing patches targeted outdated versions (@semantic-release/github@8.1.0, multi-semantic-release@3.0.2) and no longer apply to the currently installed versions. patch-package also has compatibility issues with Yarn 3's lockfile format.

Changes

  • Remove patch-package from devDependencies and prerelease script
  • Regenerate patches using yarn patch-commit for current versions:
    • multi-semantic-release@3.1.0: Change tagFormat separator from @ to -
    • @semantic-release/github@12.0.6: Remove publish function and add per-package commit filtering in success hook
  • Patches are now applied automatically at yarn install time — no CI workflow changes required

Test plan

  • Clean yarn install applies patches correctly
  • yarn release --dry-run — all 11 packages loaded, no errors
  • yarn test.jest / yarn test.harness — passed
  • CI passes

Replace patch-package with Yarn 3 built-in patch mechanism (yarn patch /
yarn patch-commit). Patches are now applied automatically at install time
via resolutions entries using the patch: protocol, eliminating the need
for a separate prerelease script.

- Remove patch-package from devDependencies
- Remove prerelease script that ran patch-package
- Regenerate patches for @semantic-release/github@12.0.6 and
  multi-semantic-release@3.1.0 using yarn patch-commit
- Delete old patches/ directory (patch-package format)
- Add new .yarn/patches/ files (yarn patch format)
@snaka
snaka requested a review from a team as a code owner March 24, 2026 00:03
@snaka

snaka commented Mar 24, 2026

Copy link
Copy Markdown
Author

Related: #2916

This PR addresses the same issue (outdated patches) but takes a different approach — migrating from patch-package to Yarn 3's built-in yarn patch mechanism, since patch-package has compatibility issues with Yarn 3's lockfile format.

@snaka

snaka commented Mar 24, 2026

Copy link
Copy Markdown
Author

Closing as the previous PR might be enough.

@snaka snaka closed this Mar 24, 2026
@snaka
snaka deleted the chore/migrate-to-yarn-patch branch March 26, 2026 00:43
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 this pull request may close these issues.

1 participant