Skip to content

Deno 2 has a broken API for node:v8 when using serialize with Float16Array #26580

@0hmX

Description

@0hmX

Version: Deno 2.0.0

Here is an example code that I run

import { serialize } from "node:v8";

const float16Data = new Float16Array([1.0, 2.5, 3.14]);

try {
  const serialized = serialize(float16Data);
  console.log("Serialization successful!");
  console.log("Serialized data:", serialized);
} catch (error) {
  console.error("Serialization failed:", error.message);
}

I get the error

Serialization failed: Unserializable host object: 1,2.5,3.140625

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlynode:v8upstreamChanges in upstream are required to solve these issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions