react-native-iap 12.10.5 → 12.10.6
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 +1 -18
- package/android/build.gradle +1 -1
- package/android/gradle.properties +1 -1
- package/lib/typescript/src/hooks/withIAPContext.d.ts +1 -1
- package/lib/typescript/src/hooks/withIAPContext.d.ts.map +1 -1
- package/lib/typescript/src/iap.d.ts +2 -2
- package/lib/typescript/src/iap.d.ts.map +1 -1
- package/package.json +16 -12
- package/src/iap.ts +2 -2
package/README.md
CHANGED
|
@@ -14,14 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
Read the [documentation](https://react-native-iap.dooboolab.com). See the [troubleshooting](https://react-native-iap.dooboolab.com/docs/guides/troubleshooting#common-issues) for the common issues to avoid.
|
|
16
16
|
|
|
17
|
-
## Our maintainers
|
|
18
|
-
|
|
19
|
-
Please [fund the project](https://opencollective.com/react-native-iap) if you are willing the maintainers to make the repository sustainable.
|
|
20
|
-
|
|
21
|
-
- [andresesfm](https://github.com/andresesfm)
|
|
22
|
-
|
|
23
|
-
> The fund goes to maintainers.
|
|
24
|
-
|
|
25
17
|
### Supporter
|
|
26
18
|
|
|
27
19
|
- [hyochan](https://github.com/hyochan)
|
|
@@ -36,7 +28,7 @@ Please [fund the project](https://opencollective.com/react-native-iap) if you ar
|
|
|
36
28
|
yarn add react-native-iap@next
|
|
37
29
|
```
|
|
38
30
|
|
|
39
|
-
- Version `10.0.0` is a
|
|
31
|
+
- Version `10.0.0` is a maintenance build. Many internal refactorings and clean up of the code. Special thanks to [jeremybarbet](https://github.com/jeremybarbet) for his contributions. Most notably all methods now take an object parameter instead of separate parameters. Please help us test
|
|
40
32
|
|
|
41
33
|
- Version `9.0.0` The module migrates android sdk to [play billing library v5](https://qonversion.io/blog/google-play-billing-library-5-0). Our core maintainers [andresesfm](https://github.com/andresesfm) and [jeremybarbet](https://github.com/jeremybarbet) worked hard on this.
|
|
42
34
|
|
|
@@ -58,15 +50,6 @@ Please [fund the project](https://opencollective.com/react-native-iap) if you ar
|
|
|
58
50
|
|
|
59
51
|
Follow [this guide](./IapExample/README.md) to get the example running.
|
|
60
52
|
|
|
61
|
-
## Our maintainers
|
|
62
|
-
|
|
63
|
-
Please [fund the project](https://opencollective.com/react-native-iap) if you are willing the maintainers to make the repository sustainable.
|
|
64
|
-
|
|
65
|
-
- [andresesfm](https://github.com/andresesfm)
|
|
66
|
-
- [jeremybarbet](https://github.com/jeremybarbet)
|
|
67
|
-
|
|
68
|
-
> The fund goes to maintainers.
|
|
69
|
-
|
|
70
53
|
## Acknowledgements
|
|
71
54
|
|
|
72
55
|
If you're looking for a module going further than `react-native-iap`, we recommend using [react-native-iaphub](https://github.com/iaphub/react-native-iaphub) which is taking care of everything from the client-side to the server-side.
|
package/android/build.gradle
CHANGED
|
@@ -161,7 +161,7 @@ dependencies {
|
|
|
161
161
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
|
|
162
162
|
|
|
163
163
|
testImplementation "junit:junit:4.13.2"
|
|
164
|
-
testImplementation "io.mockk:mockk:1.13.
|
|
164
|
+
testImplementation "io.mockk:mockk:1.13.5"
|
|
165
165
|
|
|
166
166
|
playImplementation "com.android.billingclient:billing-ktx:$playBillingSdkVersion"
|
|
167
167
|
playImplementation "com.google.android.gms:play-services-base:$playServicesVersion"
|
|
@@ -21,6 +21,6 @@ type IAPContextType = {
|
|
|
21
21
|
setCurrentPurchaseError: (currentPurchaseError: PurchaseError | undefined) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare function useIAPContext(): IAPContextType;
|
|
24
|
-
export declare function withIAPContext<T>(Component: React.ComponentType<T>): (props: T) => JSX.Element;
|
|
24
|
+
export declare function withIAPContext<T>(Component: React.ComponentType<T>): (props: T) => React.JSX.Element;
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=withIAPContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withIAPContext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B,aAAa,IAAI,cAAc,CAQ9C;AAED,wBAAgB,cAAc,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,WACzB,CAAC,uBAwH1C"}
|
|
@@ -323,7 +323,7 @@ const App = () => {
|
|
|
323
323
|
```
|
|
324
324
|
|
|
325
325
|
*/
|
|
326
|
-
export declare const requestPurchase: (request: RequestPurchase) => Promise<ProductPurchase | void>;
|
|
326
|
+
export declare const requestPurchase: (request: RequestPurchase) => Promise<ProductPurchase | ProductPurchase[] | void>;
|
|
327
327
|
/**
|
|
328
328
|
* Request a purchase for product. This will be received in `PurchaseUpdatedListener`.
|
|
329
329
|
* Request a purchase for a subscription.
|
|
@@ -401,7 +401,7 @@ const App = () => {
|
|
|
401
401
|
};
|
|
402
402
|
```
|
|
403
403
|
*/
|
|
404
|
-
export declare const requestSubscription: (request: RequestSubscription) => Promise<SubscriptionPurchase | null | void>;
|
|
404
|
+
export declare const requestSubscription: (request: RequestSubscription) => Promise<SubscriptionPurchase | SubscriptionPurchase[] | null | void>;
|
|
405
405
|
/**
|
|
406
406
|
* Finish Transaction (both platforms)
|
|
407
407
|
* Abstracts Finish Transaction
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iap.d.ts","sourceRoot":"","sources":["../../../src/iap.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAC;AAU9C,OAAO,EAOL,cAAc,EAIf,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,OAAO,EACP,eAAe,EAEf,QAAQ,EACR,cAAc,EAEd,eAAe,EACf,mBAAmB,EACnB,YAAY,EAKZ,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAC,UAAU,EAAE,SA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N;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiFG;AACH,eAAO,MAAM,qBAAqB;;;;MAQzB,QAAQ,QAAQ,EAAE,CAmCtB,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,eAAO,MAAM,eAAe,YACjB,eAAe,KACvB,QAAQ,eAAe,GAAG,eAAe,EAAE,GAAG,IAAI,CA2EhD,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH,eAAO,MAAM,mBAAmB,YACrB,mBAAmB,KAC3B,QAAQ,oBAAoB,GAAG,oBAAoB,EAAE,GAAG,IAAI,GAAG,IAAI,CAoFjE,CAAC;AAEN;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,iBAAiB;cAKlB,QAAQ;;;MAGhB,QAAQ,cAAc,GAAG,OAAO,CA0CnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;MAMhC,QAAQ,IAAI,CAqBf,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-iap",
|
|
3
|
-
"version": "12.10.
|
|
3
|
+
"version": "12.10.6",
|
|
4
4
|
"description": "React Native In App Purchase Module.",
|
|
5
5
|
"repository": "https://github.com/dooboolab-community/react-native-iap",
|
|
6
6
|
"author": "dooboolab <support@dooboolab.com> (https://github.com/dooboolab-community)",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"registry": "https://registry.npmjs.org/"
|
|
14
14
|
},
|
|
15
15
|
"contributors": [
|
|
16
|
+
{
|
|
17
|
+
"name": "hyochan",
|
|
18
|
+
"url": "https://github.com/hyochan"
|
|
19
|
+
},
|
|
16
20
|
{
|
|
17
21
|
"name": "Andres Aguilar",
|
|
18
22
|
"url": "https://github.com/andresesfm"
|
|
@@ -75,45 +79,45 @@
|
|
|
75
79
|
"lint:plugin": "eslint plugin/src/*"
|
|
76
80
|
},
|
|
77
81
|
"devDependencies": {
|
|
78
|
-
"@babel/eslint-parser": "7.21.
|
|
82
|
+
"@babel/eslint-parser": "7.21.8",
|
|
79
83
|
"@firmnav/eslint-github-actions-formatter": "1.0.1",
|
|
80
84
|
"@jeremybarbet/apple-api-types": "1.4.0",
|
|
81
85
|
"@jeremybarbet/google-api-types": "1.4.0",
|
|
82
86
|
"@react-native-community/eslint-config": "3.2.0",
|
|
83
87
|
"@release-it/conventional-changelog": "5.1.1",
|
|
84
88
|
"@testing-library/jest-native": "5.4.2",
|
|
85
|
-
"@testing-library/react-native": "12.
|
|
86
|
-
"@types/jest": "29.5.
|
|
89
|
+
"@testing-library/react-native": "12.1.2",
|
|
90
|
+
"@types/jest": "29.5.1",
|
|
87
91
|
"@types/react": "*",
|
|
88
92
|
"@types/react-native": "*",
|
|
89
93
|
"@typescript-eslint/eslint-plugin": "5.57.1",
|
|
90
94
|
"@typescript-eslint/parser": "5.57.1",
|
|
91
95
|
"babel-jest": "29.5.0",
|
|
92
|
-
"eslint": "8.
|
|
96
|
+
"eslint": "8.43.0",
|
|
93
97
|
"eslint-config-prettier": "8.8.0",
|
|
94
|
-
"eslint-plugin-jest": "27.2.
|
|
98
|
+
"eslint-plugin-jest": "27.2.2",
|
|
95
99
|
"eslint-plugin-prettier": "4.2.1",
|
|
96
100
|
"eslint-plugin-simple-import-sort": "10.0.0",
|
|
97
101
|
"expo-module-scripts": "^3.0.7",
|
|
98
102
|
"jest": "29.5.0",
|
|
99
103
|
"monolinter": "1.0.4",
|
|
100
104
|
"pod-install": "0.1.38",
|
|
101
|
-
"prettier": "2.8.
|
|
105
|
+
"prettier": "2.8.8",
|
|
102
106
|
"react": "17.0.2",
|
|
103
107
|
"react-native": "0.68.2",
|
|
104
108
|
"react-native-builder-bob": "0.20.4",
|
|
105
|
-
"release-it": "15.
|
|
106
|
-
"ts-jest": "29.0
|
|
107
|
-
"typedoc": "^0.
|
|
109
|
+
"release-it": "15.10.3",
|
|
110
|
+
"ts-jest": "29.1.0",
|
|
111
|
+
"typedoc": "^0.24.0",
|
|
108
112
|
"typedoc-plugin-markdown": "^3.14.0",
|
|
109
|
-
"typescript": "5.0.
|
|
113
|
+
"typescript": "5.0.4"
|
|
110
114
|
},
|
|
111
115
|
"peerDependencies": {
|
|
112
116
|
"react": ">=16.13.1",
|
|
113
117
|
"react-native": ">=0.65.1"
|
|
114
118
|
},
|
|
115
119
|
"resolutions": {
|
|
116
|
-
"@types/react": "17.0.
|
|
120
|
+
"@types/react": "17.0.59",
|
|
117
121
|
"@types/react-native": "0.68.2"
|
|
118
122
|
},
|
|
119
123
|
"dependencies": {
|
package/src/iap.ts
CHANGED
|
@@ -576,7 +576,7 @@ const App = () => {
|
|
|
576
576
|
|
|
577
577
|
export const requestPurchase = (
|
|
578
578
|
request: RequestPurchase,
|
|
579
|
-
): Promise<ProductPurchase | void> =>
|
|
579
|
+
): Promise<ProductPurchase | ProductPurchase[] | void> =>
|
|
580
580
|
(
|
|
581
581
|
Platform.select({
|
|
582
582
|
ios: async () => {
|
|
@@ -732,7 +732,7 @@ const App = () => {
|
|
|
732
732
|
*/
|
|
733
733
|
export const requestSubscription = (
|
|
734
734
|
request: RequestSubscription,
|
|
735
|
-
): Promise<SubscriptionPurchase | null | void> =>
|
|
735
|
+
): Promise<SubscriptionPurchase | SubscriptionPurchase[] | null | void> =>
|
|
736
736
|
(
|
|
737
737
|
Platform.select({
|
|
738
738
|
ios: async () => {
|