#1468·ripple

Replace the devalue pnpm patch with the released version once sveltejs/devalue#190 ships

Author: leonidazCreated Sep 9, 2026Updated Sep 9, 2026

Summary

#1466 applies a stringify performance change to [email protected] through pnpm patchedDependencies (patches/[email protected], registered in pnpm-workspace.yaml). The same change is proposed upstream in sveltejs/devalue#190 from the Ripple-TS/devalue fork. Once that PR is merged and devalue publishes a release containing it, drop the patch and take the release instead.

The patch only affects the devalue fallback path (values is_plain_data rejects: undefined, NaN, -0, bigints, Dates, Maps, Sets, shared references, cycles) and RPC; plain trackAsync payloads ship as raw JSON and do not go through devalue at all.

Steps

  1. Wait for sveltejs/devalue#190 to land and for a devalue release that includes it (the PR carries a changeset, so it will show in the devalue changelog as a patch release).
  2. Bump the devalue catalog entry in pnpm-workspace.yaml to that release.
  3. Remove patches/[email protected] and the patchedDependencies entry in pnpm-workspace.yaml, then pnpm install to refresh pnpm-lock.yaml.
  4. If the upstream review changed the implementation, check the upstream diff against the patch; anything not merged upstream (or merged differently) is either dropped or re-proposed, not kept as a patch.
  5. Verify: pnpm test --project ripple-server --project ripple-hydration --project ripple-client (the hydration envelope encoding and RPC tests exercise the devalue path), pnpm typecheck, and a node benchmarks/streaming-ssr/run.mjs 30 run; the cpu-* and all-fast ripple rows should be unchanged within noise.
  6. Add a ripple patch changeset noting the devalue bump.

If the upstream PR is not merged

Keep the patch only while it stays a clean apply on the pinned devalue version. If devalue moves on without it, decide between re-basing the patch onto the new version or dropping it; the patch is a small win on the fallback path (one product card ~9.5 µs → ~6.7 µs, string-heavy documents about −37%), so it is not worth carrying at the cost of falling behind on devalue releases.