Open domoritz opened 2 years ago
esm.run works fine (https://cdn.jsdelivr.net/npm/apache-arrow@7/+esm). Would you consider switching to it?
I would like to switch to esm.run or skypack.dev, but we don’t want to change the behavior of existing notebooks. I recommend specifying a full URL instead of using a bare module specifier. In the future we may have standard library versioning that would let us change the behavior in new notebooks or on an opt-in basis.
Makes sense. Since Arrow is a transitive dependency in my case, the user has to use a fully qualified import for the main dependency. It seems to work fine (import("https://cdn.jsdelivr.net/npm/@duckdb/duckdb-wasm@1.13.1-dev285.0/+esm")
).
For Arrow itself, instead of import('apache-arrow')
I will recommend require('apache-arrow@7')
or import("https://cdn.jsdelivr.net/npm/apache-arrow@7/+esm")
.
Also note that Apache Arrow is part of our recommended libraries, so you can reference Arrow
in a notebook without needing to import it. That said, we may be stuck on Apache Arrow 4.x if there are non-backwards-compatible changes in subsequent major versions. (In the future, we also plan on having version pinning for this.)
We made some significant API changes in v7. v6 should be very similar/be compatible with v5 and v4, though, I think. Arrow does major releases every 3 months so a new version doesn't mean it has breaking changes.
When I load
import("apache-arrow@7")
, Observable loads https://unpkg.com/apache-arrow@7?module which resolves to https://unpkg.com/apache-arrow@7.0.0/Arrow.node.mjs?module instead of https://unpkg.com/apache-arrow@7.0.0/Arrow.dom.mjs?module. I would expect Observable to load the dom version since the package.json specifies thatArrow.node.mjs
should resolve toArrow.dom.mjs
in browser environments. Unfortunately, I cannot change the way the library is imported since it's transitively imported.I filed an issue with unpkg at https://github.com/mjackson/unpkg/issues/325 but haven't heard back.