Skip to content

Conversation

@brendankenny
Copy link
Contributor

@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
"@context": {
"image": {
"@id": "@error"
"@id": "/error/"
Copy link
Contributor Author

@brendankenny brendankenny Mar 18, 2021

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
Contributor 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
Contributor 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