Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2018
"ecmaVersion": 2020
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for dynamic import. However, this probably means that this should be released as a major version bump since it means older JavaScript environments may not be able to support the new syntax. We could avoid this by reverting to the AMD (require) bundle for duckdb-wasm and apache-arrow, but it might be time to move forward. I still need to think about this a bit.

},
"env": {
"es6": true,
Expand Down
10 changes: 7 additions & 3 deletions bin/resolve-dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ const mains = ["unpkg", "jsdelivr", "browser", "main"];
}
{
const package = await resolve("apache-arrow@4");
console.log(`export const arrow = dependency("${package.name}", "${package.version}", "${package.export}");`);
console.log(`export const arrow4 = dependency("${package.name}", "${package.version}", "${package.export}");`);
}
{
const package = await resolve("apache-arrow@9");
console.log(`export const arrow9 = dependency("${package.name}", "${package.version}", "+esm");`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arrow 10 is out so you can update to that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}
{
const package = await resolve("arquero");
Expand All @@ -87,8 +91,8 @@ const mains = ["unpkg", "jsdelivr", "browser", "main"];
console.log(`export const leaflet = dependency("${package.name}", "${package.version}", "${package.export.replace(/-src\.js$/, ".js")}");`);
}
{
const package = await resolve("@duckdb/duckdb-wasm@1.17.0");
console.log(`export const duckdb = dependency("${package.name}", "${package.version}", "${package.export}");`);
const package = await resolve("@duckdb/duckdb-wasm");
console.log(`export const duckdb = dependency("${package.name}", "${package.version}", "+esm");`);
}
})();

Expand Down
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default [
reserved: [
"FileAttachment",
"RequireError",
"DuckDBClient",
"SQLiteDatabaseClient",
"Workbook",
"ZipArchive",
Expand Down
12 changes: 3 additions & 9 deletions src/dependencies.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import dependency from "./dependency.mjs";
import * as ddb from "@duckdb/duckdb-wasm";
export const d3 = dependency("d3", "7.6.1", "dist/d3.min.js");
export const inputs = dependency("@observablehq/inputs", "0.10.4", "dist/inputs.min.js");
export const plot = dependency("@observablehq/plot", "0.6.0", "dist/plot.umd.min.js");
Expand All @@ -14,16 +13,11 @@ export const sql = dependency("sql.js", "1.7.0", "dist/sql-wasm.js");
export const vega = dependency("vega", "5.22.1", "build/vega.min.js");
export const vegalite = dependency("vega-lite", "5.5.0", "build/vega-lite.min.js");
export const vegaliteApi = dependency("vega-lite-api", "5.0.0", "build/vega-lite-api.min.js");
export const arrow = dependency("apache-arrow", "^8", "Arrow.es2015.min.js");
export const arrow4 = dependency("apache-arrow", "4.0.1", "Arrow.es2015.min.js");
export const arrow9 = dependency("apache-arrow", "9.0.0", "+esm");
export const arquero = dependency("arquero", "4.8.8", "dist/arquero.min.js");
export const topojson = dependency("topojson-client", "3.1.0", "dist/topojson-client.min.js");
export const exceljs = dependency("exceljs", "4.3.0", "dist/exceljs.min.js");
export const mermaid = dependency("mermaid", "9.1.6", "dist/mermaid.min.js");
export const leaflet = dependency("leaflet", "1.8.0", "dist/leaflet.js");
export const duckdb = ddb;
// export const duckdb = dependency("@duckdb/duckdb-wasm", "1.17.0", "dist/duckdb-browser.cjs");
// export const duckdb = dependency("@duckdb/duckdb-wasm", "1.17.0", "");
// export const duckdb = dependency("@duckdb/duckdb-wasm", "1.17.0", "?min");
// tried: dependency("@duckdb/duckdb-wasm", "1.17.0", "+esm");
// dependency("@duckdb/duckdb-wasm", "1.17.0", "dist/duckdb-browser.cjs");
// dependency("@duckdb/duckdb-wasm", "1.17.0", "dist/duckdb-browser.mjs");
export const duckdb = dependency("@duckdb/duckdb-wasm", "1.17.0", "+esm");
Loading