Skip to content

Commit

Permalink
Bump rdf-dereference from 2.2.0 to 3.0.0 in /webserver (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Jul 13, 2024
1 parent 052138d commit 602c075
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion webserver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"mdast-util-find-and-replace": "^3.0.1",
"n3": "^1.17.4",
"prisma": "^5.16.2",
"rdf-dereference": "^2.2.0",
"rdf-dereference": "^3.0.0",
"rehype-sanitize": "^6.0.0",
"rehype-stringify": "^10.0.0",
"remark-parse": "^11.0.0",
Expand Down
10 changes: 5 additions & 5 deletions webserver/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions webserver/src/lib/parse-recipe.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { Store, Quad } from "n3";
import { Prefix, Subject, allOfType, isLiteral, nodeValue, nodeValueOrUndefined, nodeValues, rewriteSchema } from "./rdf";
import { Quad, Store } from "n3";
import { rdfDereferencer } from "rdf-dereference";
import { parseIntOrUndefined } from "./forms";
import rdfDereferencerWrapper from "rdf-dereference";
import type { JsonRecipe, JsonRecipeIngredient } from "./json-recipe";

// Workaround for https://github.com/rubensworks/rdf-dereference.js/issues/44.
const rdfDereferencer: typeof rdfDereferencerWrapper = (rdfDereferencerWrapper as any).default;
import { Prefix, Subject, allOfType, isLiteral, nodeValue, nodeValueOrUndefined, nodeValues, rewriteSchema } from "./rdf";

export async function parseRecipesFromUrl(url: string): Promise<JsonRecipe[]> {
const rdf = await extractRdfFromHtml(url);
Expand Down

0 comments on commit 602c075

Please sign in to comment.