Skip to content

Commit

Permalink
fix: always use options.fetch in getWellKnownSolid (#1680)
Browse files Browse the repository at this point in the history
* fix: always use options.fetch in getWellKnownSolid

* chore: update CHANGELOG.md with recent changes
  • Loading branch information
ThisIsMissEm authored Aug 18, 2022
1 parent 130e7b1 commit f658bf1
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 129 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,21 @@ The following changes have been implemented but not released yet:

## [Unreleased]

### Bugfixes

- Modify the internal `getWellKnownSolid` method used by
`@inrupt/solid-client-notifications` to always use the provided fetch
implementation when requesting the solid dataset that is the
`/.well-known/solid` resource. This fixes a bug where in some environments
cross-fetch failed to load at this point in the code.

### Other Changes

- Remove workaround for creating containers with POST instead of PUT.
This was needed for [Node Solid Server (version < 5.3)](https://github.com/solid/node-solid-server/issues/1465)
- Migrate project to our common eslint configuration, this resulted in a fairly
large amount of code changes, though everything should appear the same to
consumers.

## [1.23.1] - 2022-06-01

Expand Down
62 changes: 60 additions & 2 deletions src/resource/__snapshots__/solidDataset.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Object {
}
`;

exports[`getWellKnownSolid returns the contents of .well-known/solid for the given resource 1`] = `
exports[`getWellKnownSolid returns the contents of .well-known/solid for the given resource (1.1) 1`] = `
Object {
"graphs": Object {
"default": Object {
Expand Down Expand Up @@ -95,7 +95,65 @@ Object {
"isRawData": false,
"linkedResources": Object {},
"location": undefined,
"sourceIri": "https://some.pod/resource",
"sourceIri": "https://example.org/pod/.well-known/solid",
},
"type": "Dataset",
}
`;

exports[`getWellKnownSolid returns the contents of .well-known/solid for the given resource (2.0) 1`] = `
Object {
"graphs": Object {
"default": Object {
"_:n3-1006": Object {
"predicates": Object {
"http://www.w3.org/1999/02/22-rdf-syntax-ns#type": Object {
"namedNodes": Array [
"http://www.w3.org/ns/solid/terms#DiscoveryDocument",
],
},
"http://www.w3.org/ns/auth/acl#trustedApp": Object {
"namedNodes": Array [
"https://podbrowser.inrupt.com/api/app",
],
},
"http://www.w3.org/ns/solid/terms#maxPodsPerOwner": Object {
"literals": Object {
"http://www.w3.org/2001/XMLSchema#integer": Array [
"10",
],
},
},
"http://www.w3.org/ns/solid/terms#notificationGateway": Object {
"namedNodes": Array [
"https://notification.inrupt.com/",
],
},
"http://www.w3.org/ns/solid/terms#provision": Object {
"namedNodes": Array [
"https://provision.inrupt.com/",
],
},
"http://www.w3.org/ns/solid/terms#validatesRdfSources": Object {
"literals": Object {
"http://www.w3.org/2001/XMLSchema#boolean": Array [
"true",
],
},
},
},
"type": "Subject",
"url": "_:n3-1006",
},
},
},
"internal_resourceInfo": Object {
"contentLocation": undefined,
"contentType": "text/turtle",
"isRawData": false,
"linkedResources": Object {},
"location": undefined,
"sourceIri": "",
},
"type": "Dataset",
}
Expand Down
Loading

1 comment on commit f658bf1

@vercel
Copy link

@vercel vercel bot commented on f658bf1 Aug 18, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

solid-client-js – ./

solid-client-js-git-main-inrupt.vercel.app
solid-client-js-inrupt.vercel.app
solid-client.vercel.app

Please sign in to comment.