Skip to content

Update @byteslice/result 0.2.0 → latest (0.5.0) #532

Description

@coderdan

Summary

Update @byteslice/result from 0.2.0 to the latest (0.5.0 at time of writing). It's the Result-type primitive used pervasively across our SDKs — withResult(...) and the { data } | { failure } shape underpin every encryption/decryption/query operation — so this is a core, high-blast-radius dependency, not a leaf.

Current state

Pinned in three packages, inconsistently and not via a pnpm catalog:

Package Pin
packages/stack 0.2.0 (exact)
packages/protect ^0.2.0
packages/protect-dynamodb ^0.2.0

Lockfile resolves all to 0.2.0. ~44 source files across stack, protect (+ ffi/identify/stash), protect-dynamodb, migrate, and prisma-next/stack import it.

Why it's not trivial

0.2.0 → 0.5.0 crosses three pre-1.0 minors (0.3.0, 0.4.0, 0.5.0); pre-1.0, a minor bump can be breaking. The upgrade must verify our usage still holds:

  • withResult(fn, onError) signature and behaviour (sync + async).
  • The Result<T, E> shape and the .data / .failure discriminants we read everywhere (e.g. if (result.failure) … / result.data).
  • Any rename/removal of exported types or helpers.

Changelog / source: https://github.com/ByteSliceHQ/byteslice/tree/main/packages/result

Tasks

  • Review the 0.30.5 changelog for breaking changes vs. our usage.
  • Bump all three packages to the new version (and align the pins — exact vs ^).
  • Consider adding @byteslice/result to the pnpm repo catalog so it's lockstep-managed like the other shared deps (avoids the current per-package drift).
  • Regenerate pnpm-lock.yaml; run typecheck + the full test suite (Node 22/24, Bun, WASM E2E).
  • Add a changeset if any public Result-shaped API surface changes.

Notes

Low urgency (no known bug or CVE driving it) — this is dependency hygiene. Worth doing in its own PR given the cross-package reach, ideally bundled with the catalog migration above.

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency fileenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions