Skip to content

Commit c2b32fc

Browse files
authored
Add react native package exports (#3)
1 parent 53d1362 commit c2b32fc

File tree

4 files changed

+196
-171
lines changed

4 files changed

+196
-171
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## 0.2.1
4+
5+
- Add React Native package exports
6+
37
## 0.2.0
48

59
- Add xchacha20-poly1305 support

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77

88
Node/Pure JavaScript symmetric ciphers adapter.
99

10-
On browsers (or deno), it'll use [`@noble/ciphers`](https://github.com/paulmillr/noble-ciphers)'s implementation for compatibility.
10+
On browsers (or React Native, deno), it'll use [`@noble/ciphers`](https://github.com/paulmillr/noble-ciphers)'s implementation for compatibility.
1111

1212
On node (or bun), it'll use [`node:crypto`](https://nodejs.org/api/crypto.html#cryptocreatecipherivalgorithm-key-iv-options)'s implementation for efficiency.
1313

1414
> [!NOTE]
15+
> You may need to polyfill [`crypto.getRandomValues`](https://github.com/LinusU/react-native-get-random-values) for React Native.
16+
>
1517
> There are some limitations, see [Known limitations](#known-limitations) below.
1618
1719
Check the [example](./example/) folder for bun/deno usage.

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"type": "git",
1212
"url": "git+https://github.com/ecies/js-ciphers.git"
1313
},
14-
"version": "0.2.0",
14+
"version": "0.2.1",
1515
"engines": {
1616
"node": ">=16",
1717
"bun": ">=1",
@@ -33,13 +33,15 @@
3333
"./aes": {
3434
"types": "./dist/aes/node.d.ts",
3535
"browser": "./dist/aes/noble.js",
36+
"react-native": "./dist/aes/noble.js",
3637
"deno": "./dist/aes/noble.js",
3738
"bun": "./dist/aes/node.js",
3839
"default": "./dist/aes/node.js"
3940
},
4041
"./chacha": {
4142
"types": "./dist/chacha/node.d.ts",
4243
"browser": "./dist/chacha/noble.js",
44+
"react-native": "./dist/chacha/noble.js",
4345
"deno": "./dist/chacha/noble.js",
4446
"bun": "./dist/chacha/noble.js",
4547
"default": "./dist/chacha/node.js"
@@ -53,10 +55,10 @@
5355
"@noble/ciphers": "^1.0.0"
5456
},
5557
"devDependencies": {
56-
"@types/node": "^22.7.6",
57-
"@vitest/coverage-v8": "^2.1.3",
58+
"@types/node": "^22.8.4",
59+
"@vitest/coverage-v8": "^2.1.4",
5860
"typescript": "^5.6.3",
59-
"vitest": "^2.1.3"
61+
"vitest": "^2.1.4"
6062
},
61-
"packageManager": "[email protected].2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
63+
"packageManager": "[email protected].3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee"
6264
}

0 commit comments

Comments
 (0)