react-native-mmkv 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -187,6 +187,7 @@ A mocked MMKV instance is automatically used when testing with Jest, so you will
187
187
  * [Using MMKV with mobx-persist-storage](./docs/WRAPPER_MOBX.md)
188
188
  * [Using MMKV with mobx-persist](./docs/WRAPPER_MOBXPERSIST.md)
189
189
  * [Using MMKV with zustand persist-middleware](./docs/WRAPPER_ZUSTAND_PERSIST_MIDDLEWARE.md)
190
+ * [Using MMKV with jotai](./docs/WRAPPER_JOTAI.md)
190
191
  * [How is this library different from **react-native-mmkv-storage**?](https://github.com/mrousavy/react-native-mmkv/issues/100#issuecomment-886477361)
191
192
 
192
193
  ## Limitations
@@ -160,7 +160,17 @@ dependencies {
160
160
  extractJNI("com.facebook.fbjni:fbjni:+")
161
161
 
162
162
  if (!sourceBuild) {
163
- def rnAAR = fileTree("${defaultDir.toString()}").matching({ it.include "**/**/*.aar" }).singleFile
163
+ def buildType = "debug"
164
+ tasks.all({ task ->
165
+ if (task.name == "buildCMakeRelease") {
166
+ buildType = "release"
167
+ }
168
+ })
169
+ def rnAarMatcher = "**/react-native/**/*${buildType}.aar"
170
+ if (REACT_NATIVE_VERSION < 69) {
171
+ rnAarMatcher = "**/**/*.aar"
172
+ }
173
+ def rnAAR = fileTree("${defaultDir.toString()}").matching({ it.include rnAarMatcher }).singleFile
164
174
  extractJNI(files(rnAAR))
165
175
  }
166
176
  }
@@ -193,7 +203,12 @@ task createNativeDepsDirectories {
193
203
  }
194
204
 
195
205
  task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
196
- src("https://github.com/react-native-community/boost-for-react-native/releases/download/v${BOOST_VERSION.replace("_", ".")}-0/boost_${BOOST_VERSION}.tar.gz")
206
+ def transformedVersion = BOOST_VERSION.replace("_", ".")
207
+ def srcUrl = "https://boostorg.jfrog.io/artifactory/main/release/${transformedVersion}/source/boost_${BOOST_VERSION}.tar.gz"
208
+ if (REACT_NATIVE_VERSION < 69) {
209
+ srcUrl = "https://github.com/react-native-community/boost-for-react-native/releases/download/v${transformedVersion}-0/boost_${BOOST_VERSION}.tar.gz"
210
+ }
211
+ src(srcUrl)
197
212
  onlyIfNewer(true)
198
213
  overwrite(false)
199
214
  dest(boost_file)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mmkv",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "The fastest key/value storage for React Native. ~30x faster than AsyncStorage! Works on Android, iOS and Web.",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -30,6 +30,7 @@
30
30
  "lint-ci": "yarn lint -f ./node_modules/@firmnav/eslint-github-actions-formatter/dist/formatter.js",
31
31
  "prepare": "git submodule update --init --recursive",
32
32
  "build": "bob build",
33
+ "prepack": "bob build",
33
34
  "update-submodule": "git submodule update --remote --merge",
34
35
  "release": "release-it",
35
36
  "example": "yarn --cwd example",