You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
response.blob() drops body bytes — same shape as #227, needs Blob instance methods #234
Follow-up to #227. response.blob() (in crates/perry-stdlib/src/fetch.rs, immediately below the arrayBuffer() fix that landed via #232) has the same metadata-only-stub bug: resp.body is consumed only for .len(), then the resolved value is a 2-field stub object { size, type } with no actual byte storage. Any user code trying to read bytes out of a Blob sees nothing.
response.arrayBuffer() could be fixed by returning a real BufferHeader because the user-side consumers (new Uint8Array(buf) / Buffer.from(buf)) are already wired through the buffer registry. Blob is a distinct JS type with its own surface that needs to land first:
blob.arrayBuffer(): Promise<ArrayBuffer>
blob.text(): Promise<string>
blob.bytes(): Promise<Uint8Array> (newer, but increasingly common)
blob.slice(start?, end?, type?): Blob
blob.stream(): ReadableStream (separate gap; depends on stream impl)
Each method needs:
A runtime symbol exported from perry-stdlib (probably keyed off a BLOB_REGISTRY similar to FETCH_RESPONSES).
A codegen dispatch row in crates/perry-codegen/src/lower_call.rs routing blob.<method>() to the runtime symbol — mirroring how the arrayBuffer / clone / headers methods are routed for Response.
Reference shape for the dispatch wiring: `crates/perry-codegen/src/lower_call.rs:4720-4729` (the `arrayBuffer` / `blob` arms in the response-method dispatch table).
Activity
chore(fetch): point blob TODO at the dedicated follow-up issue
chore(fetch): point blob TODO at the dedicated follow-up issue
fix(fetch): copy body bytes into response.arrayBuffer() result (#232)
ci: skip test_issue_234_blob_methods on macOS-14 (Buffer SDK/linker gap)
ci: skip test_issue_234_blob_methods on macOS-14 (Buffer SDK/linker gap)
chore(release): v0.5.359 — fold in PR #238 + slice spec fix + comment…
fix(fetch): PerryTS#234 real Blob with arrayBuffer/text/bytes/slice i…
feat(stdlib): web streams api (ReadableStream + WritableStream + Tran…