Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## 9.0.0 - 2025-xx-xx

### Added
- Add minimal support for React Native.
- Add `react-native` section to `package.json`.
- Add instructions to `README.md`.

### Changed
- **BREAKING**: Drop support for Node.js < 18.
- **BREAKING**: Upgrade dependencies.
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,22 @@ 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 a polyfill such as
[`data-integrity-rn`](https://github.com/digitalcredentials/data-integrity-rn)
to be imported before this library:

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

The polyfill needs to provide the following globals:

* `crypto.subtle`
* `TextEncoder`

Tests
-----

Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,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
}
}
Loading