Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add react-native section to package.json
  • Loading branch information
dmitrizagidulin committed Dec 29, 2023
commit 7caf975812a3e2207ff6869a7d664bcf4afab963
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# jsonld ChangeLog

## 8.3.3 -

### Added
- Add `"react-native"` section to `package.json` and instructions on using
React Native in the README.

## 8.3.2 - 2023-12-06

### Fixed
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,17 @@ The `safe` options flag set to `true` enables this behavior:
const expanded = await jsonld.expand(data, {safe: true});
```

### Using with React Native

Using this library with React Native requires the
[`data-integrity-rn`](https://github.com/digitalcredentials/data-integrity-rn)
polyfill to be imported before this library:

```js
import '@digitalcredentials/data-integrity-rn';
import * as jsonld from 'jsonld';
```

Tests
-----

Expand Down
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"lib/**/*.js"
],
"dependencies": {
"@digitalbazaar/http-client": "^3.4.1",
"@digitalbazaar/http-client": "digitalcredentials/http-client#react-native",
"canonicalize": "^1.0.1",
"lru-cache": "^6.0.0",
"rdf-canonize": "^3.4.0"
"rdf-canonize": "digitalcredentials/rdf-canonize#react-native"
},
"devDependencies": {
"@babel/core": "^7.21.8",
Expand Down Expand Up @@ -122,5 +122,15 @@
"request": false,
"url": false,
"util": false
},
"react-native": {
"./lib/index.js": "./lib/jsonld.js",
"./lib/platform.js": "./lib/platform-browser.js",
"crypto": false,
"http": false,
"jsonld-request": false,
"request": false,
"url": false,
"util": false
}
}