Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.13.0 #30

Merged
merged 84 commits into from
Nov 18, 2023
Merged

0.13.0 #30

merged 84 commits into from
Nov 18, 2023

Conversation

lxsmnsyc
Copy link
Owner

@lxsmnsyc lxsmnsyc commented Nov 14, 2023

  • Add SpecialReference nodes
    • These node represents values that are accessed only through the serialized output which are not directly accessed by the user. This allows output deduping which is usually only achievable with the nodes that are derived from the values directly declared by the user.
  • Rework Iterable format.
    • Previously iterables used Array.from to get the items from the iterables, and then output them through either Array.prototype.values or Array[@@iterator] however this proved to be problematic for two reasons: 1. Array.from assumes that the iterator method would never throw, but that's not the case, so we also want the serialized iterator to emulate this sequence as to when the iterator would yield an item, would throw an error or when it is done, much like how seroval does for ReadableStream.
    • Iterables would also mistakenly duplicate references because of lazy evaluation. This breaks cross-referencing. The PR changes it so that items are evaluated immediately, which removes the need for lazy evaluation (which means, there's also no need to check if an item is an iterable or not internally).
    • isIterable check is deprecated (same with the Plugin API)
  • Deprecate MethodShorthand and ArrayPrototypeValues feature flags.
    • These two is only utilized by old iterable serialization, which no longer exists.
  • Add AsyncIterable support for async and streaming modes
  • Simplify serialized ReadableStream format for streaming mode
    • So instead of doing a nonsense switch code, we just call the controller method directly.
  • Add JSON serialization/deserialization support for cross-reference and streaming modes
  • Fix plugin references not getting assigned
  • Add ReadableStream support for async modes
  • Add Symbol.toStringTag and Symbol.isConcatSpreadable property serialization support

@lxsmnsyc lxsmnsyc merged commit 00e622c into main Nov 18, 2023
1 check passed
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