Skip to content

@context resolution respects relative URLs. #337

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

Merged
merged 2 commits into from
Dec 3, 2019
Merged

@context resolution respects relative URLs. #337

merged 2 commits into from
Dec 3, 2019

Conversation

ericprud
Copy link
Contributor

@gkellogg gkellogg requested a review from davidlehn December 2, 2019 18:25
@gkellogg
Copy link
Collaborator

gkellogg commented Dec 2, 2019

LGTM.

@gkellogg gkellogg self-requested a review December 2, 2019 18:43
Copy link
Collaborator

@gkellogg gkellogg left a comment

Choose a reason for hiding this comment

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

With a push to ignore some @propagate tests added in w3c/json-ld-api#230, the only tests that fail without this PR are those added to test this feature. Using the change fixes that. IMO, the only issue is if it is stylistically acceptable.

Copy link
Member

@dlongley dlongley left a comment

Choose a reason for hiding this comment

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

Seems ok to me. I added a minor stylistic suggestion.

@davidlehn -- this PR look good to you?

@@ -83,7 +83,7 @@ module.exports = ({
const statusText = http.STATUS_CODES[res.statusCode];
if(res.statusCode >= 400) {
throw new JsonLdError(
'URL could not be dereferenced: ' + statusText,
`URL "${url}" could not be dereferenced: ${statusText}`,
Copy link
Member

Choose a reason for hiding this comment

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

This is a change from our usual style. URL is already a param in the details so could be omitted in the message text. Could also move the statusText to details.

Copy link
Member

Choose a reason for hiding this comment

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

I'll merge PR, but may change this text later.

@davidlehn davidlehn merged commit a261d67 into digitalbazaar:master Dec 3, 2019
@davidlehn davidlehn added this to the JSON-LD 1.1 milestone Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants