Repository navigation
chore: switch from vendored devalue fork to upstream devalue 6 - #3914
Merged
Merged
Conversation
`devalue` 6 ships the `js` tagged-template replacer API from sveltejs/devalue#182, which is what the fork existed for. The replacer now returns `js` fragments, so a signal inside a factory's args and in a sibling position revives as one instance. Also adds unit round-trips for Temporal types, typed arrays, `DataView`, `URL`, sparse arrays and special numbers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
devalue6 ships thejstagged-template replacer API from sveltejs/devalue#182, which is what our vendored fork existed for. This dropssrc/vendor/devalueand depends ondevalue@^6.0.3instead.createSerializernow returnsjsfragments instead of callingrecurse. Import aliases and factory args aren't known until runtime, so a smallsource()helper builds the template strings array by hand. This relies onjsonly checking thatstringsandstrings.raware arrays, which isn't documented upstream.ArrayBufferand every typed array (incl. subarrays and shared buffers),DataView,URL/URLSearchParams, sparse arrays, andundefined/NaN/±Infinity/-0. These found three bugs in the old fork (sparse array holes,BigInt64Arrayelements,DataViewoffsets) that upstream 6 doesn't have.