diff --git a/ext/node/polyfills/v8.ts b/ext/node/polyfills/v8.ts index cad00bd7f7..f06227cd54 100644 --- a/ext/node/polyfills/v8.ts +++ b/ext/node/polyfills/v8.ts @@ -14,7 +14,7 @@ import { import { Buffer } from "node:buffer"; -import { notImplemented } from "ext:deno_node/_utils.ts"; +import { notImplemented, warnNotImplemented } from "ext:deno_node/_utils.ts"; export function cachedDataVersionTag() { return op_v8_cached_data_version_tag(); @@ -79,7 +79,41 @@ export function deserialize(data) { } export class Serializer { constructor() { - notImplemented("v8.Serializer.prototype.constructor"); + warnNotImplemented("v8.Serializer.prototype.constructor"); + } + + releaseBuffer(): Buffer { + warnNotImplemented("v8.DefaultSerializer.prototype.releaseBuffer"); + return Buffer.from(""); + } + + transferArrayBuffer(_id: number, _arrayBuffer: ArrayBuffer): void { + warnNotImplemented("v8.DefaultSerializer.prototype.transferArrayBuffer"); + } + + writeDouble(_value: number): void { + warnNotImplemented("v8.DefaultSerializer.prototype.writeDouble"); + } + + writeHeader(): void { + warnNotImplemented("v8.DefaultSerializer.prototype.writeHeader"); + } + + writeRawBytes(_value: ArrayBufferView): void { + warnNotImplemented("v8.DefaultSerializer.prototype.writeRawBytes"); + } + + writeUint32(_value: number): void { + warnNotImplemented("v8.DefaultSerializer.prototype.writeUint32"); + } + + writeUint64(_hi: number, _lo: number): void { + warnNotImplemented("v8.DefaultSerializer.prototype.writeUint64"); + } + + // deno-lint-ignore no-explicit-any + writeValue(_value: any): void { + warnNotImplemented("v8.DefaultSerializer.prototype.writeValue"); } } export class Deserializer { @@ -87,9 +121,10 @@ export class Deserializer { notImplemented("v8.Deserializer.prototype.constructor"); } } -export class DefaultSerializer { +export class DefaultSerializer extends Serializer { constructor() { - notImplemented("v8.DefaultSerializer.prototype.constructor"); + warnNotImplemented("v8.DefaultSerializer.prototype.constructor"); + super(); } } export class DefaultDeserializer {