Skip to content

[opencode] chore: drop vendored got patch for a got resolution - #102

Merged
johnnyhuy merged 1 commit into
mainfrom
opencode/drop-vendored-got-patch
Oct 3, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
opencode/drop-vendored-got-patch

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

What

Removes the vendored got patch file and instead resolves got to npm:11.8.2 in the root resolutions. Follow-up to #100.

Why

The patch only existed because @yarnpkg/core@4.9.2 declares got with a patch: protocol while failing to ship the patch inside its npm tarball. That forced two fragile things: vendoring a foreign patch file into .yarn/patches/, and remembering to copy it into every Docker stage that runs yarn install (the gap that broke the build in #100). A resolutions entry satisfies the same descriptor without Yarn ever reading a patch file.

Changes

  • package.json: add "got": "npm:11.8.2" to resolutions
  • Delete .yarn/patches/got-npm-11.8.2-c1eb105458.patch
  • Dockerfile: drop the two COPY .yarn/patches/ .yarn/patches/ lines from the build and run stages
  • yarn.lock: re-resolved, got@patch: descriptor redirected to got@npm:11.8.2

Notes

  • Keeps @yarnpkg/cli@4.18.1 and @yarnpkg/core@4.9.2 on the exact versions upstream expects. The alternative (pinning @yarnpkg/core to 4.9.1) worked too but left @yarnpkg/cli's ^4.9.2 peer requirement unmet.
  • The one remaining patch: string in yarn.lock is upstream's declared range inside @yarnpkg/core's dependency listing; the resolution redirects it, which is why install succeeds with no .yarn/patches/ directory present.

Validation

  • mise run lint passes (all workspaces)
  • mise run test passes: 9 tests passed, 1 skipped
  • yarn install completes with .yarn/patches/ absent
  • CI build (Docker) verifies the --immutable install path in both stages

@yarnpkg/core@4.9.2 declares got via a patch: protocol but does not ship
the patch in its npm tarball, which forced us to vendor the file and copy
it into both Docker stages. Resolving got to npm:11.8.2 in the root
resolutions satisfies the descriptor without reading a patch file, so the
vendored patch and its Docker COPY lines can go. Also keeps @yarnpkg/cli
and @yarnpkg/core on the versions upstream expects, no pin skew.

Co-authored-by: opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com>
@johnnyhuy
johnnyhuy merged commit f9a8c11 into main Oct 3, 2026
5 checks passed
@johnnyhuy
johnnyhuy deleted the opencode/drop-vendored-got-patch branch October 3, 2026 02:19
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