expo-manifests 1.0.10-canary-20251127-587bc53 → 1.0.10
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,13 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## 1.0.10 — 2025-12-05
|
|
14
|
+
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
16
|
+
|
|
17
|
+
## 1.0.9 — 2025-11-17
|
|
18
|
+
|
|
19
|
+
_This version does not introduce any user-facing changes._
|
|
14
20
|
|
|
15
21
|
## 1.0.8 — 2025-09-11
|
|
16
22
|
|
package/android/build.gradle
CHANGED
|
@@ -4,7 +4,7 @@ plugins {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '1.0.10
|
|
7
|
+
version = '1.0.10'
|
|
8
8
|
|
|
9
9
|
expoModule {
|
|
10
10
|
canBePublished false
|
|
@@ -14,7 +14,7 @@ android {
|
|
|
14
14
|
namespace "expo.modules.manifests"
|
|
15
15
|
defaultConfig {
|
|
16
16
|
versionCode 31
|
|
17
|
-
versionName '1.0.10
|
|
17
|
+
versionName '1.0.10'
|
|
18
18
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
19
19
|
}
|
|
20
20
|
testOptions {
|
|
@@ -29,9 +29,9 @@ dependencies {
|
|
|
29
29
|
implementation project(':expo-json-utils')
|
|
30
30
|
|
|
31
31
|
testImplementation 'junit:junit:4.13.2'
|
|
32
|
+
testImplementation 'androidx.test:core:1.5.0'
|
|
33
|
+
testImplementation 'org.mockito:mockito-core:4.0.0'
|
|
32
34
|
testImplementation 'io.mockk:mockk:1.13.5'
|
|
33
|
-
testImplementation '
|
|
34
|
-
testImplementation
|
|
35
|
-
testImplementation 'org.json:json:20250517'
|
|
36
|
-
testImplementation "com.google.truth:truth:1.4.5"
|
|
35
|
+
testImplementation 'org.json:json:20230227'
|
|
36
|
+
testImplementation "com.google.truth:truth:1.1.2"
|
|
37
37
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Copyright (c) 2020 650 Industries, Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesTestCore
|
|
4
|
+
|
|
5
|
+
@testable import EXManifests
|
|
6
|
+
|
|
7
|
+
enum ManifestTestError: Error {
|
|
8
|
+
case testError
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class EmbeddedManifestSpec : ExpoSpec {
|
|
12
|
+
override class func spec() {
|
|
13
|
+
describe("instantiation") {
|
|
14
|
+
it("instantiates and reads properties") {
|
|
15
|
+
let manifestJson = "{\"id\":\"0eef8214-4833-4089-9dff-b4138a14f196\",\"commitTime\":1609975977832}"
|
|
16
|
+
let manifestData = manifestJson.data(using: .utf8)
|
|
17
|
+
guard let manifestData = manifestData else {
|
|
18
|
+
throw ManifestTestError.testError
|
|
19
|
+
}
|
|
20
|
+
let manifestJsonObject = try JSONSerialization.jsonObject(with: manifestData)
|
|
21
|
+
guard let manifestJsonObject = manifestJsonObject as? [String: Any] else {
|
|
22
|
+
throw ManifestTestError.testError
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
let manifest = EmbeddedManifest(rawManifestJSON: manifestJsonObject)
|
|
26
|
+
|
|
27
|
+
expect(manifest.rawId()) == "0eef8214-4833-4089-9dff-b4138a14f196"
|
|
28
|
+
expect(manifest.commitTimeNumber()) == 1609975977832
|
|
29
|
+
expect(manifest.metadata()).to(beNil())
|
|
30
|
+
|
|
31
|
+
// from base class
|
|
32
|
+
expect(manifest.stableLegacyId()) == "0eef8214-4833-4089-9dff-b4138a14f196"
|
|
33
|
+
expect(manifest.scopeKey()) == "0eef8214-4833-4089-9dff-b4138a14f196"
|
|
34
|
+
expect(manifest.easProjectId()).to(beNil())
|
|
35
|
+
expect(manifest.expoGoSDKVersion()).to(beNil())
|
|
36
|
+
|
|
37
|
+
// from base base class
|
|
38
|
+
expect(manifest.legacyId()) == "0eef8214-4833-4089-9dff-b4138a14f196"
|
|
39
|
+
expect(manifest.revisionId()).to(beNil())
|
|
40
|
+
expect(manifest.slug()).to(beNil())
|
|
41
|
+
expect(manifest.appKey()).to(beNil())
|
|
42
|
+
expect(manifest.name()).to(beNil())
|
|
43
|
+
expect(manifest.version()).to(beNil())
|
|
44
|
+
expect(manifest.notificationPreferences()).to(beNil())
|
|
45
|
+
expect(manifest.updatesInfo()).to(beNil())
|
|
46
|
+
expect(manifest.iosConfig()).to(beNil())
|
|
47
|
+
expect(manifest.hostUri()).to(beNil())
|
|
48
|
+
expect(manifest.orientation()).to(beNil())
|
|
49
|
+
expect(manifest.experiments()).to(beNil())
|
|
50
|
+
expect(manifest.developer()).to(beNil())
|
|
51
|
+
expect(manifest.facebookAppId()).to(beNil())
|
|
52
|
+
expect(manifest.facebookApplicationName()).to(beNil())
|
|
53
|
+
expect(manifest.facebookAutoInitEnabled()) == false
|
|
54
|
+
expect(manifest.isDevelopmentMode()) == false
|
|
55
|
+
expect(manifest.isDevelopmentSilentLaunch()) == false
|
|
56
|
+
expect(manifest.isUsingDeveloperTool()) == false
|
|
57
|
+
expect(manifest.userInterfaceStyle()).to(beNil())
|
|
58
|
+
expect(manifest.iosOrRootBackgroundColor()).to(beNil())
|
|
59
|
+
expect(manifest.iosSplashBackgroundColor()).to(beNil())
|
|
60
|
+
expect(manifest.iosSplashImageUrl()).to(beNil())
|
|
61
|
+
expect(manifest.iosSplashImageResizeMode()).to(beNil())
|
|
62
|
+
expect(manifest.iosGoogleServicesFile()).to(beNil())
|
|
63
|
+
expect(manifest.supportsRTL()) == false
|
|
64
|
+
expect(manifest.jsEngine()) == "hermes"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Copyright (c) 2020 650 Industries, Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesTestCore
|
|
4
|
+
|
|
5
|
+
@testable import EXManifests
|
|
6
|
+
|
|
7
|
+
class ExpoUpdatesManifestSpec : ExpoSpec {
|
|
8
|
+
override class func spec() {
|
|
9
|
+
describe("instantiation") {
|
|
10
|
+
it("instantiates and reads properties") {
|
|
11
|
+
let manifestJson = "{\"runtimeVersion\":\"1\",\"id\":\"0eef8214-4833-4089-9dff-b4138a14f196\",\"createdAt\":\"2020-11-11T00:17:54.797Z\",\"launchAsset\":{\"url\":\"https://classic-assets.eascdn.net/%40esamelson%2Fnative-component-list%2F39.0.0%2F01c86fd863cfee878068eebd40f165df-39.0.0-ios.js\",\"contentType\":\"application/javascript\"}}"
|
|
12
|
+
let manifestData = manifestJson.data(using: .utf8)
|
|
13
|
+
guard let manifestData = manifestData else {
|
|
14
|
+
throw ManifestTestError.testError
|
|
15
|
+
}
|
|
16
|
+
let manifestJsonObject = try JSONSerialization.jsonObject(with: manifestData)
|
|
17
|
+
guard let manifestJsonObject = manifestJsonObject as? [String: Any] else {
|
|
18
|
+
throw ManifestTestError.testError
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let manifest = ExpoUpdatesManifest(rawManifestJSON: manifestJsonObject)
|
|
22
|
+
|
|
23
|
+
expect(manifest.rawId()) == "0eef8214-4833-4089-9dff-b4138a14f196"
|
|
24
|
+
expect(manifest.createdAt()) == "2020-11-11T00:17:54.797Z"
|
|
25
|
+
expect(manifest.runtimeVersion()) == "1"
|
|
26
|
+
expect(NSDictionary(dictionary: [
|
|
27
|
+
"url": "https://classic-assets.eascdn.net/%40esamelson%2Fnative-component-list%2F39.0.0%2F01c86fd863cfee878068eebd40f165df-39.0.0-ios.js",
|
|
28
|
+
"contentType": "application/javascript"
|
|
29
|
+
]).isEqual(to: manifest.launchAsset())) == true
|
|
30
|
+
expect(manifest.assets()).to(beNil())
|
|
31
|
+
|
|
32
|
+
// from base class
|
|
33
|
+
expect(manifest.legacyId()) == "0eef8214-4833-4089-9dff-b4138a14f196"
|
|
34
|
+
expect(manifest.revisionId()).to(beNil())
|
|
35
|
+
expect(manifest.slug()).to(beNil())
|
|
36
|
+
expect(manifest.appKey()).to(beNil())
|
|
37
|
+
expect(manifest.name()).to(beNil())
|
|
38
|
+
expect(manifest.version()).to(beNil())
|
|
39
|
+
expect(manifest.notificationPreferences()).to(beNil())
|
|
40
|
+
expect(manifest.updatesInfo()).to(beNil())
|
|
41
|
+
expect(manifest.iosConfig()).to(beNil())
|
|
42
|
+
expect(manifest.hostUri()).to(beNil())
|
|
43
|
+
expect(manifest.orientation()).to(beNil())
|
|
44
|
+
expect(manifest.experiments()).to(beNil())
|
|
45
|
+
expect(manifest.developer()).to(beNil())
|
|
46
|
+
expect(manifest.facebookAppId()).to(beNil())
|
|
47
|
+
expect(manifest.facebookApplicationName()).to(beNil())
|
|
48
|
+
expect(manifest.facebookAutoInitEnabled()) == false
|
|
49
|
+
expect(manifest.isDevelopmentMode()) == false
|
|
50
|
+
expect(manifest.isDevelopmentSilentLaunch()) == false
|
|
51
|
+
expect(manifest.isUsingDeveloperTool()) == false
|
|
52
|
+
expect(manifest.userInterfaceStyle()).to(beNil())
|
|
53
|
+
expect(manifest.iosOrRootBackgroundColor()).to(beNil())
|
|
54
|
+
expect(manifest.iosSplashBackgroundColor()).to(beNil())
|
|
55
|
+
expect(manifest.iosSplashImageUrl()).to(beNil())
|
|
56
|
+
expect(manifest.iosSplashImageResizeMode()).to(beNil())
|
|
57
|
+
expect(manifest.iosGoogleServicesFile()).to(beNil())
|
|
58
|
+
expect(manifest.supportsRTL()) == false
|
|
59
|
+
expect(manifest.jsEngine()) == "hermes"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
describe("SDK Version") {
|
|
64
|
+
it("is correct with valid numeric case") {
|
|
65
|
+
let manifestJson = [
|
|
66
|
+
"extra": [
|
|
67
|
+
"expoClient": [
|
|
68
|
+
"sdkVersion": "39.0.0"
|
|
69
|
+
]
|
|
70
|
+
]
|
|
71
|
+
]
|
|
72
|
+
let manifest = ExpoUpdatesManifest(rawManifestJSON: manifestJson)
|
|
73
|
+
expect(manifest.expoGoSDKVersion()) == "39.0.0"
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
it("is UNVERSIONED with valid unversioned case") {
|
|
77
|
+
let manifestJson = [
|
|
78
|
+
"extra": [
|
|
79
|
+
"expoClient": [
|
|
80
|
+
"sdkVersion": "UNVERSIONED"
|
|
81
|
+
]
|
|
82
|
+
]
|
|
83
|
+
]
|
|
84
|
+
let manifest = ExpoUpdatesManifest(rawManifestJSON: manifestJson)
|
|
85
|
+
expect(manifest.expoGoSDKVersion()) == "UNVERSIONED"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesTestCore
|
|
4
|
+
|
|
5
|
+
@testable import EXManifests
|
|
6
|
+
|
|
7
|
+
final class ManifestSpec: ExpoSpec {
|
|
8
|
+
override class func spec() {
|
|
9
|
+
describe("getPluginProperties") {
|
|
10
|
+
it("should return nil when plugin is not matched") {
|
|
11
|
+
var manifestJson: [String: Any] = [:]
|
|
12
|
+
var manifest = ManifestFactory.manifest(forManifestJSON: manifestJson)
|
|
13
|
+
expect(manifest.getPluginProperties(packageName: "test")).to(beNil())
|
|
14
|
+
|
|
15
|
+
manifestJson = ["plugins": [] as [Any]]
|
|
16
|
+
manifest = ManifestFactory.manifest(forManifestJSON: manifestJson)
|
|
17
|
+
expect(manifest.getPluginProperties(packageName: "test")).to(beNil())
|
|
18
|
+
|
|
19
|
+
manifestJson = ["plugins": ["hello"]]
|
|
20
|
+
manifest = ManifestFactory.manifest(forManifestJSON: manifestJson)
|
|
21
|
+
expect(manifest.getPluginProperties(packageName: "test")).to(beNil())
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
it("should return nil when the matched plugin has no properties") {
|
|
25
|
+
let manifestJson = ["plugins": ["test"]]
|
|
26
|
+
let manifest = ManifestFactory.manifest(forManifestJSON: manifestJson)
|
|
27
|
+
expect(manifest.getPluginProperties(packageName: "test")).to(beNil())
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
it("should return matched plugin properties") {
|
|
31
|
+
let manifestJson = ["plugins": [["test", ["foo": "bar"]] as [Any]]]
|
|
32
|
+
let manifest = ManifestFactory.manifest(forManifestJSON: manifestJson)
|
|
33
|
+
let props = manifest.getPluginProperties(packageName: "test")
|
|
34
|
+
expect(props as? [String: String]) == ["foo": "bar"]
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
it("should not crash with array with name and no props") {
|
|
38
|
+
let manifestJson = ["plugins": [["test"]]]
|
|
39
|
+
let manifest = ManifestFactory.manifest(forManifestJSON: manifestJson)
|
|
40
|
+
expect(manifest.getPluginProperties(packageName: "test")).to(beNil())
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-manifests",
|
|
3
|
-
"version": "1.0.10
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Code to parse and use Expo and Expo Updates manifests.",
|
|
5
5
|
"main": "build/Manifests.js",
|
|
6
6
|
"types": "build/Manifests.d.ts",
|
|
@@ -34,13 +34,14 @@
|
|
|
34
34
|
"preset": "expo-module-scripts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@expo/config": "12.0.11
|
|
38
|
-
"expo-json-utils": "0.15.
|
|
37
|
+
"@expo/config": "~12.0.11",
|
|
38
|
+
"expo-json-utils": "~0.15.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"expo-module-scripts": "5.
|
|
41
|
+
"expo-module-scripts": "^5.0.8"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"expo": "
|
|
45
|
-
}
|
|
44
|
+
"expo": "*"
|
|
45
|
+
},
|
|
46
|
+
"gitHead": "172a69f5f70c1d0e043e1532f924de97210cabc3"
|
|
46
47
|
}
|