Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix package exports #414

Merged
merged 3 commits into from
Apr 12, 2024
Merged

fix package exports #414

merged 3 commits into from
Apr 12, 2024

Conversation

kylebarron
Copy link
Owner

No description provided.

@llimllib
Copy link

llimllib commented Mar 14, 2024

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")),
  ),
);

@kylebarron
Copy link
Owner Author

Thanks! I just need to update this PR now that we don't have arrow2 and then I can merge

Copy link

github-actions bot commented Apr 12, 2024

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\%}$

@kylebarron kylebarron merged commit cc8110b into main Apr 12, 2024
7 checks passed
@kylebarron kylebarron deleted the kyle/fix-package-exports branch April 12, 2024 17:47
@kylebarron
Copy link
Owner Author

For some reason the types still aren't loading in some environments, but this is still progress.

@andresgutgon
Copy link

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?

@kylebarron
Copy link
Owner Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants