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

no-workaround duckdb #287

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 2 additions & 8 deletions src/client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ const runtime = new Runtime(library);
export const main = runtime.module();

const attachedFiles = new Map();
function resolveFile(name) {
return attachedFiles.get(name);
}
const resolveFile = (name) => attachedFiles.get(name);
main.builtin("FileAttachment", runtime.fileAttachments(resolveFile));

const databaseTokens = new Map();
async function resolveDatabaseToken(name) {
Expand All @@ -22,11 +21,6 @@ async function resolveDatabaseToken(name) {
return token;
}

// https://github.com/observablehq/cli/issues/190
const FileAttachment = runtime.fileAttachments(resolveFile);
FileAttachment.prototype.url = async function() { return String(new URL(await this._url, location)); }; // prettier-ignore
main.builtin("FileAttachment", FileAttachment);

export const cellsById = new Map(); // TODO hide

export function define(cell) {
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -252,17 +252,17 @@
isoformat "^0.2.0"

"@observablehq/runtime@^5.9.4":
version "5.9.4"
resolved "https://registry.yarnpkg.com/@observablehq/runtime/-/runtime-5.9.4.tgz#2436ced2ab09b27959dcc07ace96307d86902981"
integrity sha512-r+2TjUH4oZlTkmZnk0tj4kgAe1C2O+KVPjWqxH/6G5fF38UAYlUf/+ONFmLotsXs0BkqHKXIui5U8dMdeMkncw==
version "5.9.5"
resolved "https://registry.yarnpkg.com/@observablehq/runtime/-/runtime-5.9.5.tgz#96032d2e0fb8d3c0cb35fbc84229e21b710e70d8"
integrity sha512-cVjqjhwiDBsX9TokNCsg/+H+74JvneX58ExF8mUAtNVkBN7+eaiqYP450xaObruSwEbdm3+IuJe/gTrcET98dg==
dependencies:
"@observablehq/inspector" "^5.0.0"
"@observablehq/stdlib" "^5.0.0"

"@observablehq/stdlib@^5.0.0":
version "5.8.3"
resolved "https://registry.yarnpkg.com/@observablehq/stdlib/-/stdlib-5.8.3.tgz#5ddd760c60aa9102c9b1323230cbe4c9da248d3d"
integrity sha512-XmuwqzAMZ8H0ICJfzd5wV3WD6nLlC2XwhMIdu2QDZppTSxGafATMSbgZ2JaiNPCejenkpERGmoC3W83FUGuNeg==
version "5.8.4"
resolved "https://registry.yarnpkg.com/@observablehq/stdlib/-/stdlib-5.8.4.tgz#31db8c79559cb707347656f87975a030d6dbc687"
integrity sha512-AcYclKQPLv9JJTinZ9kbEYYMGM+hGf2qpZ6nr41FjbZdF6+sxFdFNnW3l9reZ+xJ8iOpp0UHa4MvN08v5FtcRQ==
dependencies:
d3-array "^3.2.0"
d3-dsv "^3.0.1"
Expand Down