react-native-purchases 9.1.0 → 9.2.1

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.
@@ -5,7 +5,7 @@
5
5
  * @returns {boolean} True if the app is running in an environment where native modules are not available
6
6
  * (like Expo Go or Web) or if the required native modules are missing.
7
7
  */
8
- export declare function shouldUsePreviewAPIMode(): boolean;
8
+ export declare function shouldUseBrowserMode(): boolean;
9
9
  declare global {
10
10
  var expo: {
11
11
  modules?: {
@@ -13,3 +13,7 @@ declare global {
13
13
  };
14
14
  };
15
15
  }
16
+ /**
17
+ * Detects if the app is running in Expo Go
18
+ */
19
+ export declare function isExpoGo(): boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.shouldUsePreviewAPIMode = void 0;
3
+ exports.isExpoGo = exports.shouldUseBrowserMode = void 0;
4
4
  var react_native_1 = require("react-native");
5
5
  /**
6
6
  * Detects if the app is running in an environment where native modules are not available
@@ -9,20 +9,20 @@ var react_native_1 = require("react-native");
9
9
  * @returns {boolean} True if the app is running in an environment where native modules are not available
10
10
  * (like Expo Go or Web) or if the required native modules are missing.
11
11
  */
12
- function shouldUsePreviewAPIMode() {
12
+ function shouldUseBrowserMode() {
13
13
  if (isExpoGo()) {
14
- console.log('Expo Go app detected. Using RevenueCat in Preview API Mode.');
14
+ console.log('Expo Go app detected. Using RevenueCat in Browser Mode.');
15
15
  return true;
16
16
  }
17
17
  else if (isWebPlatform()) {
18
- console.log('Web platform detected. Using RevenueCat in Preview API Mode.');
18
+ console.log('Web platform detected. Using RevenueCat in Browser Mode.');
19
19
  return true;
20
20
  }
21
21
  else {
22
22
  return false;
23
23
  }
24
24
  }
25
- exports.shouldUsePreviewAPIMode = shouldUsePreviewAPIMode;
25
+ exports.shouldUseBrowserMode = shouldUseBrowserMode;
26
26
  /**
27
27
  * Detects if the app is running in Expo Go
28
28
  */
@@ -33,6 +33,7 @@ function isExpoGo() {
33
33
  }
34
34
  return !!((_b = (_a = globalThis.expo) === null || _a === void 0 ? void 0 : _a.modules) === null || _b === void 0 ? void 0 : _b.ExpoGo);
35
35
  }
36
+ exports.isExpoGo = isExpoGo;
36
37
  /**
37
38
  * Detects if the app is running on web platform
38
39
  */
package/ios/RNPurchases.m CHANGED
@@ -657,7 +657,7 @@ readyForPromotedProduct:(RCStoreProduct *)product
657
657
  }
658
658
 
659
659
  - (NSString *)platformFlavorVersion {
660
- return @"9.1.0";
660
+ return @"9.2.1";
661
661
  }
662
662
 
663
663
  @end
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-purchases",
3
3
  "title": "React Native Purchases",
4
- "version": "9.1.0",
4
+ "version": "9.2.1",
5
5
  "description": "React Native in-app purchases and subscriptions made easy. Supports iOS and Android. ",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -108,9 +108,14 @@
108
108
  "cacheDirectory": ".jest/cache",
109
109
  "setupFiles": [
110
110
  "./scripts/setupJest.js"
111
+ ],
112
+ "transformIgnorePatterns": [
113
+ "node_modules/(?!(@revenuecat/purchases-js-hybrid-mappings|@react-native|react-native)/)"
111
114
  ]
112
115
  },
113
116
  "dependencies": {
114
- "@revenuecat/purchases-typescript-internal": "16.0.2"
117
+ "@revenuecat/purchases-js-hybrid-mappings": "16.2.1",
118
+ "@revenuecat/purchases-typescript-internal": "16.2.1",
119
+ "react-native-get-random-values": "^1.11.0"
115
120
  }
116
121
  }