react-native-klarna-inapp-sdk 2.1.10 → 2.1.12

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/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  # Changelog
2
2
  All notable changes to React Native Klarna In-App SDK will be documented in this file.
3
3
 
4
+ ### [2.1.12] - 2023-05-11
5
+ - Update Android native SDK version to 2.6.2
6
+ - Applied dependabot version updates
7
+
8
+ ### [2.1.11] - 2023-05-09
9
+ - Update iOS native SDK version to 2.6.4
10
+
4
11
  ### [2.1.10] - 2022-12-14
5
12
  - Update Android native SDK version to 2.4.1
6
13
  - Update iOS native SDK version to 2.4.1
@@ -8,8 +8,8 @@ buildscript {
8
8
  }
9
9
 
10
10
  dependencies {
11
- // Matches recent template from React Native (0.60)
12
- // https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L16
11
+ // Matches recent template from React Native (0.64)
12
+ // https://github.com/facebook/react-native/blob/0.64-stable/template/android/build.gradle#L16
13
13
  classpath("com.android.tools.build:gradle:${safeExtGet('gradlePluginVersion', '4.2.0')}")
14
14
  }
15
15
  }
@@ -17,11 +17,11 @@ buildscript {
17
17
  apply plugin: 'com.android.library'
18
18
  apply plugin: 'maven-publish'
19
19
 
20
- // Matches values in recent template from React Native (0.59)
21
- // https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L5-L9
20
+ // Matches or updates values in template from React Native (0.64)
21
+ // https://github.com/facebook/react-native/blob/0.64-stable/template/android/build.gradle#L5-L9
22
22
  def DEFAULT_COMPILE_SDK_VERSION = 30
23
23
  def DEFAULT_BUILD_TOOLS_VERSION = "30.0.2"
24
- def DEFAULT_MIN_SDK_VERSION = 19
24
+ def DEFAULT_MIN_SDK_VERSION = 21
25
25
  def DEFAULT_TARGET_SDK_VERSION = 30
26
26
 
27
27
  android {
@@ -55,7 +55,7 @@ repositories {
55
55
 
56
56
  dependencies {
57
57
  implementation "com.facebook.react:react-native:${safeExtGet('reactnativeVersion', '+')}"
58
- implementation 'com.klarna.mobile:sdk:2.4.1'
58
+ implementation 'com.klarna.mobile:sdk:2.6.2'
59
59
 
60
60
  testImplementation "junit:junit:4.13"
61
61
  testImplementation 'androidx.test:core:1.2.0'
@@ -25,6 +25,7 @@ class MappableKlarnaPaymentsSDKError implements Mappable {
25
25
  .put("message", klarnaPaymentsSDKError.getMessage())
26
26
  .put("name", klarnaPaymentsSDKError.getName())
27
27
  .put("invalidFields", klarnaPaymentsSDKError.getInvalidFields())
28
+ .put("sessionId", klarnaPaymentsSDKError.getSessionId())
28
29
  .build();
29
30
  }
30
31
  }
@@ -19,7 +19,8 @@ public class MappableKlarnaPaymentsSDKErrorTest {
19
19
  "testMessage",
20
20
  false,
21
21
  "testAction",
22
- Collections.singletonList("testInvalidField")
22
+ Collections.singletonList("testInvalidField"),
23
+ "testSessionId"
23
24
  );
24
25
 
25
26
  MappableKlarnaPaymentsSDKError writableError = new MappableKlarnaPaymentsSDKError(error);
@@ -39,5 +40,6 @@ public class MappableKlarnaPaymentsSDKErrorTest {
39
40
  Assert.assertEquals(1, invalidFields.size());
40
41
  Assert.assertEquals("testInvalidField", new ArrayList(invalidFields).get(0));
41
42
 
43
+ Assert.assertEquals("testSessionId", map.get("sessionId"));
42
44
  }
43
45
  }
package/ios/Podfile CHANGED
@@ -8,7 +8,7 @@ target 'KlarnaInAppSDK' do
8
8
  # use_frameworks!
9
9
 
10
10
  # Pods for KlarnaInAppSDK
11
- pod 'KlarnaMobileSDK', '2.4.1'
11
+ pod 'KlarnaMobileSDK', '2.6.4'
12
12
  pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
13
13
  pod 'FBReactNativeSpec', :path => "../node_modules/react-native/React/FBReactNativeSpec"
14
14
  pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-klarna-inapp-sdk",
3
3
  "title": "React Native Klarna In-App SDK",
4
- "version": "2.1.10",
4
+ "version": "2.1.12",
5
5
  "description": "This library wraps Klarna’s In-App SDK and exposes its functionality as React Native components. It currently supports Klarna Payments via a Payment View component.",
6
6
  "main": "index.js",
7
7
  "scripts": {},
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
25
25
  end
26
26
 
27
27
  s.dependency "React"
28
- s.dependency 'KlarnaMobileSDK', '2.4.1'
28
+ s.dependency 'KlarnaMobileSDK', '2.6.4'
29
29
  # s.dependency "..."
30
30
 
31
31
  end
package/Jenkinsfile DELETED
@@ -1,156 +0,0 @@
1
- def currentSdkVersion = ""
2
- def gitCommit = ""
3
-
4
- pipeline {
5
-
6
- agent {
7
- label 'mac-mini'
8
- }
9
-
10
- stages {
11
- stage('Initialize') {
12
- steps {
13
- script {
14
- gitCommit = sh(returnStdout: true, script: 'git rev-parse HEAD').trim()
15
- echo "gitCommit: ${gitCommit}"
16
- currentSdkVersion = sdkVersion()
17
- echo "currentSdkVersion: ${currentSdkVersion}"
18
- }
19
- withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'sys-user', usernameVariable: 'MSDK_USER', passwordVariable: 'MSDK_PASSWORD']]) {
20
- sh 'security unlock-keychain -p $MSDK_PASSWORD login.keychain'
21
- }
22
- }
23
- }
24
-
25
- stage('Yarn Install Lib') {
26
- steps {
27
- sh "yarn install"
28
- }
29
- }
30
-
31
- stage('Bundle Install Lib') {
32
- steps {
33
- bash 'bundle install'
34
- }
35
- }
36
-
37
- stage('Pod Install Lib') {
38
- steps {
39
- sh "cd ios && pod install && cd .."
40
- }
41
- }
42
-
43
- stage('Android Native Unit Tests') {
44
- steps {
45
- sh 'cd android && ./gradlew clean && ./gradlew testDebugUnitTest && cd ..'
46
- junit 'android/build/test-results/testDebugUnitTest/*.xml'
47
- }
48
- }
49
-
50
- stage('iOS Native Unit Tests') {
51
- steps {
52
- bash 'bundle exec fastlane ios run_lib_tests'
53
- }
54
- }
55
-
56
- stage('Yarn Install TestApp') {
57
- steps {
58
- sh 'cd TestApp && yarn install && cd ..'
59
- }
60
- }
61
-
62
- stage('Pod Install TestApp') {
63
- steps {
64
- bash 'cd TestApp/ios && pod install --repo-update && pod update KlarnaMobileSDK && cd ../..'
65
- }
66
- }
67
-
68
- stage('Build Android TestApp') {
69
- steps {
70
- sh 'cd TestApp/android && ./gradlew clean && ./gradlew app:assembleDebug && cd ../..'
71
- // apk location: TestApp/android/app/build/outputs/apk/debug/app-debug.apk
72
- // TODO : Upload apk
73
- }
74
- }
75
-
76
- stage('Build iOS TestApp') {
77
- steps {
78
- bash 'bundle exec fastlane ios build_test_app_release'
79
- }
80
- }
81
-
82
- stage('Upload Test Apps') {
83
- when {
84
- expression { isPullRequest() }
85
- }
86
- steps {
87
- script {
88
- withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'BrowserStack', usernameVariable: 'BROWSERSTACK_USER', passwordVariable: 'BROWSERSTACK_PASSWORD']]) {
89
- sh 'curl -u ' + "$BROWSERSTACK_USER" + ":" + "$BROWSERSTACK_PASSWORD" + ' -X POST https://api-cloud.browserstack.com/app-automate/upload -F file=@TestApp/android/app/build/outputs/apk/debug/app-debug.apk -F "data={\\"custom_id\\":\\"INAPP_RN_SDK_ANDROID_TEST_APP\\"}"'
90
- sh 'curl -u ' + "$BROWSERSTACK_USER" + ":" + "$BROWSERSTACK_PASSWORD" + ' -X POST https://api-cloud.browserstack.com/app-automate/upload -F file=@TestApp/build/TestApp.ipa -F "data={\\"custom_id\\":\\"INAPP_RN_SDK_IOS_TEST_APP\\"}"'
91
- }
92
- }
93
- }
94
- }
95
-
96
- stage('Android Integration Tests') {
97
- when {
98
- expression { isPullRequest() }
99
- }
100
- steps {
101
- script {
102
- try {
103
- withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'BrowserStack', usernameVariable: 'BROWSERSTACK_USER', passwordVariable: 'BROWSERSTACK_PASSWORD']]) {
104
- sh './integration-tests/gradlew -p integration-tests :test --tests TestSuite -Dbrowserstack.username="' + "$BROWSERSTACK_USER" + '" -Dbrowserstack.password="' + "$BROWSERSTACK_PASSWORD" + '" -Dbuild.name="' + "${env.BRANCH_NAME}@${gitCommit}" + '" -Dbuild.platform="Android"'
105
- }
106
- } finally {
107
- // Add the test results for statistics
108
- junit 'integration-tests/build/test-results/test/*.xml'
109
- }
110
- }
111
- }
112
- }
113
-
114
- // Enable after iOS tests are fixed
115
- /* stage('iOS Integration Tests') {
116
- when {
117
- expression { isPullRequest() }
118
- }
119
- steps {
120
- script {
121
- try {
122
- withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'BrowserStack', usernameVariable: 'BROWSERSTACK_USER', passwordVariable: 'BROWSERSTACK_PASSWORD']]) {
123
- sh './integration-tests/gradlew -p integration-tests :test --tests TestSuite -Dbrowserstack.username="' + "$BROWSERSTACK_USER" + '" -Dbrowserstack.password="' + "$BROWSERSTACK_PASSWORD" + '" -Dbuild.name="' + "${env.BRANCH_NAME}@${gitCommit}" + '" -Dbuild.platform="iOS"'
124
- }
125
- } finally {
126
- // Add the test results for statistics
127
- junit 'integration-tests/build/test-results/test *//*.xml'
128
- }
129
- }
130
- }
131
- } */
132
-
133
- stage('Reset Directory') {
134
- steps {
135
- script {
136
- sh 'git reset --hard'
137
- //sh 'git clean -d -x -f'
138
- }
139
- }
140
- }
141
-
142
- }
143
- }
144
-
145
- String sdkVersion() {
146
- return sh(returnStdout: true, script: "sed -n -e '/\"version\"/ s/.*\\: *//p' package.json").trim().replaceAll("\"", "").replaceAll(",", "")
147
- }
148
-
149
- def bash(custom) {
150
- sh '''#!/bin/bash -l
151
- ''' + custom
152
- }
153
-
154
- boolean isPullRequest() {
155
- return env.JOB_BASE_NAME.startsWith('PR') && env.JOB_BASE_NAME.endsWith('merge')
156
- }