diff --git a/.vscode/import_map.json b/.vscode/import_map.json index e761e34..eeb6b26 100644 --- a/.vscode/import_map.json +++ b/.vscode/import_map.json @@ -1,14 +1,13 @@ { "imports": { - "$fresh/": "https://deno.land/x/fresh@1.1.0/", - "preact": "https://esm.sh/preact@10.10.6", - "preact/": "https://esm.sh/preact@10.10.6/", - "preact-render-to-string": "https://esm.sh/*preact-render-to-string@5.2.3/", + "$fresh/": "https://deno.land/x/fresh@1.1.4/", + "preact": "https://esm.sh/preact@10.11.0", + "preact/": "https://esm.sh/preact@10.11.0/", + "preact-render-to-string": "https://esm.sh/*preact-render-to-string@5.2.4", "@preact/signals": "https://esm.sh/*@preact/signals@1.0.3", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.0.1", "twind": "https://esm.sh/twind@0.16.17", "twind/": "https://esm.sh/twind@0.16.17/", - "$std/": "https://deno.land/std@0.150.0/", "react": "https://esm.sh/preact@10.10.6/compat", "react-dom": "https://esm.sh/preact@10.10.6/compat", @@ -20,9 +19,6 @@ "ldkit/sparql": "../sparql.ts", "ldkit/rdf": "../rdf.ts", - "n3": "https://esm.sh/n3", - - "https://esm.sh/v94/web-streams-ponyfill@1.4.2/deno/web-streams-ponyfill.js": "https://esm.sh/v77/web-streams-ponyfill@1.4.2/deno/web-streams-ponyfill.js", - "https://esm.sh/v94/@types/rdf-js@4.0.2/rdf-js": "https://esm.sh/v94/rdf-js@4.0.2" + "n3": "https://esm.sh/n3" } } diff --git a/deno.json b/deno.json index 66b9dcf..4c5610a 100644 --- a/deno.json +++ b/deno.json @@ -4,11 +4,12 @@ "fmt:fix": "deno fmt library/ specs/ www/ docs/", "fmt:check": "deno fmt --check library/ specs/ www/ docs/", "lint": "deno lint library/ specs/ www/ docs/", - "test": "deno test --allow-env --allow-net ./specs", + "test": "deno test --allow-env --allow-net --allow-read ./specs", "dnt": "deno run -A --importmap ./scripts/dnt_import_map.json ./scripts/dnt.ts" }, "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" - } + }, + "lock": false } diff --git a/library/asynciterator.ts b/library/asynciterator.ts index 23f7664..2190eca 100644 --- a/library/asynciterator.ts +++ b/library/asynciterator.ts @@ -1,10 +1,10 @@ -import { AsyncIterator } from "https://esm.sh/asynciterator@3.7.0"; +import { AsyncIterator } from "npm:asynciterator@3.8.0"; export { ArrayIterator, type AsyncIterator, MappingIterator, -} from "https://esm.sh/asynciterator@3.7.0"; +} from "npm:asynciterator@3.8.0"; type TreeNode = { [property: string]: T[] | TreeNode; diff --git a/library/rdf.ts b/library/rdf.ts index ed97931..3c1c95b 100644 --- a/library/rdf.ts +++ b/library/rdf.ts @@ -1,19 +1,16 @@ -import type * as RDF from "https://esm.sh/rdf-js@4.0.2"; +import type * as RDF from "npm:rdf-js@4.0.2"; export type { RDF }; -export { fromRdf, toRdf } from "https://esm.sh/rdf-literal@1.3.0"; +export { fromRdf, toRdf } from "npm:rdf-literal@1.3.1"; -import { - DataFactory, - DefaultGraph, -} from "https://esm.sh/rdf-data-factory@1.1.1"; +import { DataFactory, DefaultGraph } from "npm:rdf-data-factory@1.1.1"; export { DataFactory, DefaultGraph }; import type { IDataSource, IQueryContextCommon, -} from "https://esm.sh/@comunica/types@2.4.0"; +} from "npm:@comunica/types@2.6.8"; export type LDkitContext = { graph?: string; diff --git a/library/schema/utils.ts b/library/schema/utils.ts index 702c5a9..931291a 100644 --- a/library/schema/utils.ts +++ b/library/schema/utils.ts @@ -1,5 +1,5 @@ import xsd from "../namespaces/xsd.ts"; -//import { string } from "yargs"; + import type { Property, PropertyPrototype, diff --git a/scripts/dnt.ts b/scripts/dnt.ts index 02a1b11..23e692d 100644 --- a/scripts/dnt.ts +++ b/scripts/dnt.ts @@ -1,4 +1,4 @@ -import { build, emptyDir } from "https://deno.land/x/dnt@0.30.0/mod.ts"; +import { build, emptyDir } from "https://deno.land/x/dnt@0.33.1/mod.ts"; await emptyDir("./npm"); diff --git a/scripts/dnt_import_map.json b/scripts/dnt_import_map.json index a6e740a..899e37c 100644 --- a/scripts/dnt_import_map.json +++ b/scripts/dnt_import_map.json @@ -1,6 +1,4 @@ { "imports": { - "https://esm.sh/v94/web-streams-ponyfill@1.4.2/deno/web-streams-ponyfill.js": "https://esm.sh/v77/web-streams-ponyfill@1.4.2/deno/web-streams-ponyfill.js", - "https://esm.sh/v94/@types/rdf-js@4.0.2/rdf-js": "https://esm.sh/v94/rdf-js@4.0.2" } } diff --git a/specs/lens.test.ts b/specs/lens.test.ts index b713eee..98417ca 100644 --- a/specs/lens.test.ts +++ b/specs/lens.test.ts @@ -1,4 +1,4 @@ -import { assert, assertEquals, equal } from "./test_deps.ts"; +import { assert, assertEquals, Comunica, equal } from "./test_deps.ts"; import { createStore, @@ -12,8 +12,6 @@ import { createLens } from "../library/lens/mod.ts"; import { rdf, xsd } from "../library/namespaces/mod.ts"; import { DataFactory } from "../library/rdf.ts"; -import { QueryEngine as Comunica } from "https://esm.sh/@comunica/query-sparql-rdfjs@2.4.3"; - const assertContainsEqual = (haystack: unknown[], needle: unknown) => { let found = false; for (const item of haystack) { diff --git a/specs/test_deps.ts b/specs/test_deps.ts index f0ac6ce..e787636 100644 --- a/specs/test_deps.ts +++ b/specs/test_deps.ts @@ -5,6 +5,11 @@ export { assertStrictEquals, assertThrows, equal, -} from "https://deno.land/std@0.153.0/testing/asserts.ts"; +} from "https://deno.land/std@0.179.0/testing/asserts.ts"; -export { assert as assertTypeSafe } from "https://esm.sh/tsafe@1.0.1"; +export { assert as assertTypeSafe } from "npm:tsafe@1.4.3"; + +export { QueryEngine as Comunica } from "npm:@comunica/query-sparql-rdfjs@2.5.2"; + +// @deno-types="npm:@types/n3" +export * as N3 from "npm:n3@1.16.3"; diff --git a/specs/test_utils.ts b/specs/test_utils.ts index 66ccd74..9fee105 100644 --- a/specs/test_utils.ts +++ b/specs/test_utils.ts @@ -1,4 +1,4 @@ -import { Parser, Store } from "https://esm.sh/n3@1.16.2"; +import { N3 } from "./test_deps.ts"; import { type Context, @@ -14,8 +14,6 @@ const X_NAMESPACE = "http://x/"; const dataFactory = new DataFactory(); -// export const x = (s: string) => `${X_NAMESPACE}${s}`; - export const x = new Proxy( {}, { @@ -73,7 +71,7 @@ export const ttl = (turtle: string) => { const escapedTurtle = escapePseudoVariables(prefixedTurtle); const df = DF(); - const escapedQuads = new Parser({ + const escapedQuads = new N3.Parser({ factory: df, }).parse(escapedTurtle); const quads = escapedQuads.map(convertPseudoVariables); @@ -86,16 +84,16 @@ export const createGraph = (turtle: string) => { }; export const createStore = () => - new Store(undefined, { + new N3.Store(undefined, { factory: DF(), }); -export const createStoreContext = (store: Store, context?: Context) => ({ +export const createStoreContext = (store: N3.Store, context?: Context) => ({ ...context, sources: [store], } as Context); -export const emptyStore = (store: Store) => { +export const emptyStore = (store: N3.Store) => { const stream = store.removeMatches(null, null, null, null); return new Promise((resolve) => { stream.on("end", resolve); diff --git a/www/import_map.json b/www/import_map.json index cade2d7..3a7cf57 100644 --- a/www/import_map.json +++ b/www/import_map.json @@ -1,13 +1,12 @@ { "imports": { - "$fresh/": "https://deno.land/x/fresh@1.1.1/", - "preact": "https://esm.sh/preact@10.10.6", - "preact/": "https://esm.sh/preact@10.10.6/", - "preact-render-to-string": "https://esm.sh/*preact-render-to-string@5.2.3/", + "$fresh/": "https://deno.land/x/fresh@1.1.4/", + "preact": "https://esm.sh/preact@10.11.0", + "preact/": "https://esm.sh/preact@10.11.0/", + "preact-render-to-string": "https://esm.sh/*preact-render-to-string@5.2.4", "@preact/signals": "https://esm.sh/*@preact/signals@1.0.3", "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.0.1", "twind": "https://esm.sh/twind@0.16.17", - "twind/": "https://esm.sh/twind@0.16.17/", - "$std/": "https://deno.land/std@0.150.0/" + "twind/": "https://esm.sh/twind@0.16.17/" } } diff --git a/www/utils/markdown.ts b/www/utils/markdown.ts index b880e64..2a608dd 100644 --- a/www/utils/markdown.ts +++ b/www/utils/markdown.ts @@ -3,5 +3,3 @@ import "https://esm.sh/prismjs@1.27.0/components/prism-jsx.js?no-check"; import "https://esm.sh/prismjs@1.27.0/components/prism-typescript.js?no-check"; import "https://esm.sh/prismjs@1.27.0/components/prism-tsx.js?no-check"; import "https://esm.sh/prismjs@1.27.0/components/prism-diff.js?no-check"; - -export { extract as frontMatter } from "$std/encoding/front_matter.ts";