react-native-mmkv 2.4.3 → 2.4.4

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.
@@ -179,8 +179,8 @@ dependencies {
179
179
  // mostly a copy of https://github.com/software-mansion/react-native-reanimated/blob/master/android/build.gradle#L115
180
180
 
181
181
 
182
-
183
- def downloadsDir = new File("$buildDir/downloads")
182
+ def customDownloadsDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR")
183
+ def downloadsDir = customDownloadsDir ? new File(customDownloadsDir) : new File("$buildDir/downloads")
184
184
  def thirdPartyNdkDir = new File("$buildDir/third-party-ndk")
185
185
  def thirdPartyVersionsFile = new File("${androidSourcesDir.toString()}/ReactAndroid/gradle.properties")
186
186
  def thirdPartyVersions = new Properties()
@@ -357,8 +357,12 @@ def nativeBuildDependsOn(dependsOnTask, variant) {
357
357
 
358
358
  afterEvaluate {
359
359
  if (sourceBuild) {
360
- nativeBuildDependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck", "Debug")
361
- nativeBuildDependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck", "Rel")
360
+ if (REACT_NATIVE_VERSION < 68) {
361
+ nativeBuildDependsOn(":ReactAndroid:packageReactNdkLibsForBuck", null)
362
+ } else {
363
+ nativeBuildDependsOn(":ReactAndroid:packageReactNdkDebugLibsForBuck", "Debug")
364
+ nativeBuildDependsOn(":ReactAndroid:packageReactNdkReleaseLibsForBuck", "Rel")
365
+ }
362
366
  } else {
363
367
  nativeBuildDependsOn(extractAARHeaders, null)
364
368
  nativeBuildDependsOn(extractJNIFiles, null)
@@ -6,6 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.isJest = isJest;
7
7
 
8
8
  function isJest() {
9
+ if (global.process == null) {
10
+ // In a WebBrowser/Electron the `process` variable does not exist
11
+ return false;
12
+ }
13
+
9
14
  return process.env.JEST_WORKER_ID != null;
10
15
  }
11
16
  //# sourceMappingURL=PlatformChecker.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PlatformChecker.ts"],"names":["isJest","process","env","JEST_WORKER_ID"],"mappings":";;;;;;;AAAO,SAASA,MAAT,GAA2B;AAChC,SAAOC,OAAO,CAACC,GAAR,CAAYC,cAAZ,IAA8B,IAArC;AACD","sourcesContent":["export function isJest(): boolean {\n return process.env.JEST_WORKER_ID != null;\n}\n"]}
1
+ {"version":3,"sources":["PlatformChecker.ts"],"names":["isJest","global","process","env","JEST_WORKER_ID"],"mappings":";;;;;;;AAAO,SAASA,MAAT,GAA2B;AAChC,MAAIC,MAAM,CAACC,OAAP,IAAkB,IAAtB,EAA4B;AAC1B;AACA,WAAO,KAAP;AACD;;AACD,SAAOA,OAAO,CAACC,GAAR,CAAYC,cAAZ,IAA8B,IAArC;AACD","sourcesContent":["export function isJest(): boolean {\n if (global.process == null) {\n // In a WebBrowser/Electron the `process` variable does not exist\n return false;\n }\n return process.env.JEST_WORKER_ID != null;\n}\n"]}
@@ -1,4 +1,9 @@
1
1
  export function isJest() {
2
+ if (global.process == null) {
3
+ // In a WebBrowser/Electron the `process` variable does not exist
4
+ return false;
5
+ }
6
+
2
7
  return process.env.JEST_WORKER_ID != null;
3
8
  }
4
9
  //# sourceMappingURL=PlatformChecker.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["PlatformChecker.ts"],"names":["isJest","process","env","JEST_WORKER_ID"],"mappings":"AAAA,OAAO,SAASA,MAAT,GAA2B;AAChC,SAAOC,OAAO,CAACC,GAAR,CAAYC,cAAZ,IAA8B,IAArC;AACD","sourcesContent":["export function isJest(): boolean {\n return process.env.JEST_WORKER_ID != null;\n}\n"]}
1
+ {"version":3,"sources":["PlatformChecker.ts"],"names":["isJest","global","process","env","JEST_WORKER_ID"],"mappings":"AAAA,OAAO,SAASA,MAAT,GAA2B;AAChC,MAAIC,MAAM,CAACC,OAAP,IAAkB,IAAtB,EAA4B;AAC1B;AACA,WAAO,KAAP;AACD;;AACD,SAAOA,OAAO,CAACC,GAAR,CAAYC,cAAZ,IAA8B,IAArC;AACD","sourcesContent":["export function isJest(): boolean {\n if (global.process == null) {\n // In a WebBrowser/Electron the `process` variable does not exist\n return false;\n }\n return process.env.JEST_WORKER_ID != null;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-mmkv",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
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",
@@ -159,7 +159,7 @@
159
159
  [
160
160
  "typescript",
161
161
  {
162
- "project": "tsconfig.build.json"
162
+ "project": "tsconfig.json"
163
163
  }
164
164
  ]
165
165
  ]