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

deps: update jsonld to latest #12257

Merged
merged 1 commit into from Mar 18, 2021
Merged

deps: update jsonld to latest #12257

merged 1 commit into from Mar 18, 2021

Conversation

brendankenny
Copy link
Member

@brendankenny brendankenny commented Mar 18, 2021

fixes #12244

We only use require('jsonld').expand(), so it was a pretty easy update :)

@brendankenny brendankenny requested a review from a team as a code owner March 18, 2021 01:11
@brendankenny brendankenny requested review from adamraine and removed request for a team March 18, 2021 01:11
@google-cla google-cla bot added the cla: yes label Mar 18, 2021
@@ -98,7 +98,7 @@ describe('JSON-LD validation', () => {
const errors = await validateJSONLD(`{
"@context": {
"image": {
"@id": "@error"
"@id": "/error/"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'@error' here became a warning, so this uses a different invalid value

"jsonld": "^1.5.0",
"jsonlint-mod": "^1.7.5",
"jsonld": "^4.0.1",
"jsonlint-mod": "^1.7.6",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not

}

export function expand(object: any, options: JsonldOptions): Promise<any>;
export function expand(object: unknown, options: JsonldOptions): Promise<any>;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are definitelytyped types for jsonld now, but expand() still has the old callback-based documentLoader, so easier to still just maintain types for our own tiny corner of the library. It would be nice to eventually switch and not rely on LH.StructuredData.ExpandedSchemaRepresentation being the source of truth, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to latest version of jsonld to avoid pulling in vulnerable version of xmldom
4 participants