Skip to content

fix(deps): port yellowstone-grpc ESM type-marker patch to 5.0.9 - #377

Merged
rz1989s merged 1 commit into
mainfrom
fix/port-yellowstone-patch-5
Sep 24, 2026
Merged

rz1989s merged 1 commit into
mainfrom
fix/port-yellowstone-patch-5

Conversation

@rz1989s

@rz1989s rz1989s commented Sep 23, 2026

Copy link
Copy Markdown
Member

What

Ports the @triton-one/yellowstone-grpc ESM type-marker patch from 4.0.2 to 5.0.9, unblocking the minor-and-patch group PR (#376), whose @sip-protocol/sdk 0.11.0 → 0.15.1 bump requires @triton-one/yellowstone-grpc ^5.0.9.

The 5.0.9 tarball (like 4.0.2) ships dist/esm/ without type markers: the root package.json has no type field, so Node/tsx treat the ESM build as CJS and the sdk's static re-export of yellowstone fails to named-ESM-import. A plain regen of #376 fails ERR_PNPM_PATCH_NOT_APPLIED; Dependabot's own regen also drops the patchedDependencies section entirely — hence this hand-ported patch PR.

Patch content (5.0.9)

File Marker Why
dist/esm/package.json {"type":"module"} marks the ESM build (same as the 4.0.2 patch)
dist/esm/napi/package.json {"type":"commonjs"} new, 5.0.9-specific: NAPI-RS generates CJS content (module.exports = nativeBinding, 83 require() calls) inside the esm tree; a blanket type:module would break it. ESM import * as napi still resolves GrpcClient and the other named exports via CJS interop

4.0.2 hunk dropped, entry replaced (not kept): 5.0.9 removed the wasm dist/esm/encoding/ directory, so the 4.0.2 patch's dist/esm/encoding/package.json hunk has no target. pnpm 10 hard-errors on unused patch declarations (ERR_PNPM_UNUSED_PATCH — verified in both directions: a 5.0.9 declaration with sdk at 0.11.0 errors, a 4.0.2 declaration with sdk at 0.15.1 errors), and nothing else in the workspace resolves 4.0.2 (yellowstone is reachable only via @sip-protocol/sdk), so exact-version patch keys force a cutover.

@sip-protocol/sdk ^0.11.0 → ^0.15.1 included (root, packages/sdk, examples/vault-privacy-provider): the minimal change that puts yellowstone 5.0.9 in the graph, making the patch declaration valid. The other 33 bumps of the #376 group are untouched and remain with #376.

pnpm-lock.yaml is an honest full regen on current main base (c67e707) with pnpm 10 (matching CI's version: 10).

Evidence (three proofs)

1. Frozen install + suite on this branch (pnpm 10, matching CI):

  • pnpm install --frozen-lockfile green
  • pnpm typecheck green
  • pnpm test -- --run → 563/563 tests, 36 files green

2. Patch behavior, before/after on 5.0.9:

  • Pristine 5.0.9 dist/esm/index.js: Node emits MODULE_TYPELESS_PACKAGE_JSON ("doesn't parse as CommonJS … add type: module") — Node itself prescribes the patch's fix
  • Patched 5.0.9: named-ESM import succeeds with 42 top-level exports; napi CJS-in-esm interop resolves GrpcClient: function, AUTORECONNECT_FILTER_KEY: string

3. Post-#376 regen sim (throwaway branch off this state, not pushed): applied all 42 version deltas from #376's five package.json files, honest pnpm install --no-frozen-lockfile regen → --frozen-lockfile green (idempotent), typecheck green, suite 563/563.

After this merges, for #376

@dependabot rebase on #376 (its current branch carries a mangled lockfile that dropped patchedDependencies, so a regen is required either way) → CI gate → merge. With the sdk bump already on main, dependabot's regenerated diff shrinks to the remaining group bumps.

@sip-protocol/sdk 0.15.1 (the minor-and-patch group bump in #376)
requires @triton-one/yellowstone-grpc ^5.0.9; the 5.0.9 tarball, like
4.0.2, ships dist/esm without type markers, so Node/tsx treat the ESM
build as CJS and named-ESM imports fail.

- patches/@triton-one__yellowstone-grpc@5.0.9.patch: add
  dist/esm/package.json {"type":"module"} and
  dist/esm/napi/package.json {"type":"commonjs"}. The napi marker is the
  5.0.9 analogue of the 4.0.2 patch's esm/encoding marker: NAPI-RS
  generates CJS content (module.exports = nativeBinding) inside the
  esm tree, which a blanket type:module would break.
- The 4.0.2 patch's second hunk (dist/esm/encoding/package.json) is
  obsolete: 5.0.9 removed the wasm encoding/ directory entirely.
- Replace (not keep) the 4.0.2 patch entry: pnpm 10 hard-errors on
  unused patch declarations (ERR_PNPM_UNUSED_PATCH), and nothing else
  resolves 4.0.2 once sdk is at ^0.15.1 — exact-version patch keys
  force a cutover.
- Bump @sip-protocol/sdk ^0.11.0 -> ^0.15.1 (root, packages/sdk,
  examples/vault-privacy-provider): the minimal change that puts
  yellowstone 5.0.9 in the graph so the patch declaration is valid.
  Remaining 33 bumps of the #376 group stay with #376.
- pnpm-lock.yaml: honest full regen on current main base (pnpm 10).

Evidence: frozen install green; typecheck green; suite 563/563;
patched 5.0.9 named-ESM-imports with 42 exports and napi CJS-interop
resolves GrpcClient; pristine 5.0.9 triggers Node's
MODULE_TYPELESS_PACKAGE_JSON reparse. Full #376-content regen sim
(throwaway branch, all 42 group bumps applied) installs frozen and
passes 563/563.
@vercel

vercel Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sipher Ready Ready Preview Sep 23, 2026 11:27pm UTC

@rz1989s
rz1989s merged commit 7cc2592 into main Sep 24, 2026
8 checks passed
@rz1989s
rz1989s deleted the fix/port-yellowstone-patch-5 branch September 24, 2026 00:12
rz1989s added a commit that referenced this pull request Sep 24, 2026
…9bc7

Regenerated pnpm-lock.yaml from main's base with pnpm 10.34.5.
Kept the group's remaining bumps; preserved #377's yellowstone-grpc
5.0.9 patch declaration and sdk ^0.15.1.

This branch was successfully deployed

1 active deployment
Preview — f5ca49a5 Deployed Sep 23, 2026 by vercel[bot]
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