Replace the devalue pnpm patch with the released version once sveltejs/devalue#190 ships
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
- 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).
- Bump the
devaluecatalog entry inpnpm-workspace.yamlto that release. - Remove
patches/[email protected]and thepatchedDependenciesentry inpnpm-workspace.yaml, thenpnpm installto refreshpnpm-lock.yaml. - 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.
- Verify:
pnpm test --project ripple-server --project ripple-hydration --project ripple-client(thehydration envelope encodingand RPC tests exercise the devalue path),pnpm typecheck, and anode benchmarks/streaming-ssr/run.mjs 30run; thecpu-*andall-fastripple rows should be unchanged within noise. - Add a
ripplepatch 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.
Source: Ripple-TS/ripple