expo-json-utils 0.2.1 → 0.4.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/CHANGELOG.md
CHANGED
|
@@ -10,7 +10,19 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 0.
|
|
13
|
+
## 0.4.0 — 2022-10-25
|
|
14
|
+
|
|
15
|
+
### 🛠 Breaking changes
|
|
16
|
+
|
|
17
|
+
- Bumped iOS deployment target to 13.0 and deprecated support for iOS 12. ([#18873](https://github.com/expo/expo/pull/18873) by [@tsapeta](https://github.com/tsapeta))
|
|
18
|
+
|
|
19
|
+
## 0.3.0 — 2022-04-18
|
|
20
|
+
|
|
21
|
+
### ⚠️ Notices
|
|
22
|
+
|
|
23
|
+
- On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
|
|
24
|
+
|
|
25
|
+
## 0.2.1 - 2022-02-01
|
|
14
26
|
|
|
15
27
|
### 🐛 Bug fixes
|
|
16
28
|
|
package/android/build.gradle
CHANGED
|
@@ -3,20 +3,35 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '0.
|
|
6
|
+
version = '0.4.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
|
+
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
10
|
+
if (expoModulesCorePlugin.exists()) {
|
|
11
|
+
apply from: expoModulesCorePlugin
|
|
12
|
+
applyKotlinExpoModulesCorePlugin()
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
// Simple helper that allows the root project to override versions declared by this library.
|
|
10
16
|
ext.safeExtGet = { prop, fallback ->
|
|
11
17
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
12
18
|
}
|
|
13
19
|
|
|
20
|
+
// Ensures backward compatibility
|
|
21
|
+
ext.getKotlinVersion = {
|
|
22
|
+
if (ext.has("kotlinVersion")) {
|
|
23
|
+
ext.kotlinVersion()
|
|
24
|
+
} else {
|
|
25
|
+
ext.safeExtGet("kotlinVersion", "1.6.10")
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
14
29
|
repositories {
|
|
15
30
|
mavenCentral()
|
|
16
31
|
}
|
|
17
32
|
|
|
18
33
|
dependencies {
|
|
19
|
-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${
|
|
34
|
+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
37
|
|
|
@@ -44,18 +59,22 @@ afterEvaluate {
|
|
|
44
59
|
}
|
|
45
60
|
|
|
46
61
|
android {
|
|
47
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
62
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 31)
|
|
48
63
|
|
|
49
64
|
compileOptions {
|
|
50
|
-
sourceCompatibility JavaVersion.
|
|
51
|
-
targetCompatibility JavaVersion.
|
|
65
|
+
sourceCompatibility JavaVersion.VERSION_11
|
|
66
|
+
targetCompatibility JavaVersion.VERSION_11
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
kotlinOptions {
|
|
70
|
+
jvmTarget = JavaVersion.VERSION_11.majorVersion
|
|
52
71
|
}
|
|
53
72
|
|
|
54
73
|
defaultConfig {
|
|
55
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
56
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
75
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 31)
|
|
57
76
|
versionCode 31
|
|
58
|
-
versionName '0.
|
|
77
|
+
versionName '0.4.0'
|
|
59
78
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
60
79
|
}
|
|
61
80
|
lintOptions {
|
|
@@ -64,25 +83,22 @@ android {
|
|
|
64
83
|
testOptions {
|
|
65
84
|
unitTests.includeAndroidResources = true
|
|
66
85
|
}
|
|
67
|
-
sourceSets {
|
|
68
|
-
androidTest.assets.srcDirs += files("$projectDir/src/androidTest/schemas".toString())
|
|
69
|
-
}
|
|
70
86
|
}
|
|
71
87
|
|
|
72
88
|
dependencies {
|
|
73
89
|
testImplementation 'junit:junit:4.12'
|
|
74
|
-
testImplementation 'androidx.test:core:1.
|
|
90
|
+
testImplementation 'androidx.test:core:1.4.0'
|
|
75
91
|
testImplementation 'org.mockito:mockito-core:1.10.19'
|
|
76
|
-
testImplementation 'io.mockk:mockk:1.
|
|
92
|
+
testImplementation 'io.mockk:mockk:1.12.3'
|
|
77
93
|
|
|
78
94
|
androidTestImplementation 'org.amshove.kluent:kluent-android:1.68'
|
|
79
|
-
androidTestImplementation 'androidx.test:runner:1.
|
|
80
|
-
androidTestImplementation 'androidx.test:core:1.
|
|
81
|
-
androidTestImplementation 'androidx.test:rules:1.
|
|
95
|
+
androidTestImplementation 'androidx.test:runner:1.4.0'
|
|
96
|
+
androidTestImplementation 'androidx.test:core:1.4.0'
|
|
97
|
+
androidTestImplementation 'androidx.test:rules:1.4.0'
|
|
82
98
|
androidTestImplementation 'org.mockito:mockito-android:3.7.7'
|
|
83
|
-
androidTestImplementation 'io.mockk:mockk-android:1.
|
|
99
|
+
androidTestImplementation 'io.mockk:mockk-android:1.12.3'
|
|
84
100
|
|
|
85
|
-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${
|
|
101
|
+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
|
|
86
102
|
}
|
|
87
103
|
repositories {
|
|
88
104
|
mavenCentral()
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
NS_ASSUME_NONNULL_BEGIN
|
|
6
6
|
|
|
7
|
-
@interface NSDictionary (EXJSONUtils)
|
|
7
|
+
@interface NSDictionary<__covariant KeyType, __covariant ObjectType> (EXJSONUtils)
|
|
8
8
|
|
|
9
|
-
- (NSString *)stringForKey:(
|
|
10
|
-
- (nullable NSString *)nullableStringForKey:(
|
|
11
|
-
- (NSNumber *)numberForKey:(
|
|
12
|
-
- (nullable NSNumber *)nullableNumberForKey:(
|
|
13
|
-
- (NSArray *)arrayForKey:(
|
|
14
|
-
- (nullable NSArray *)nullableArrayForKey:(
|
|
15
|
-
- (NSDictionary *)dictionaryForKey:(
|
|
16
|
-
- (nullable NSDictionary *)nullableDictionaryForKey:(
|
|
9
|
+
- (NSString *)stringForKey:(KeyType)key;
|
|
10
|
+
- (nullable NSString *)nullableStringForKey:(KeyType)key;
|
|
11
|
+
- (NSNumber *)numberForKey:(KeyType)key;
|
|
12
|
+
- (nullable NSNumber *)nullableNumberForKey:(KeyType)key;
|
|
13
|
+
- (NSArray *)arrayForKey:(KeyType)key;
|
|
14
|
+
- (nullable NSArray *)nullableArrayForKey:(KeyType)key;
|
|
15
|
+
- (NSDictionary *)dictionaryForKey:(KeyType)key;
|
|
16
|
+
- (nullable NSDictionary *)nullableDictionaryForKey:(KeyType)key;
|
|
17
17
|
|
|
18
18
|
@end
|
|
19
19
|
|
|
@@ -19,35 +19,35 @@
|
|
|
19
19
|
|
|
20
20
|
@implementation NSDictionary (EXJSONUtils)
|
|
21
21
|
|
|
22
|
-
- (NSString *)stringForKey:(
|
|
22
|
+
- (NSString *)stringForKey:(id)key {
|
|
23
23
|
return EXGetNonNullManifestValue(NSString, key);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
- (nullable NSString *)nullableStringForKey:(
|
|
26
|
+
- (nullable NSString *)nullableStringForKey:(id)key {
|
|
27
27
|
return EXGetNullableManifestValue(NSString, key);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
- (NSNumber *)numberForKey:(
|
|
30
|
+
- (NSNumber *)numberForKey:(id)key {
|
|
31
31
|
return EXGetNonNullManifestValue(NSNumber, key);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
- (nullable NSNumber *)nullableNumberForKey:(
|
|
34
|
+
- (nullable NSNumber *)nullableNumberForKey:(id)key {
|
|
35
35
|
return EXGetNullableManifestValue(NSNumber, key);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
- (NSArray *)arrayForKey:(
|
|
38
|
+
- (NSArray *)arrayForKey:(id)key {
|
|
39
39
|
return EXGetNonNullManifestValue(NSArray, key);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
- (nullable NSArray *)nullableArrayForKey:(
|
|
42
|
+
- (nullable NSArray *)nullableArrayForKey:(id)key {
|
|
43
43
|
return EXGetNullableManifestValue(NSArray, key);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
- (NSDictionary *)dictionaryForKey:(
|
|
46
|
+
- (NSDictionary *)dictionaryForKey:(id)key {
|
|
47
47
|
return EXGetNonNullManifestValue(NSDictionary, key);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
- (nullable NSDictionary *)nullableDictionaryForKey:(
|
|
50
|
+
- (nullable NSDictionary *)nullableDictionaryForKey:(id)key {
|
|
51
51
|
return EXGetNullableManifestValue(NSDictionary, key);
|
|
52
52
|
}
|
|
53
53
|
|
package/ios/EXJSONUtils.podspec
CHANGED
|
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
|
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
s.author = package['author']
|
|
12
12
|
s.homepage = package['homepage']
|
|
13
|
-
s.platform = :ios, '
|
|
13
|
+
s.platform = :ios, '13.0'
|
|
14
14
|
s.source = { git: 'https://github.com/expo/expo.git' }
|
|
15
15
|
s.static_framework = true
|
|
16
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-json-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Utilities for reading NSDictionaries (iOS) and JSONObjects (Android).",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"author": "650 Industries, Inc.",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://docs.expo.dev/versions/latest/sdk/module-template",
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "eab2b09c735fb0fc2bf734a3f29a6593adba3838"
|
|
23
23
|
}
|