Skip to content

Implement node:buffer Blob, File, and object URL parity #1211

Description

@TheHypnoo

Context

Node's node:buffer module also exposes web-like binary object APIs: Blob, File, and object URL helpers such as resolveObjectURL.

Gap

Perry's current node:buffer work focuses on core Buffer byte behavior and does not implement this Blob/File/object URL surface.

Desired behavior

Future parity should cover at least:

  • new Blob([...]).size, .type, .text(), .arrayBuffer()
  • new File([...], name, options).name, .lastModified, inherited Blob behavior
  • resolveObjectURL(id) behavior for object URLs created through the compatible runtime surface

Suggested implementation notes

This likely belongs in a separate PR because it needs web Blob/File object modeling, async methods/promises, and object URL registry behavior rather than simple Buffer byte helpers.

Parity tests to add

  • test-parity/node-suite/buffer/blob-file/blob-basic.ts
  • test-parity/node-suite/buffer/blob-file/file-basic.ts
  • test-parity/node-suite/buffer/blob-file/object-url.ts

Validation

  • ./run_parity_tests.sh --suite node-suite --module buffer

Metadata

Metadata

Assignees

No one assigned

    Labels

    parityCompatibility gap with Node.js, ECMAScript, or the supported ecosystem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions