Skip to content

Commit

Permalink
chore: bump jsonld-context-parser version
Browse files Browse the repository at this point in the history
  • Loading branch information
jeswr committed Nov 8, 2023
1 parent fb15661 commit fcd592b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
10 changes: 4 additions & 6 deletions test/ParsingContext-test.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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' },
Expand Down
9 changes: 4 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit fcd592b

Please sign in to comment.