fix package exports
Confirmed that with a build made with this patch, this code works on node 20.11.1:
import * as Arrow from "apache-arrow";
import * as Parquet from "parquet-wasm";
const table = Arrow.tableFromArrays({ test: [42] });
process.stdout.write(
Parquet.writeParquet(
Parquet.Table.fromIPCStream(Arrow.tableToIPC(table, "stream")),
),
);
Thanks! I just need to update this PR now that we don't have arrow2 and then I can merge
Asset Sizes
| Asset | Uncompressed Size | Compressed Size |
|---|---|---|
| async_full/parquet_wasm_bg.wasm | 5.24MB +0B +0% | 1.18MB $\color{green}\textbf{-715B -0\%}$ |
| slim/parquet_wasm_bg.wasm | 3.45MB +0B +0% | 532KB $\color{green}\textbf{-206B -0\%}$ |
| sync/parquet_wasm_bg.wasm | 4.71MB +0B +0% | 1MB $\color{red}\textbf{+566B +0\%}$ |
For some reason the types still aren't loading in some environments, but this is still progress.
Hi, I'm trying this package in a nodejs script. I have a question. initWasm doesn't look necessary if we use nodejs. Is that correct?
As long as you use the Node entry point, that is correct. But if you're using the /esm entry point from Node, you still need to call initWasm