Skip to content

Conversation

BadMachine
Copy link

  • Fixed streams for object type items
  • Example added
  • Test added

- Example added
- Test added
Copy link

graphite-app bot commented Aug 8, 2025

How to use the Graphite Merge Queue

Add 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.

@BadMachine
Copy link
Author

Related to #2826

@Brooooooklyn Brooooooklyn requested a review from Copilot August 13, 2025 06:38
Copilot

This comment was marked as outdated.

@BadMachine
Copy link
Author

Can smbd look at the PR, please?

@Brooooooklyn Brooooooklyn requested a review from Copilot August 16, 2025 07:40
Copy link
Contributor

@Copilot Copilot AI left a 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 and StreamItem 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.
Copy link
Preview

Copilot AI Aug 16, 2025

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.'

Suggested change
/// 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.

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