kriszyp / msgpackr

Ultra-fast MessagePack implementation with extension for record and structural cloning / msgpack.org[JavaScript/NodeJS]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing exports from index, UnpackrStream, PackrStream

Duoquote opened this issue · comments

Hello,

I am trying to import UnpackrStream as shown below,

import { UnpackrStream } from "msgpackr";

And I am introduced with this error:

image

Typescript notations do say UnpackrStream exist but is missing in msgpackr/index.js, as well as other exports from stream.js...

image

image

Also missing in source code:

msgpackr/index.js

Lines 1 to 5 in 0c0ade5

export { Packr, Encoder, addExtension, pack, encode, NEVER, ALWAYS, DECIMAL_ROUND, DECIMAL_FIT, REUSE_BUFFER_MODE } from './pack.js'
export { Unpackr, Decoder, C1, unpack, unpackMultiple, decode, FLOAT32_OPTIONS, clearSource, roundFloat32, isNativeAccelerationEnabled } from './unpack.js'
export { decodeIter, encodeIter } from './iterators.js'
export const useRecords = false
export const mapsAsObjects = true

I am using version 1.8.1.

@Duoquote The streaming modules require node functionality, so they are intentionally omitted from the browser/non-node entry point (msgpackr/index.js), and only available on the node platform (or node-like platforms including bun, deno) through the node entry point (msgpackr/node-index.js).