-
-
Notifications
You must be signed in to change notification settings - Fork 328
Object type streaming #2854
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
base: main
Are you sure you want to change the base?
Object type streaming #2854
Conversation
BadMachine
commented
Aug 8, 2025
- Fixed streams for object type items
- Example added
- Test added
- Example added - Test added
How to use the Graphite Merge QueueAdd the label ready-to-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
Related to #2826 |
…chine/napi-rs into fix/readable-stream-byte-mode-lock
Can smbd look at the PR, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Implements streaming support for object-type items in NAPI readable streams, fixing issues with object serialization in the stream processing pipeline.
- Fixed streaming functionality for object type items by updating the stream implementation
- Added example demonstrating object streaming with
Foo
andStreamItem
structs - Added comprehensive test coverage for object streaming functionality
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
examples/napi/src/stream.rs | Added object structs and streaming function implementation |
examples/napi/index.d.cts | Generated TypeScript definitions for new streaming interfaces |
examples/napi/index.cjs | Added export for new streaming function |
examples/napi/example.wasi.cjs | Added WASI export for new streaming function |
examples/napi/example.wasi-browser.js | Added browser export for new streaming function |
examples/napi/tests/values.spec.ts | Added test cases for object streaming functionality |
examples/napi/tests/snapshots/values.spec.ts.md | Updated test snapshots |
crates/napi/src/bindgen_runtime/js_values/stream/read.rs | Fixed core streaming implementation for object types |
examples/napi-cargo-test/CHANGELOG.md | Updated changelog formatting |
crates/napi/CHANGELOG.md | Updated changelog formatting |
crates/macro/CHANGELOG.md | Updated changelog formatting |
crates/backend/CHANGELOG.md | Updated changelog formatting |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
@@ -85,7 +85,7 @@ impl<T> FromNapiValue for ReadableStream<'_, T> { | |||
} | |||
|
|||
impl<T> ReadableStream<'_, T> { | |||
/// Returns a boolean indicating whether or not the readable stream is locked to a reader. | |||
/// Returns a boolean indicating regardless the readable stream is locked to a reader. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The word 'regardless' should be 'whether' to form proper English grammar. The comment should read 'Returns a boolean indicating whether the readable stream is locked to a reader.'
/// Returns a boolean indicating regardless the readable stream is locked to a reader. | |
/// Returns a boolean indicating whether the readable stream is locked to a reader. |
Copilot uses AI. Check for mistakes.