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

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/.gitattributes CHANGED
@@ -1,3 +1,3 @@
1
- # Windows files should use crlf line endings
2
- # https://help.github.com/articles/dealing-with-line-endings/
1
+ *.pbxproj -text
2
+ # specific for windows script files
3
3
  *.bat text eol=crlf
@@ -0,0 +1 @@
1
+ {}
package/.yarnrc ADDED
@@ -0,0 +1,5 @@
1
+ # Override Yarn command so we can automatically setup the repo on running `yarn`
2
+
3
+ yarn-path "scripts/bootstrap.js"
4
+
5
+ registry "https://registry.yarnpkg.com"
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
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.13] - 2023-09-19
5
+ - Update Android native SDK version to 2.6.8
6
+ - Update iOS native SDK version to 2.6.10
7
+ - Applied dependabot version updates
8
+
4
9
  ### [2.1.12] - 2023-05-11
5
10
  - Update Android native SDK version to 2.6.2
6
11
  - Applied dependabot version updates
@@ -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.6.2'
58
+ implementation 'com.klarna.mobile:sdk:2.6.8'
59
59
 
60
60
  testImplementation "junit:junit:4.13"
61
61
  testImplementation 'androidx.test:core:1.2.0'
@@ -115,7 +115,7 @@ afterEvaluate { project ->
115
115
  }
116
116
 
117
117
  task androidSourcesJar(type: Jar) {
118
- classifier = 'sources'
118
+ archiveClassifier = 'sources'
119
119
  from android.sourceSets.main.java.srcDirs
120
120
  include '**/*.java'
121
121
  }
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: ['module:metro-react-native-babel-preset'],
3
+ };
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.6.4'
11
+ pod 'KlarnaMobileSDK', '2.6.10'
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,9 +1,10 @@
1
1
  {
2
2
  "name": "react-native-klarna-inapp-sdk",
3
- "title": "React Native Klarna In-App SDK",
4
- "version": "2.1.12",
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
- "main": "index.js",
3
+ "title": "Klarna Mobile SDK React Native",
4
+ "version": "2.1.13",
5
+ "description": "This library wraps Klarna Mobile SDK and exposes its functionality as React Native components.",
6
+ "main": "src/index",
7
+ "source": "src/index",
7
8
  "scripts": {},
8
9
  "repository": {
9
10
  "type": "git",
@@ -30,5 +31,8 @@
30
31
  "react": "17.0.1",
31
32
  "react-native": "0.64.4"
32
33
  },
33
- "dependencies": {}
34
+ "dependencies": {},
35
+ "engines": {
36
+ "node": ">= 16.0.0"
37
+ }
34
38
  }
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
25
25
  end
26
26
 
27
27
  s.dependency "React"
28
- s.dependency 'KlarnaMobileSDK', '2.6.4'
28
+ s.dependency 'KlarnaMobileSDK', '2.6.10'
29
29
  # s.dependency "..."
30
30
 
31
31
  end
@@ -0,0 +1,29 @@
1
+ const os = require('os');
2
+ const path = require('path');
3
+ const child_process = require('child_process');
4
+
5
+ const root = path.resolve(__dirname, '..');
6
+ const args = process.argv.slice(2);
7
+ const options = {
8
+ cwd: process.cwd(),
9
+ env: process.env,
10
+ stdio: 'inherit',
11
+ encoding: 'utf-8',
12
+ };
13
+
14
+ if (os.type() === 'Windows_NT') {
15
+ options.shell = true;
16
+ }
17
+
18
+ let result;
19
+
20
+ if (process.cwd() !== root || args.length) {
21
+ // We're not in the root of the project, or additional arguments were passed
22
+ // In this case, forward the command to `yarn`
23
+ result = child_process.spawnSync('yarn', args, options);
24
+ } else {
25
+ // If `yarn` is run without arguments, perform bootstrap
26
+ result = child_process.spawnSync('yarn', ['bootstrap'], options);
27
+ }
28
+
29
+ process.exitCode = result.status;
@@ -1,111 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /*
4
- * Using libraries within examples and linking them within packages.json like:
5
- * "react-native-library-name": "file:../"
6
- * will cause problems with the metro bundler if the example will run via
7
- * `react-native run-[ios|android]`. This will result in an error as the metro
8
- * bundler will find multiple versions for the same module while resolving it.
9
- * The reason for that is that if the library is installed it also copies in the
10
- * example folder itself as well as the node_modules folder of the library
11
- * although their are defined in .npmignore and should be ignored in theory.
12
- *
13
- * This postinstall script removes the node_modules folder as well as all
14
- * entries from the libraries .npmignore file within the examples node_modules
15
- * folder after the library was installed. This should resolve the metro
16
- * bundler issue mentioned above.
17
- *
18
- * It is expected this scripts lives in the libraries root folder within a
19
- * scripts folder. As first parameter the relative path to the libraries
20
- * folder within the example's node_modules folder may be provided.
21
- * This script will determine the path from this project's package.json file
22
- * if no such relative path is provided.
23
- * An example's package.json entry could look like:
24
- * "postinstall": "node ../scripts/examples_postinstall.js node_modules/react-native-library-name/"
25
- */
26
-
27
- 'use strict';
28
-
29
- const fs = require('fs');
30
- const path = require('path');
31
-
32
- /// Delete all files and directories for the given path
33
- const removeFileDirectoryRecursively = fileDirPath => {
34
- // Remove file
35
- if (!fs.lstatSync(fileDirPath).isDirectory()) {
36
- fs.unlinkSync(fileDirPath);
37
- return;
38
- }
39
-
40
- // Go down the directory an remove each file / directory recursively
41
- fs.readdirSync(fileDirPath).forEach(entry => {
42
- const entryPath = path.join(fileDirPath, entry);
43
- removeFileDirectoryRecursively(entryPath);
44
- });
45
- fs.rmdirSync(fileDirPath);
46
- };
47
-
48
- /// Remove TestApp/node_modules/react-native-library-name/node_modules directory
49
- const removeLibraryNodeModulesPath = (libraryNodeModulesPath) => {
50
- const nodeModulesPath = path.resolve(libraryNodeModulesPath, 'node_modules')
51
-
52
- if (!fs.existsSync(nodeModulesPath)) {
53
- console.log(`No node_modules path found at ${nodeModulesPath}. Skipping delete.`)
54
- return;
55
- }
56
-
57
- console.log(`Deleting: ${nodeModulesPath}`)
58
- try {
59
- removeFileDirectoryRecursively(nodeModulesPath);
60
- console.log(`Successfully deleted: ${nodeModulesPath}`)
61
- } catch (err) {
62
- console.log(`Error deleting ${nodeModulesPath}: ${err.message}`);
63
- }
64
- };
65
-
66
- /// Remove all entries from the .npmignore within TestApp/node_modules/react-native-library-name/
67
- const removeLibraryNpmIgnorePaths = (npmIgnorePath, libraryNodeModulesPath) => {
68
- if (!fs.existsSync(npmIgnorePath)) {
69
- console.log(`No .npmignore path found at ${npmIgnorePath}. Skipping deleting content.`);
70
- return;
71
- }
72
-
73
- fs.readFileSync(npmIgnorePath, 'utf8').split(/\r?\n/).forEach(entry => {
74
- if (entry.length === 0) {
75
- return
76
- }
77
-
78
- const npmIgnoreLibraryNodeModulesEntryPath = path.resolve(libraryNodeModulesPath, entry);
79
- if (!fs.existsSync(npmIgnoreLibraryNodeModulesEntryPath)) {
80
- return;
81
- }
82
-
83
- console.log(`Deleting: ${npmIgnoreLibraryNodeModulesEntryPath}`)
84
- try {
85
- removeFileDirectoryRecursively(npmIgnoreLibraryNodeModulesEntryPath);
86
- console.log(`Successfully deleted: ${npmIgnoreLibraryNodeModulesEntryPath}`)
87
- } catch (err) {
88
- console.log(`Error deleting ${npmIgnoreLibraryNodeModulesEntryPath}: ${err.message}`);
89
- }
90
- });
91
- };
92
-
93
- // Main start sweeping process
94
- (() => {
95
- // Read out dir of example project
96
- const exampleDir = process.cwd();
97
-
98
- console.log(`Starting postinstall cleanup for ${exampleDir}`);
99
-
100
- // Resolve the React Native library's path within the example's node_modules directory
101
- const libraryNodeModulesPath = process.argv.length > 2
102
- ? path.resolve(exampleDir, process.argv[2])
103
- : path.resolve(exampleDir, 'node_modules', require('../package.json').name);
104
-
105
- console.log(`Removing unwanted artifacts for ${libraryNodeModulesPath}`);
106
-
107
- removeLibraryNodeModulesPath(libraryNodeModulesPath);
108
-
109
- const npmIgnorePath = path.resolve(__dirname, '../.npmignore');
110
- removeLibraryNpmIgnorePaths(npmIgnorePath, libraryNodeModulesPath);
111
- })();
File without changes