Skip to content

Commit 190b7db

Browse files
Add react-native section to package.json
1 parent 1f34863 commit 190b7db

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# jsonld ChangeLog
22

3+
## 8.3.0 -
4+
### Added
5+
- Add `"react-native"` section to `package.json` and instructions on using
6+
React Native in the README.
7+
38
## 8.2.0 - 2023-05-19
49

510
### Changed

README.md

+11
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,17 @@ The `safe` options flag set to `true` enables this behavior:
364364
const expanded = await jsonld.expand(data, {safe: true});
365365
```
366366

367+
### Using with React Native
368+
369+
Using this library with React Native requires the
370+
[`data-integrity-rn`](https://github.com/digitalcredentials/data-integrity-rn)
371+
polyfill to be imported before this library:
372+
373+
```js
374+
import '@digitalcredentials/data-integrity-rn';
375+
import * as jsonld from 'jsonld';
376+
```
377+
367378
Tests
368379
-----
369380

package.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"lib/**/*.js"
3030
],
3131
"dependencies": {
32-
"@digitalbazaar/http-client": "^3.4.1",
32+
"@digitalbazaar/http-client": "digitalcredentials/http-client#react-native",
3333
"canonicalize": "^1.0.1",
3434
"lru-cache": "^6.0.0",
35-
"rdf-canonize": "^3.4.0"
35+
"rdf-canonize": "digitalcredentials/rdf-canonize#react-native"
3636
},
3737
"devDependencies": {
3838
"@babel/core": "^7.21.8",
@@ -122,5 +122,15 @@
122122
"request": false,
123123
"url": false,
124124
"util": false
125+
},
126+
"react-native": {
127+
"./lib/index.js": "./lib/jsonld.js",
128+
"./lib/platform.js": "./lib/platform-browser.js",
129+
"crypto": false,
130+
"http": false,
131+
"jsonld-request": false,
132+
"request": false,
133+
"url": false,
134+
"util": false
125135
}
126136
}

0 commit comments

Comments
 (0)