@primer-io/react-native 2.22.0 → 2.24.0
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/android/build.gradle +20 -2
- package/android/config/coverage-scripts/kover.gradle +26 -0
- package/android/src/main/java/com/primerioreactnative/components/manager/klarna/PrimerRNHeadlessUniversalCheckoutKlarnaComponent.kt +3 -5
- package/android/src/main/java/com/primerioreactnative/datamodels/PrimerSettingsRN.kt +62 -0
- package/android/src/main/java/com/primerioreactnative/extensions/PrimerUIOptionsRN.kt +1 -2
- package/android/src/test/java/com/primerioreactnative/utils/ErrorHelperTest.kt +24 -0
- package/ios/Sources/DataModels/PrimerThemeRN.swift +42 -9
- package/ios/Sources/Headless Universal Checkout/Managers/Klarna/PrimerRNHeadlessUniversalCheckoutKlarnaComponent.swift +13 -2
- package/ios/Sources/Headless Universal Checkout/Managers/RNTRedirectManager.swift +0 -1
- package/ios/Sources/Headless Universal Checkout/RNTPrimerHeadlessUniversalCheckout.swift +5 -5
- package/ios/Sources/RNTPrimer.swift +12 -8
- package/ios/Sources/version.swift +1 -1
- package/package.json +4 -9
- package/primer-io-react-native.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
// Buildscript is evaluated before everything else so we can't use getExtOrDefault
|
|
3
3
|
def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['ReactNative_kotlinVersion']
|
|
4
|
-
|
|
4
|
+
def kover_version = '0.7.6'
|
|
5
5
|
repositories {
|
|
6
6
|
google()
|
|
7
7
|
mavenCentral()
|
|
@@ -13,12 +13,14 @@ buildscript {
|
|
|
13
13
|
// noinspection DifferentKotlinGradleVersion
|
|
14
14
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
15
15
|
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
|
16
|
+
classpath "org.jetbrains.kotlinx:kover-gradle-plugin:$kover_version"
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
apply plugin: 'com.android.library'
|
|
20
21
|
apply plugin: 'kotlin-android'
|
|
21
22
|
apply plugin: 'kotlinx-serialization'
|
|
23
|
+
apply from: "./config/coverage-scripts/kover.gradle"
|
|
22
24
|
|
|
23
25
|
def getExtOrDefault(name) {
|
|
24
26
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['ReactNative_' + name]
|
|
@@ -29,12 +31,15 @@ def getExtOrIntegerDefault(name) {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
android {
|
|
34
|
+
group 'io.primer'
|
|
32
35
|
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
|
|
33
36
|
buildToolsVersion getExtOrDefault('buildToolsVersion')
|
|
34
37
|
defaultConfig {
|
|
35
38
|
minSdkVersion 21
|
|
36
39
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
37
40
|
|
|
41
|
+
testInstrumentationRunnerArguments runnerBuilder: 'de.mannodermaus.junit5.AndroidJUnit5Builder'
|
|
42
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
buildTypes {
|
|
@@ -56,6 +61,13 @@ android {
|
|
|
56
61
|
kotlinOptions {
|
|
57
62
|
freeCompilerArgs += '-Xjvm-default=all'
|
|
58
63
|
}
|
|
64
|
+
testOptions {
|
|
65
|
+
execution = 'ANDROIDX_TEST_ORCHESTRATOR'
|
|
66
|
+
|
|
67
|
+
unitTests.all {
|
|
68
|
+
useJUnitPlatform()
|
|
69
|
+
}
|
|
70
|
+
}
|
|
59
71
|
}
|
|
60
72
|
|
|
61
73
|
repositories {
|
|
@@ -136,5 +148,11 @@ dependencies {
|
|
|
136
148
|
api 'com.facebook.react:react-native:+'
|
|
137
149
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
138
150
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
|
|
139
|
-
implementation 'io.primer:android:2.27.
|
|
151
|
+
implementation 'io.primer:android:2.27.3'
|
|
152
|
+
|
|
153
|
+
testImplementation 'io.mockk:mockk:1.13.10'
|
|
154
|
+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
|
|
155
|
+
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.2'
|
|
156
|
+
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.10.2'
|
|
157
|
+
testImplementation 'de.mannodermaus.junit5:android-test-runner:1.3.0'
|
|
140
158
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
apply plugin: 'org.jetbrains.kotlinx.kover'
|
|
2
|
+
|
|
3
|
+
subprojects {
|
|
4
|
+
koverReport {
|
|
5
|
+
filters {
|
|
6
|
+
excludes {
|
|
7
|
+
packages(
|
|
8
|
+
'**.example.**',
|
|
9
|
+
)
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
androidReports("release") {
|
|
13
|
+
verify {
|
|
14
|
+
rule {
|
|
15
|
+
// add lower bound for percentage of covered lines
|
|
16
|
+
minBound(80)
|
|
17
|
+
|
|
18
|
+
// add upper bound for percentage of covered lines
|
|
19
|
+
maxBound(100)
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
tasks["koverXmlReportRelease"].dependsOn "testReleaseUnitTest"
|
|
26
|
+
}
|
|
@@ -259,12 +259,12 @@ class PrimerRNHeadlessUniversalCheckoutKlarnaComponent(
|
|
|
259
259
|
val returnIntentUrl = readableMap.getString("returnIntentUrl")
|
|
260
260
|
val paymentCategory = readableMap.getMap("paymentCategory") as ReadableMap
|
|
261
261
|
val json = Json { ignoreUnknownKeys = true }
|
|
262
|
-
val
|
|
262
|
+
val klarnaPaymentCategoryRN =
|
|
263
263
|
json.decodeFromString<KlarnaPaymentCategoryRN>(
|
|
264
264
|
Json.encodeToString(paymentCategory.toHashMap() as Map<String, String>)
|
|
265
265
|
)
|
|
266
266
|
|
|
267
|
-
val activity =
|
|
267
|
+
val activity = currentActivity
|
|
268
268
|
|
|
269
269
|
if (activity == null) {
|
|
270
270
|
val exception = ErrorTypeRN.NativeBridgeFailed errorTo MISSING_ACTIVITY_ERROR
|
|
@@ -277,7 +277,7 @@ class PrimerRNHeadlessUniversalCheckoutKlarnaComponent(
|
|
|
277
277
|
KlarnaPaymentCollectableData.PaymentOptions(
|
|
278
278
|
context = activity,
|
|
279
279
|
returnIntentUrl = requireNotNull(returnIntentUrl),
|
|
280
|
-
paymentCategory =
|
|
280
|
+
paymentCategory = klarnaPaymentCategoryRN.toKlarnaPaymentCategory()
|
|
281
281
|
)
|
|
282
282
|
)
|
|
283
283
|
promise.resolve(null)
|
|
@@ -327,8 +327,6 @@ class PrimerRNHeadlessUniversalCheckoutKlarnaComponent(
|
|
|
327
327
|
Could not retrieve running activity from context.
|
|
328
328
|
"""
|
|
329
329
|
|
|
330
|
-
val TAG = PrimerRNHeadlessUniversalCheckoutKlarnaComponent::class.simpleName
|
|
331
|
-
|
|
332
330
|
val json by lazy { Json { encodeDefaults = true } }
|
|
333
331
|
}
|
|
334
332
|
}
|
|
@@ -7,6 +7,7 @@ import com.primerioreactnative.extensions.toPrimerUIOptions
|
|
|
7
7
|
import io.primer.android.data.settings.GooglePayButtonStyle
|
|
8
8
|
import io.primer.android.data.settings.PrimerPaymentHandling
|
|
9
9
|
import io.primer.android.data.settings.PrimerSettings
|
|
10
|
+
import io.primer.android.ui.settings.PrimerTheme
|
|
10
11
|
import kotlinx.serialization.SerialName
|
|
11
12
|
import kotlinx.serialization.Serializable
|
|
12
13
|
|
|
@@ -44,8 +45,69 @@ data class PrimerUIOptionsRN(
|
|
|
44
45
|
var isInitScreenEnabled: Boolean = true,
|
|
45
46
|
var isSuccessScreenEnabled: Boolean = true,
|
|
46
47
|
var isErrorScreenEnabled: Boolean = true,
|
|
48
|
+
var theme: PrimerThemeRN = PrimerThemeRN()
|
|
47
49
|
)
|
|
48
50
|
|
|
51
|
+
@Serializable
|
|
52
|
+
data class PrimerThemeRN(
|
|
53
|
+
val colors: ColorThemeRN? = null,
|
|
54
|
+
val darkModeColors: ColorThemeRN? = null
|
|
55
|
+
) {
|
|
56
|
+
fun toPrimerTheme(): PrimerTheme {
|
|
57
|
+
val isDarkMode = false
|
|
58
|
+
|
|
59
|
+
return PrimerTheme.buildWithDynamicValues(
|
|
60
|
+
isDarkMode = isDarkMode,
|
|
61
|
+
mainColor = when {
|
|
62
|
+
isDarkMode -> darkModeColors?.mainColor?.toHexStrColor()
|
|
63
|
+
else -> colors?.mainColor?.toHexStrColor()
|
|
64
|
+
},
|
|
65
|
+
backgroundColor = when {
|
|
66
|
+
isDarkMode -> darkModeColors?.background?.toHexStrColor()
|
|
67
|
+
else -> colors?.background?.toHexStrColor()
|
|
68
|
+
},
|
|
69
|
+
disabledColor = when {
|
|
70
|
+
isDarkMode -> darkModeColors?.disabled?.toHexStrColor()
|
|
71
|
+
else -> colors?.disabled?.toHexStrColor()
|
|
72
|
+
},
|
|
73
|
+
textColor = when {
|
|
74
|
+
isDarkMode -> darkModeColors?.text?.toHexStrColor()
|
|
75
|
+
else -> colors?.text?.toHexStrColor()
|
|
76
|
+
},
|
|
77
|
+
bordersColor = when {
|
|
78
|
+
isDarkMode -> darkModeColors?.borders?.toHexStrColor()
|
|
79
|
+
else -> colors?.borders?.toHexStrColor()
|
|
80
|
+
},
|
|
81
|
+
errorColor = when {
|
|
82
|
+
isDarkMode -> darkModeColors?.error?.toHexStrColor()
|
|
83
|
+
else -> colors?.error?.toHexStrColor()
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@Serializable
|
|
90
|
+
data class ColorThemeRN(
|
|
91
|
+
val mainColor: ColorRN? = null,
|
|
92
|
+
val contrastingColor: ColorRN? = null,
|
|
93
|
+
val background: ColorRN? = null,
|
|
94
|
+
val text: ColorRN? = null,
|
|
95
|
+
val contrastingText: ColorRN? = null,
|
|
96
|
+
val borders: ColorRN? = null, // or main color
|
|
97
|
+
val disabled: ColorRN? = null,
|
|
98
|
+
val error: ColorRN? = null,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
@Serializable
|
|
102
|
+
data class ColorRN(
|
|
103
|
+
val alpha: Int = 0,
|
|
104
|
+
val red: Int = 0,
|
|
105
|
+
val green: Int = 0,
|
|
106
|
+
val blue: Int = 0
|
|
107
|
+
) {
|
|
108
|
+
fun toHexStrColor() = String.format("#%02X%02X%02X%02X", alpha, red, green, blue)
|
|
109
|
+
}
|
|
110
|
+
|
|
49
111
|
@Serializable
|
|
50
112
|
data class PrimerDebugOptionsRN(val is3DSSanityCheckEnabled: Boolean = true)
|
|
51
113
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
package com.primerioreactnative.extensions
|
|
2
2
|
|
|
3
3
|
import com.primerioreactnative.datamodels.PrimerUIOptionsRN
|
|
4
|
-
import io.primer.android.ui.settings.PrimerTheme
|
|
5
4
|
import io.primer.android.ui.settings.PrimerUIOptions
|
|
6
5
|
|
|
7
6
|
internal fun PrimerUIOptionsRN.toPrimerUIOptions() =
|
|
@@ -9,5 +8,5 @@ internal fun PrimerUIOptionsRN.toPrimerUIOptions() =
|
|
|
9
8
|
isInitScreenEnabled,
|
|
10
9
|
isSuccessScreenEnabled,
|
|
11
10
|
isErrorScreenEnabled,
|
|
12
|
-
|
|
11
|
+
theme.toPrimerTheme()
|
|
13
12
|
)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
package com.primerioreactnative.utils
|
|
2
|
+
|
|
3
|
+
import com.primerioreactnative.datamodels.ErrorTypeRN
|
|
4
|
+
import org.junit.jupiter.api.Assertions.assertEquals
|
|
5
|
+
import org.junit.jupiter.api.Test
|
|
6
|
+
|
|
7
|
+
internal class ErrorHelperTest {
|
|
8
|
+
|
|
9
|
+
// Create a mock ErrorTypeRN instance
|
|
10
|
+
private val errorType = ErrorTypeRN.InvalidVaultedPaymentMethodId
|
|
11
|
+
|
|
12
|
+
@Test
|
|
13
|
+
fun `errorTo should create PrimerErrorRN with correct properties`() {
|
|
14
|
+
// Mock message
|
|
15
|
+
val errorMessage = "This is an error message"
|
|
16
|
+
|
|
17
|
+
// Call the infix function
|
|
18
|
+
val primerError = errorType errorTo errorMessage
|
|
19
|
+
|
|
20
|
+
// Verify the errorId and message are set correctly in the PrimerErrorRN object
|
|
21
|
+
assertEquals(errorType.errorId, primerError.errorId)
|
|
22
|
+
assertEquals(errorMessage, primerError.description)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -7,19 +7,52 @@ struct PrimerThemeRN: Decodable {
|
|
|
7
7
|
|
|
8
8
|
extension PrimerThemeRN {
|
|
9
9
|
func asPrimerTheme() -> PrimerTheme {
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
let isDarkMode = UITraitCollection.current.userInterfaceStyle == .dark
|
|
12
|
+
|
|
13
|
+
let _colors = isDarkMode ? darkModeColors : colors
|
|
14
|
+
|
|
15
|
+
guard let colors = _colors else {
|
|
16
|
+
return PrimerTheme()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let data = PrimerThemeData()
|
|
20
|
+
data.colors = PrimerThemeData.ColorSwatch()
|
|
21
|
+
|
|
22
|
+
if let mainColor = colors.text?.uiColor ?? colors.mainColor?.uiColor {
|
|
23
|
+
data.colors.primary = mainColor
|
|
24
|
+
data.colors.dark = mainColor
|
|
25
|
+
data.colors.gray = mainColor
|
|
26
|
+
}
|
|
27
|
+
if let disabledColor = colors.disabled?.uiColor {
|
|
28
|
+
data.colors.lightGray = disabledColor
|
|
29
|
+
data.buttons.main.disabledColor = disabledColor
|
|
30
|
+
}
|
|
31
|
+
if let errorColor = colors.error?.uiColor {
|
|
32
|
+
data.colors.error = errorColor
|
|
33
|
+
}
|
|
34
|
+
if let borderColor = colors.borders?.uiColor {
|
|
35
|
+
data.buttons.main.border.defaultColor = borderColor
|
|
36
|
+
data.input.border.defaultColor = borderColor
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if let backgroundColor = colors.background?.uiColor {
|
|
40
|
+
data.view.backgroundColor = backgroundColor
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return PrimerTheme(with: data)
|
|
11
44
|
}
|
|
12
45
|
}
|
|
13
46
|
|
|
14
47
|
struct ColorThemeRN: Decodable {
|
|
15
|
-
let mainColor: ColorRN?
|
|
16
|
-
let contrastingColor: ColorRN?
|
|
17
|
-
let background: ColorRN?
|
|
18
|
-
let text: ColorRN?
|
|
19
|
-
let contrastingText: ColorRN?
|
|
20
|
-
let borders: ColorRN?
|
|
21
|
-
let disabled: ColorRN?
|
|
22
|
-
let error: ColorRN?
|
|
48
|
+
let mainColor: ColorRN? // primary
|
|
49
|
+
let contrastingColor: ColorRN? // ???
|
|
50
|
+
let background: ColorRN? // light
|
|
51
|
+
let text: ColorRN? // primary
|
|
52
|
+
let contrastingText: ColorRN? // ??
|
|
53
|
+
let borders: ColorRN? // ??
|
|
54
|
+
let disabled: ColorRN? // lightGray
|
|
55
|
+
let error: ColorRN? // error
|
|
23
56
|
}
|
|
24
57
|
|
|
25
58
|
extension ColorThemeRN {
|
|
@@ -12,7 +12,9 @@ import PrimerSDK
|
|
|
12
12
|
@objc(RNTPrimerHeadlessUniversalCheckoutKlarnaComponent)
|
|
13
13
|
class RNTPrimerHeadlessUniversalCheckoutKlarnaComponent: RCTEventEmitter {
|
|
14
14
|
|
|
15
|
+
#if canImport(PrimerKlarnaSDK)
|
|
15
16
|
private var klarnaManager: PrimerHeadlessUniversalCheckout.KlarnaManager = PrimerHeadlessUniversalCheckout.KlarnaManager()
|
|
17
|
+
#endif
|
|
16
18
|
var klarnaComponent: (any KlarnaComponent)?
|
|
17
19
|
var clientToken: String?
|
|
18
20
|
|
|
@@ -46,12 +48,21 @@ class RNTPrimerHeadlessUniversalCheckoutKlarnaComponent: RCTEventEmitter {
|
|
|
46
48
|
recoverySuggestion: "'intent' can be 'CHECKOUT' or 'VAULT'.")
|
|
47
49
|
throw err
|
|
48
50
|
}
|
|
49
|
-
|
|
51
|
+
#if canImport(PrimerKlarnaSDK)
|
|
50
52
|
klarnaComponent = try klarnaManager.provideKlarnaComponent(with: sessionIntent)
|
|
51
53
|
klarnaComponent?.stepDelegate = self
|
|
52
54
|
klarnaComponent?.errorDelegate = self
|
|
53
55
|
klarnaComponent?.validationDelegate = self
|
|
54
|
-
|
|
56
|
+
#else
|
|
57
|
+
let err = RNTNativeError(
|
|
58
|
+
errorId: "native-ios",
|
|
59
|
+
errorDescription: "PrimerKlarnaSDK missing",
|
|
60
|
+
recoverySuggestion: "Check if PrimerKlarnaSDK is included in your Podfile")
|
|
61
|
+
|
|
62
|
+
throw err
|
|
63
|
+
#endif
|
|
64
|
+
|
|
65
|
+
|
|
55
66
|
resolver(nil)
|
|
56
67
|
} catch {
|
|
57
68
|
rejecter(error.rnError["errorId"]!, error.rnError["description"], error)
|
|
@@ -63,11 +63,11 @@ enum PrimerHeadlessUniversalCheckoutEvents: Int, CaseIterable {
|
|
|
63
63
|
@objc(PrimerHeadlessUniversalCheckout)
|
|
64
64
|
class RNTPrimerHeadlessUniversalCheckout: RCTEventEmitter {
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
var settings: PrimerSettings?
|
|
67
|
+
var primerWillCreatePaymentWithDataDecisionHandler: ((_ errorMessage: String?) -> Void)?
|
|
68
|
+
var primerDidTokenizePaymentMethodDecisionHandler: ((_ resumeToken: String?, _ errorMessage: String?) -> Void)?
|
|
69
|
+
var primerDidResumeWithDecisionHandler: ((_ resumeToken: String?, _ errorMessage: String?) -> Void)?
|
|
70
|
+
var implementedRNCallbacks: ImplementedRNCallbacks?
|
|
71
71
|
|
|
72
72
|
override class func requiresMainQueueSetup() -> Bool {
|
|
73
73
|
return true
|
|
@@ -55,11 +55,11 @@ enum PrimerEvents: Int, CaseIterable {
|
|
|
55
55
|
@objc(NativePrimer)
|
|
56
56
|
class RNTPrimer: RCTEventEmitter {
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
58
|
+
var primerWillCreatePaymentWithDataDecisionHandler: ((_ errorMessage: String?) -> Void)?
|
|
59
|
+
var primerDidTokenizePaymentMethodDecisionHandler: ((_ resumeToken: String?, _ errorMessage: String?) -> Void)?
|
|
60
|
+
var primerDidResumeWithDecisionHandler: ((_ resumeToken: String?, _ errorMessage: String?) -> Void)?
|
|
61
|
+
var primerDidFailWithErrorDecisionHandler: ((_ errorMessage: String) -> Void)?
|
|
62
|
+
var implementedRNCallbacks: ImplementedRNCallbacks?
|
|
63
63
|
|
|
64
64
|
// MARK: - INITIALIZATION & REACT NATIVE SUPPORT
|
|
65
65
|
|
|
@@ -291,13 +291,17 @@ class RNTPrimer: RCTEventEmitter {
|
|
|
291
291
|
var body: [String: Any] = ["error": error.rnError]
|
|
292
292
|
if let checkoutData = checkoutData,
|
|
293
293
|
let data = try? JSONEncoder().encode(checkoutData),
|
|
294
|
-
let json = try? JSONSerialization.jsonObject(with: data){
|
|
294
|
+
let json = try? JSONSerialization.jsonObject(with: data) {
|
|
295
295
|
body["checkoutData"] = json
|
|
296
296
|
}
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
if self.bridge != nil {
|
|
298
|
+
self.sendEvent(withName: PrimerEvents.onError.stringValue, body: body)
|
|
299
|
+
} else {
|
|
300
|
+
print("Bridge is not set")
|
|
301
|
+
}
|
|
299
302
|
}
|
|
300
303
|
}
|
|
304
|
+
|
|
301
305
|
}
|
|
302
306
|
|
|
303
307
|
// MARK: - PRIMER DELEGATE
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// swiftlint:disable:next identifier_name
|
|
2
|
-
public let PrimerReactNativeSDKVersion = "2.
|
|
2
|
+
public let PrimerReactNativeSDKVersion = "2.24.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer-io/react-native",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.24.0",
|
|
4
4
|
"description": "Primer SDK for RN",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -58,11 +58,12 @@
|
|
|
58
58
|
"eslint-config-prettier": "^7.0.0",
|
|
59
59
|
"eslint-plugin-prettier": "^3.1.3",
|
|
60
60
|
"husky": "^4.2.5",
|
|
61
|
-
"jest": "^
|
|
61
|
+
"jest": "^29.7.0",
|
|
62
62
|
"pod-install": "^0.1.0",
|
|
63
63
|
"prettier": "^2.4.1",
|
|
64
64
|
"react-native-builder-bob": "^0.20.1",
|
|
65
65
|
"release-it": "^15.5.0",
|
|
66
|
+
"ts-jest": "^29.1.2",
|
|
66
67
|
"typescript": "4.8.4"
|
|
67
68
|
},
|
|
68
69
|
"peerDependencies": {
|
|
@@ -72,13 +73,6 @@
|
|
|
72
73
|
"engines": {
|
|
73
74
|
"node": ">=16"
|
|
74
75
|
},
|
|
75
|
-
"jest": {
|
|
76
|
-
"preset": "react-native",
|
|
77
|
-
"modulePathIgnorePatterns": [
|
|
78
|
-
"<rootDir>/example/node_modules",
|
|
79
|
-
"<rootDir>/lib/"
|
|
80
|
-
]
|
|
81
|
-
},
|
|
82
76
|
"release-it": {
|
|
83
77
|
"git": {
|
|
84
78
|
"commitMessage": "chore: release ${version}",
|
|
@@ -141,6 +135,7 @@
|
|
|
141
135
|
]
|
|
142
136
|
},
|
|
143
137
|
"dependencies": {
|
|
138
|
+
"nyc": "^15.1.0",
|
|
144
139
|
"uuid": "^8.3.2"
|
|
145
140
|
}
|
|
146
141
|
}
|