From fcd592b0f8188d883b2d3806b2c57ec172ed6247 Mon Sep 17 00:00:00 2001 From: Jesse Wright <63333554+jeswr@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:02:51 +0000 Subject: [PATCH] chore: bump jsonld-context-parser version --- package.json | 2 +- test/ParsingContext-test.ts | 10 ++++------ yarn.lock | 9 ++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 1e69542..9553d3c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "buffer": "^6.0.3", "canonicalize": "^1.0.1", "http-link-header": "^1.0.2", - "jsonld-context-parser": "^2.3.3", + "jsonld-context-parser": "^2.4.0", "rdf-data-factory": "^1.1.0", "readable-stream": "^4.0.0" }, diff --git a/test/ParsingContext-test.ts b/test/ParsingContext-test.ts index 8ac412e..91d7d23 100644 --- a/test/ParsingContext-test.ts +++ b/test/ParsingContext-test.ts @@ -1,4 +1,4 @@ -import {JsonLdContextNormalized} from "jsonld-context-parser"; +import {JsonLdContextNormalized, ContextParser} from "jsonld-context-parser"; import {ParsingContext} from "../lib/ParsingContext"; import {ParsingContextMocked} from "../mocks/ParsingContextMocked"; @@ -607,22 +607,20 @@ describe('ParsingContext', () => { describe('for type-scoped and property-scoped contexts', () => { beforeEach(() => { - parsingContext.contextTree.setContext(['', 'a'], Promise.resolve(new JsonLdContextNormalized({ - '@__propagateFallback': { fallback: true }, - '@propagate': false, + const contextParser = new ContextParser(); + parsingContext.contextTree.setContext(['', 'a'], contextParser.parse({ '@vocab': 'http://bla.org/', 'bar': { '@context': { baz: { '@type': '@vocab' }, }, }, - }))); + })); }); it('should consider the applicable property-scoped context', async () => { return expect(await parsingContext.getContext(['', 'a', 'bar'], 0)) .toEqual(new JsonLdContextNormalized({ - '@__propagateFallback': { fallback: true }, '@vocab': 'http://bla.org/', 'bar': { '@id': 'http://bla.org/bar' }, 'baz': { '@type': '@vocab', '@id': 'http://bla.org/baz' }, diff --git a/yarn.lock b/yarn.lock index 1fa95e5..39fb8f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2518,14 +2518,13 @@ jsonld-context-parser@^2.0.2, jsonld-context-parser@^2.1.3: http-link-header "^1.0.2" relative-to-absolute-iri "^1.0.5" -jsonld-context-parser@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/jsonld-context-parser/-/jsonld-context-parser-2.3.3.tgz#0bdab9eb5cb4b7e68aa7d6c38e58455363caaf9c" - integrity sha512-H+REInOx7XI2ciF8wJV31D20Bh+ofBmEjN2Tkds51vypqDJIiD341E5g+hYyrEInIKRnbW58TN/Ehz+ACT0l0w== +jsonld-context-parser@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonld-context-parser/-/jsonld-context-parser-2.4.0.tgz#fae15a56c5ceabd1c4520ab1a9cc12c9a0a8b67d" + integrity sha512-ZYOfvh525SdPd9ReYY58dxB3E2RUEU4DJ6ZibO8AitcowPeBH4L5rCAitE2om5G1P+HMEgYEYEr4EZKbVN4tpA== dependencies: "@types/http-link-header" "^1.0.1" "@types/node" "^18.0.0" - canonicalize "^1.0.1" cross-fetch "^3.0.6" http-link-header "^1.0.2" relative-to-absolute-iri "^1.0.5"