Skip to content

Commit

Permalink
Add react-native section to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Aug 11, 2023
1 parent 1f34863 commit 0e3187a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# jsonld ChangeLog

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

## 8.2.0 - 2023-05-19

### Changed
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
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@digitalbazaar/http-client": "^3.4.1",
"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
}
}

0 comments on commit 0e3187a

Please sign in to comment.