expo-modules-core 0.6.5 → 0.9.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 +57 -0
- package/README.md +1 -1
- package/android/ExpoModulesCorePlugin.gradle +15 -0
- package/android/build.gradle +31 -15
- package/android/src/main/java/expo/modules/adapters/react/NativeModulesProxy.java +5 -5
- package/android/src/main/java/expo/modules/adapters/react/services/UIManagerModuleWrapper.java +13 -0
- package/android/src/main/java/expo/modules/core/ViewManager.java +9 -0
- package/android/src/main/java/expo/modules/core/interfaces/JavaScriptContextProvider.java +4 -0
- package/android/src/main/java/expo/modules/core/interfaces/ReactActivityHandler.java +37 -1
- package/android/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.java +30 -0
- package/android/src/main/java/expo/modules/core/interfaces/services/UIManager.java +2 -0
- package/android/src/main/java/expo/modules/kotlin/AppContext.kt +23 -5
- package/android/src/main/java/expo/modules/kotlin/DynamicExtenstions.kt +5 -3
- package/android/src/main/java/expo/modules/kotlin/KPromiseWrapper.kt +3 -8
- package/android/src/main/java/expo/modules/kotlin/KotlinInteropModuleRegistry.kt +24 -9
- package/android/src/main/java/expo/modules/kotlin/ModuleHolder.kt +12 -7
- package/android/src/main/java/expo/modules/kotlin/ModuleRegistry.kt +23 -1
- package/android/src/main/java/expo/modules/kotlin/Promise.kt +1 -1
- package/android/src/main/java/expo/modules/kotlin/callbacks/Callback.kt +5 -0
- package/android/src/main/java/expo/modules/kotlin/callbacks/ViewCallback.kt +39 -0
- package/android/src/main/java/expo/modules/kotlin/callbacks/ViewCallbackDelegate.kt +27 -0
- package/android/src/main/java/expo/modules/kotlin/defaultmodules/ErrorManagerModule.kt +25 -0
- package/android/src/main/java/expo/modules/kotlin/events/EventEmitter.kt +13 -0
- package/android/src/main/java/expo/modules/kotlin/events/KModuleEventEmitterWrapper.kt +102 -0
- package/android/src/main/java/expo/modules/kotlin/exception/CodedException.kt +93 -9
- package/android/src/main/java/expo/modules/kotlin/exception/ExceptionDecorator.kt +11 -0
- package/android/src/main/java/expo/modules/kotlin/{methods/AnyMethod.kt → functions/AnyFunction.kt} +18 -18
- package/android/src/main/java/expo/modules/kotlin/functions/AsyncFunction.kt +15 -0
- package/android/src/main/java/expo/modules/kotlin/functions/AsyncFunctionBuilder.kt +170 -0
- package/android/src/main/java/expo/modules/kotlin/functions/AsyncFunctionWithPromise.kt +15 -0
- package/android/src/main/java/expo/modules/kotlin/functions/AsyncSuspendFunction.kt +36 -0
- package/android/src/main/java/expo/modules/kotlin/modules/DefinitionMarker.kt +4 -0
- package/android/src/main/java/expo/modules/kotlin/modules/Module.kt +17 -2
- package/android/src/main/java/expo/modules/kotlin/modules/ModuleDefinitionBuilder.kt +416 -43
- package/android/src/main/java/expo/modules/kotlin/modules/ModuleDefinitionData.kt +2 -2
- package/android/src/main/java/expo/modules/kotlin/records/FieldValidator.kt +139 -0
- package/android/src/main/java/expo/modules/kotlin/records/RecordTypeConverter.kt +71 -15
- package/android/src/main/java/expo/modules/kotlin/records/Required.kt +5 -0
- package/android/src/main/java/expo/modules/kotlin/records/ValidationBinder.kt +110 -0
- package/android/src/main/java/expo/modules/kotlin/records/Validators.kt +61 -0
- package/android/src/main/java/expo/modules/kotlin/types/ArrayTypeConverter.kt +11 -5
- package/android/src/main/java/expo/modules/kotlin/types/JSTypeConverter.kt +35 -0
- package/android/src/main/java/expo/modules/kotlin/types/JSTypeConverterHelper.kt +148 -0
- package/android/src/main/java/expo/modules/kotlin/types/ListTypeConverter.kt +10 -4
- package/android/src/main/java/expo/modules/kotlin/types/MapTypeConverter.kt +12 -6
- package/android/src/main/java/expo/modules/kotlin/types/PairTypeConverter.kt +29 -13
- package/android/src/main/java/expo/modules/kotlin/types/TypeConverter.kt +2 -1
- package/android/src/main/java/expo/modules/kotlin/types/TypeConverterProvider.kt +9 -1
- package/android/src/main/java/expo/modules/kotlin/views/CallbacksDefinition.kt +3 -0
- package/android/src/main/java/expo/modules/kotlin/views/GroupViewManagerWrapper.kt +71 -0
- package/android/src/main/java/expo/modules/kotlin/views/SimpleViewManagerWrapper.kt +22 -0
- package/android/src/main/java/expo/modules/kotlin/views/ViewGroupDefinition.kt +18 -0
- package/android/src/main/java/expo/modules/kotlin/views/ViewGroupDefinitionBuilder.kt +114 -0
- package/android/src/main/java/expo/modules/kotlin/views/ViewManagerDefinition.kt +30 -2
- package/android/src/main/java/expo/modules/kotlin/views/ViewManagerDefinitionBuilder.kt +81 -2
- package/android/src/main/java/expo/modules/kotlin/views/ViewManagerWrapperDelegate.kt +62 -2
- package/build/EventEmitter.d.ts +1 -0
- package/build/EventEmitter.d.ts.map +1 -0
- package/build/NativeModulesProxy.d.ts +1 -0
- package/build/NativeModulesProxy.d.ts.map +1 -0
- package/build/NativeModulesProxy.native.d.ts +1 -4
- package/build/NativeModulesProxy.native.d.ts.map +1 -0
- package/build/NativeModulesProxy.native.js +1 -14
- package/build/NativeModulesProxy.native.js.map +1 -1
- package/build/NativeModulesProxy.types.d.ts +1 -3
- package/build/NativeModulesProxy.types.d.ts.map +1 -0
- package/build/NativeModulesProxy.types.js.map +1 -1
- package/build/NativeViewManagerAdapter.d.ts +1 -0
- package/build/NativeViewManagerAdapter.d.ts.map +1 -0
- package/build/NativeViewManagerAdapter.native.d.ts +1 -0
- package/build/NativeViewManagerAdapter.native.d.ts.map +1 -0
- package/build/NativeViewManagerAdapter.native.js +9 -33
- package/build/NativeViewManagerAdapter.native.js.map +1 -1
- package/build/PermissionsHook.d.ts +1 -0
- package/build/PermissionsHook.d.ts.map +1 -0
- package/build/PermissionsInterface.d.ts +1 -0
- package/build/PermissionsInterface.d.ts.map +1 -0
- package/build/Platform.d.ts +1 -0
- package/build/Platform.d.ts.map +1 -0
- package/build/SyntheticPlatformEmitter.d.ts +1 -0
- package/build/SyntheticPlatformEmitter.d.ts.map +1 -0
- package/build/SyntheticPlatformEmitter.web.d.ts +1 -0
- package/build/SyntheticPlatformEmitter.web.d.ts.map +1 -0
- package/build/deprecate.d.ts +1 -0
- package/build/deprecate.d.ts.map +1 -0
- package/build/environment/browser.d.ts +1 -0
- package/build/environment/browser.d.ts.map +1 -0
- package/build/environment/browser.web.d.ts +1 -0
- package/build/environment/browser.web.d.ts.map +1 -0
- package/build/errors/CodedError.d.ts +1 -0
- package/build/errors/CodedError.d.ts.map +1 -0
- package/build/errors/UnavailabilityError.d.ts +1 -0
- package/build/errors/UnavailabilityError.d.ts.map +1 -0
- package/build/index.d.ts +3 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -1
- package/build/requireNativeModule.d.ts +16 -0
- package/build/requireNativeModule.d.ts.map +1 -0
- package/build/requireNativeModule.js +18 -0
- package/build/requireNativeModule.js.map +1 -0
- package/build/sweet/NativeErrorManager.d.ts +3 -0
- package/build/sweet/NativeErrorManager.d.ts.map +1 -0
- package/build/sweet/NativeErrorManager.js +3 -0
- package/build/sweet/NativeErrorManager.js.map +1 -0
- package/build/sweet/setUpErrorManager.fx.d.ts +2 -0
- package/build/sweet/setUpErrorManager.fx.d.ts.map +1 -0
- package/build/sweet/setUpErrorManager.fx.js +11 -0
- package/build/sweet/setUpErrorManager.fx.js.map +1 -0
- package/ios/AppDelegates/EXAppDelegatesLoader.m +4 -8
- package/ios/AppDelegates/ExpoAppDelegate.swift +22 -20
- package/ios/EXAppDefines.h +1 -0
- package/ios/EXAppDefines.m +6 -0
- package/ios/EXUtilities.h +2 -0
- package/ios/EXUtilities.m +12 -0
- package/ios/ExpoModulesCore.h +4 -0
- package/ios/ExpoModulesCore.podspec +4 -2
- package/ios/Interfaces/FileSystem/EXFileSystemInterface.h +1 -1
- package/ios/Interfaces/TaskManager/EXTaskServiceInterface.h +1 -0
- package/ios/JSI/{JSIConversions.h → EXJSIConversions.h} +5 -0
- package/ios/JSI/{JSIConversions.mm → EXJSIConversions.mm} +21 -1
- package/ios/JSI/{JSIInstaller.h → EXJSIInstaller.h} +10 -0
- package/ios/JSI/EXJSIInstaller.mm +17 -0
- package/ios/JSI/EXJSIUtils.h +19 -0
- package/ios/JSI/EXJSIUtils.mm +89 -0
- package/ios/JSI/EXJavaScriptObject.h +97 -0
- package/ios/JSI/EXJavaScriptObject.mm +121 -0
- package/ios/JSI/EXJavaScriptRuntime.h +73 -0
- package/ios/JSI/EXJavaScriptRuntime.mm +153 -0
- package/ios/JSI/EXJavaScriptValue.h +57 -0
- package/ios/JSI/EXJavaScriptValue.mm +166 -0
- package/ios/JSI/ExpoModulesHostObject.h +33 -0
- package/ios/JSI/ExpoModulesHostObject.mm +41 -0
- package/ios/JSI/JavaScriptRuntime.swift +32 -0
- package/ios/JSI/JavaScriptValue.swift +94 -0
- package/ios/ModuleRegistryAdapter/EXModuleRegistryAdapter.m +3 -23
- package/ios/NativeModulesProxy/EXNativeModulesProxy.h +2 -2
- package/ios/NativeModulesProxy/EXNativeModulesProxy.mm +101 -75
- package/ios/RCTComponentData+Privates.h +12 -0
- package/ios/ReactDelegates/EXReactCompatibleHelpers.h +18 -0
- package/ios/ReactDelegates/EXReactCompatibleHelpers.m +19 -0
- package/ios/ReactDelegates/ExpoReactDelegate.swift +3 -3
- package/ios/ReactDelegates/ExpoReactDelegateHandler.swift +4 -4
- package/ios/ReactDelegates/ModulePriorities.swift +1 -1
- package/ios/Swift/AppContext.swift +57 -4
- package/ios/Swift/Arguments/AnyArgumentType.swift +1 -1
- package/ios/Swift/Arguments/ArgumentType.swift +4 -0
- package/ios/Swift/Arguments/Convertibles.swift +13 -13
- package/ios/Swift/Arguments/Types/EnumArgumentType.swift +11 -17
- package/ios/Swift/Arguments/Types/PromiseArgumentType.swift +1 -1
- package/ios/Swift/Arguments/Types/RawArgumentType.swift +2 -2
- package/ios/Swift/Conversions.swift +51 -56
- package/ios/Swift/EventListener.swift +8 -10
- package/ios/Swift/Events/Callback.swift +66 -0
- package/ios/Swift/Events/Event.swift +43 -0
- package/ios/Swift/Exceptions/ChainableException.swift +51 -0
- package/ios/Swift/{CodedError.swift → Exceptions/CodedError.swift} +1 -12
- package/ios/Swift/Exceptions/Exception.swift +62 -0
- package/ios/Swift/Exceptions/ExceptionOrigin.swift +28 -0
- package/ios/Swift/Exceptions/GenericException.swift +20 -0
- package/ios/Swift/Exceptions/UnexpectedException.swift +16 -0
- package/ios/Swift/Functions/AnyFunction.swift +16 -1
- package/ios/Swift/Functions/AsyncFunctionComponent.swift +182 -0
- package/ios/Swift/Functions/ConcreteFunction.swift +52 -59
- package/ios/Swift/Functions/SyncFunctionComponent.swift +181 -0
- package/ios/Swift/JavaScriptUtils.swift +99 -0
- package/ios/Swift/ModuleHolder.swift +69 -18
- package/ios/Swift/ModuleRegistry.swift +4 -1
- package/ios/Swift/Modules/AnyModule.swift +0 -1
- package/ios/Swift/Modules/ModuleDefinition.swift +4 -13
- package/ios/Swift/Modules/ModuleDefinitionBuilder.swift +0 -1
- package/ios/Swift/Modules/ModuleDefinitionComponents.swift +54 -220
- package/ios/Swift/ModulesProvider.swift +3 -11
- package/ios/Swift/Objects/ObjectDefinition.swift +30 -0
- package/ios/Swift/Objects/ObjectDefinitionComponents.swift +257 -0
- package/ios/Swift/Promise.swift +8 -3
- package/ios/Swift/Records/AnyField.swift +7 -0
- package/ios/Swift/Records/Field.swift +24 -19
- package/ios/Swift/Records/FieldOption.swift +1 -1
- package/ios/Swift/Records/Record.swift +12 -4
- package/ios/Swift/SwiftInteropBridge.swift +53 -15
- package/ios/Swift/Views/AnyViewProp.swift +1 -1
- package/ios/Swift/Views/ComponentData.swift +96 -0
- package/ios/Swift/Views/ConcreteViewProp.swift +6 -8
- package/ios/Swift/Views/ExpoView.swift +8 -0
- package/ios/Swift/Views/ViewFactory.swift +1 -1
- package/ios/Swift/Views/ViewManagerDefinition.swift +23 -2
- package/ios/Swift/Views/ViewManagerDefinitionBuilder.swift +0 -1
- package/ios/Swift/Views/ViewManagerDefinitionComponents.swift +49 -0
- package/ios/Swift/Views/ViewModuleWrapper.swift +5 -2
- package/ios/Swift.h +5 -0
- package/ios/Tests/ArgumentTypeSpec.swift +5 -7
- package/ios/Tests/ConstantsSpec.swift +6 -7
- package/ios/Tests/ConvertiblesSpec.swift +35 -36
- package/ios/Tests/ExceptionsSpec.swift +111 -0
- package/ios/Tests/ExpoModulesSpec.swift +75 -0
- package/ios/Tests/FunctionSpec.swift +21 -25
- package/ios/Tests/FunctionWithConvertiblesSpec.swift +4 -5
- package/ios/Tests/JavaScriptObjectSpec.swift +97 -0
- package/ios/Tests/JavaScriptRuntimeSpec.swift +94 -0
- package/ios/Tests/Mocks/ModuleMocks.swift +1 -1
- package/ios/Tests/Mocks/ModulesProviderMock.swift +0 -1
- package/ios/Tests/ModuleEventListenersSpec.swift +16 -17
- package/ios/Tests/ModuleRegistrySpec.swift +2 -3
- package/ios/Tests/RecordSpec.swift +9 -20
- package/package.json +3 -3
- package/src/NativeModulesProxy.native.ts +2 -22
- package/src/NativeModulesProxy.types.ts +0 -8
- package/src/NativeViewManagerAdapter.native.tsx +12 -28
- package/src/index.ts +4 -0
- package/src/requireNativeModule.ts +29 -0
- package/src/sweet/NativeErrorManager.ts +2 -0
- package/src/sweet/setUpErrorManager.fx.ts +12 -0
- package/android/src/main/java/expo/modules/kotlin/events/KEventEmitterWrapper.kt +0 -26
- package/android/src/main/java/expo/modules/kotlin/methods/Method.kt +0 -14
- package/android/src/main/java/expo/modules/kotlin/methods/PromiseMethod.kt +0 -15
- package/ios/JSI/ExpoModulesProxySpec.h +0 -24
- package/ios/JSI/ExpoModulesProxySpec.mm +0 -135
- package/ios/JSI/JSIInstaller.mm +0 -22
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
// Copyright 2022-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesTestCore
|
|
4
|
+
|
|
5
|
+
@testable import ExpoModulesCore
|
|
6
|
+
|
|
7
|
+
class ExpoModulesSpec: ExpoSpec {
|
|
8
|
+
override func spec() {
|
|
9
|
+
let appContext = AppContext.create()
|
|
10
|
+
let interopBridge = SwiftInteropBridge(appContext: appContext)
|
|
11
|
+
let runtime = appContext.runtime
|
|
12
|
+
let testModuleName = "TestModule"
|
|
13
|
+
let testFunctionName = "testFunction"
|
|
14
|
+
let constantsDict: [String: Any] = [
|
|
15
|
+
"expo": "is cool",
|
|
16
|
+
"sdk": 45,
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
beforeSuite {
|
|
20
|
+
try! appContext.installExpoModulesHostObject(interopBridge)
|
|
21
|
+
|
|
22
|
+
appContext.moduleRegistry.register(holder: mockModuleHolder(appContext) {
|
|
23
|
+
Name(testModuleName)
|
|
24
|
+
|
|
25
|
+
Constants(constantsDict)
|
|
26
|
+
|
|
27
|
+
Function(testFunctionName) { Double.pi }
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe("host object") {
|
|
32
|
+
it("is defined") {
|
|
33
|
+
expect(try! runtime?.eval("'ExpoModules' in this").asBool()) === true
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
it("has native module defined") {
|
|
37
|
+
expect(try! runtime?.eval("'\(testModuleName)' in ExpoModules").asBool()) === true
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
it("can access native module") {
|
|
41
|
+
let nativeModule = try! runtime?.eval("ExpoModules.\(testModuleName)")
|
|
42
|
+
expect(nativeModule?.isUndefined()) == false
|
|
43
|
+
expect(nativeModule?.isObject()) == true
|
|
44
|
+
expect(nativeModule?.getRaw()).notTo(beNil())
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
it("has keys for registered modules") {
|
|
48
|
+
let registeredModuleNames = appContext.moduleRegistry.getModuleNames()
|
|
49
|
+
let keys = try! runtime?.eval("Object.keys(ExpoModules)").asArray().compactMap {
|
|
50
|
+
return try! $0?.asString()
|
|
51
|
+
}
|
|
52
|
+
expect(keys).to(contain(registeredModuleNames))
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
describe("module") {
|
|
57
|
+
it("exposes constants") {
|
|
58
|
+
let dict = try! runtime!.eval("ExpoModules.TestModule").asDict()
|
|
59
|
+
|
|
60
|
+
dict.forEach { (key: String, value: Any) in
|
|
61
|
+
expect(value) === dict[key]!
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
it("has function") {
|
|
66
|
+
expect(try! runtime?.eval("typeof ExpoModules.TestModule.\(testFunctionName)").asString()) == "function"
|
|
67
|
+
expect(try! runtime?.eval("ExpoModules.TestModule.\(testFunctionName)").isFunction()) == true
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
it("calls function") {
|
|
71
|
+
expect(try! runtime?.eval("ExpoModules.TestModule.\(testFunctionName)()").asDouble()) == Double.pi
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Nimble
|
|
1
|
+
import ExpoModulesTestCore
|
|
3
2
|
|
|
4
3
|
@testable import ExpoModulesCore
|
|
5
4
|
|
|
6
|
-
class FunctionSpec:
|
|
5
|
+
class FunctionSpec: ExpoSpec {
|
|
7
6
|
override func spec() {
|
|
8
7
|
let appContext = AppContext()
|
|
9
8
|
let functionName = "test function name"
|
|
@@ -11,11 +10,11 @@ class FunctionSpec: QuickSpec {
|
|
|
11
10
|
func testFunctionReturning<T: Equatable>(value returnValue: T) {
|
|
12
11
|
waitUntil { done in
|
|
13
12
|
mockModuleHolder(appContext) {
|
|
14
|
-
|
|
13
|
+
AsyncFunction(functionName) {
|
|
15
14
|
return returnValue
|
|
16
15
|
}
|
|
17
16
|
}
|
|
18
|
-
.call(function: functionName, args: []) { value,
|
|
17
|
+
.call(function: functionName, args: []) { value, _ in
|
|
19
18
|
expect(value).notTo(beNil())
|
|
20
19
|
expect(value).to(beAKindOf(T.self))
|
|
21
20
|
expect(value as? T).to(equal(returnValue))
|
|
@@ -27,7 +26,7 @@ class FunctionSpec: QuickSpec {
|
|
|
27
26
|
it("is called") {
|
|
28
27
|
waitUntil { done in
|
|
29
28
|
mockModuleHolder(appContext) {
|
|
30
|
-
|
|
29
|
+
AsyncFunction(functionName) {
|
|
31
30
|
done()
|
|
32
31
|
}
|
|
33
32
|
}
|
|
@@ -42,7 +41,7 @@ class FunctionSpec: QuickSpec {
|
|
|
42
41
|
}
|
|
43
42
|
|
|
44
43
|
it("returns int values") {
|
|
45
|
-
testFunctionReturning(value:
|
|
44
|
+
testFunctionReturning(value: 1_234)
|
|
46
45
|
testFunctionReturning(value: [2, 1, 3, 7])
|
|
47
46
|
}
|
|
48
47
|
|
|
@@ -60,7 +59,7 @@ class FunctionSpec: QuickSpec {
|
|
|
60
59
|
let str: String? = nil
|
|
61
60
|
|
|
62
61
|
mockModuleHolder(appContext) {
|
|
63
|
-
|
|
62
|
+
AsyncFunction(functionName) { (a: String?) in
|
|
64
63
|
expect(a == nil) == true
|
|
65
64
|
}
|
|
66
65
|
}
|
|
@@ -71,7 +70,7 @@ class FunctionSpec: QuickSpec {
|
|
|
71
70
|
let array: [[String]] = [["expo"]]
|
|
72
71
|
|
|
73
72
|
mockModuleHolder(appContext) {
|
|
74
|
-
|
|
73
|
+
AsyncFunction(functionName) { (a: [[String]]) in
|
|
75
74
|
expect(a.first!.first) == array.first!.first
|
|
76
75
|
}
|
|
77
76
|
}
|
|
@@ -81,7 +80,7 @@ class FunctionSpec: QuickSpec {
|
|
|
81
80
|
describe("converting dicts to records") {
|
|
82
81
|
struct TestRecord: Record {
|
|
83
82
|
@Field var property: String = "expo"
|
|
84
|
-
@Field var optionalProperty: Int?
|
|
83
|
+
@Field var optionalProperty: Int?
|
|
85
84
|
@Field("propertyWithCustomKey") var customKeyProperty: String = "expo"
|
|
86
85
|
}
|
|
87
86
|
let dict = [
|
|
@@ -92,11 +91,11 @@ class FunctionSpec: QuickSpec {
|
|
|
92
91
|
it("converts to simple record when passed as an argument") {
|
|
93
92
|
waitUntil { done in
|
|
94
93
|
mockModuleHolder(appContext) {
|
|
95
|
-
|
|
94
|
+
AsyncFunction(functionName) { (a: TestRecord) in
|
|
96
95
|
return a.property
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
|
-
.call(function: functionName, args: [dict]) { value,
|
|
98
|
+
.call(function: functionName, args: [dict]) { value, _ in
|
|
100
99
|
expect(value).notTo(beNil())
|
|
101
100
|
expect(value).to(beAKindOf(String.self))
|
|
102
101
|
expect(value).to(be(dict["property"]))
|
|
@@ -108,11 +107,11 @@ class FunctionSpec: QuickSpec {
|
|
|
108
107
|
it("converts to record with custom key") {
|
|
109
108
|
waitUntil { done in
|
|
110
109
|
mockModuleHolder(appContext) {
|
|
111
|
-
|
|
110
|
+
AsyncFunction(functionName) { (a: TestRecord) in
|
|
112
111
|
return a.customKeyProperty
|
|
113
112
|
}
|
|
114
113
|
}
|
|
115
|
-
.call(function: functionName, args: [dict]) { value,
|
|
114
|
+
.call(function: functionName, args: [dict]) { value, _ in
|
|
116
115
|
expect(value).notTo(beNil())
|
|
117
116
|
expect(value).to(beAKindOf(String.self))
|
|
118
117
|
expect(value).to(be(dict["propertyWithCustomKey"]))
|
|
@@ -124,11 +123,11 @@ class FunctionSpec: QuickSpec {
|
|
|
124
123
|
it("returns the record back") {
|
|
125
124
|
waitUntil { done in
|
|
126
125
|
mockModuleHolder(appContext) {
|
|
127
|
-
|
|
126
|
+
AsyncFunction(functionName) { (a: TestRecord) in
|
|
128
127
|
return a.toDictionary()
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
|
-
.call(function: functionName, args: [dict]) { value,
|
|
130
|
+
.call(function: functionName, args: [dict]) { value, _ in
|
|
132
131
|
expect(value).notTo(beNil())
|
|
133
132
|
expect(value).to(beAKindOf(Record.Dict.self))
|
|
134
133
|
|
|
@@ -145,16 +144,14 @@ class FunctionSpec: QuickSpec {
|
|
|
145
144
|
it("throws when called with more arguments than expected") {
|
|
146
145
|
waitUntil { done in
|
|
147
146
|
mockModuleHolder(appContext) {
|
|
148
|
-
|
|
147
|
+
AsyncFunction(functionName) { (_: Int) in
|
|
149
148
|
return "something"
|
|
150
149
|
}
|
|
151
150
|
}
|
|
152
151
|
// Function expects one argument, let's give it more.
|
|
153
|
-
.call(function: functionName, args: [1, 2]) {
|
|
152
|
+
.call(function: functionName, args: [1, 2]) { _, error in
|
|
154
153
|
expect(error).notTo(beNil())
|
|
155
|
-
expect(error).to(beAKindOf(
|
|
156
|
-
expect(error?.code).to(equal("ERR_INVALID_ARGS_NUMBER"))
|
|
157
|
-
expect(error?.description).to(equal(InvalidArgsNumberError(received: 2, expected: 1).description))
|
|
154
|
+
expect(error).to(beAKindOf(InvalidArgsNumberException.self))
|
|
158
155
|
done()
|
|
159
156
|
}
|
|
160
157
|
}
|
|
@@ -163,16 +160,15 @@ class FunctionSpec: QuickSpec {
|
|
|
163
160
|
it("throws when called with arguments of incompatible types") {
|
|
164
161
|
waitUntil { done in
|
|
165
162
|
mockModuleHolder(appContext) {
|
|
166
|
-
|
|
163
|
+
AsyncFunction(functionName) { (_: String) in
|
|
167
164
|
return "something"
|
|
168
165
|
}
|
|
169
166
|
}
|
|
170
167
|
// Function expects a string, let's give it a number.
|
|
171
168
|
.call(function: functionName, args: [1]) { value, error in
|
|
172
169
|
expect(error).notTo(beNil())
|
|
173
|
-
expect(error).to(beAKindOf(
|
|
174
|
-
expect(error
|
|
175
|
-
expect(error?.description).to(equal(Conversions.CastingError<String>(value: 1).description))
|
|
170
|
+
expect(error).to(beAKindOf(ArgumentCastException.self))
|
|
171
|
+
expect((error as! Exception).isCausedBy(Conversions.CastingException<String>.self)) == true
|
|
176
172
|
done()
|
|
177
173
|
}
|
|
178
174
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
// Copyright 2018-present 650 Industries. All rights reserved.
|
|
2
2
|
|
|
3
3
|
import CoreGraphics
|
|
4
|
-
import
|
|
5
|
-
import Nimble
|
|
4
|
+
import ExpoModulesTestCore
|
|
6
5
|
|
|
7
6
|
@testable import ExpoModulesCore
|
|
8
7
|
|
|
9
|
-
class FunctionWithConvertiblesSpec:
|
|
8
|
+
class FunctionWithConvertiblesSpec: ExpoSpec {
|
|
10
9
|
override func spec() {
|
|
11
10
|
let appContext = AppContext()
|
|
12
11
|
let functionName = "function"
|
|
@@ -18,7 +17,7 @@ class FunctionWithConvertiblesSpec: QuickSpec {
|
|
|
18
17
|
let height = 592.1
|
|
19
18
|
|
|
20
19
|
mockModuleHolder(appContext) {
|
|
21
|
-
|
|
20
|
+
AsyncFunction(functionName) { (point: CGPoint, size: CGSize, vector: CGVector, rect: CGRect) in
|
|
22
21
|
expect(point.x) == x
|
|
23
22
|
expect(point.y) == y
|
|
24
23
|
expect(size.width) == width
|
|
@@ -48,7 +47,7 @@ class FunctionWithConvertiblesSpec: QuickSpec {
|
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
mockModuleHolder(appContext) {
|
|
51
|
-
|
|
50
|
+
AsyncFunction(functionName) { (color1: CGColor, color2: CGColor, color3: CGColor, color4: CGColor) in
|
|
52
51
|
testColorComponents(color1, 0x2A, 0x4B, 0x5D, 0xFF)
|
|
53
52
|
testColorComponents(color2, 0x11, 0xFF, 0x00, 0xDD)
|
|
54
53
|
testColorComponents(color3, 0x66, 0x00, 0xCC, 0xAA)
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Copyright 2022-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import ExpoModulesTestCore
|
|
4
|
+
|
|
5
|
+
@testable import ExpoModulesCore
|
|
6
|
+
|
|
7
|
+
final class JavaScriptObjectSpec: ExpoSpec {
|
|
8
|
+
override func spec() {
|
|
9
|
+
let runtime = JavaScriptRuntime()
|
|
10
|
+
var object: JavaScriptObject?
|
|
11
|
+
|
|
12
|
+
let key = "expo"
|
|
13
|
+
let value1 = "💙"
|
|
14
|
+
let value2 = "💛"
|
|
15
|
+
|
|
16
|
+
beforeEach {
|
|
17
|
+
object = runtime.createObject()
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
describe("hasProperty") {
|
|
21
|
+
it("returns false when the property is missing") {
|
|
22
|
+
expect(object?.hasProperty(key)) == false
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
it("returns true when the property exists") {
|
|
26
|
+
object?.setProperty(key, value: value1)
|
|
27
|
+
expect(object?.hasProperty(key)) == true
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
it("returns true when the property is explicitly set to undefined") {
|
|
31
|
+
object?.setProperty(key, value: nil)
|
|
32
|
+
expect(object?.hasProperty(key)) == true
|
|
33
|
+
expect(object?.getProperty(key).isUndefined()) == true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
describe("getProperty") {
|
|
38
|
+
it("returns correct value") {
|
|
39
|
+
object?.setProperty(key, value: value1)
|
|
40
|
+
expect(try! object?.getProperty(key).asString()) == value1
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
it("returns undefined") {
|
|
44
|
+
expect(object?.getProperty("bar").isUndefined()) == true
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
describe("setProperty") {
|
|
49
|
+
it("sets") {
|
|
50
|
+
object?.setProperty(key, value: value1)
|
|
51
|
+
expect(try! object?.getProperty(key).asString()) == value1
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
it("overrides") {
|
|
55
|
+
object?.setProperty(key, value: value1)
|
|
56
|
+
object?.setProperty(key, value: value2)
|
|
57
|
+
expect(try! object?.getProperty(key).asString()) == value2
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
it("unsets") {
|
|
61
|
+
object?.setProperty(key, value: nil)
|
|
62
|
+
expect(object?.getProperty(key).isUndefined()) == true
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
describe("defineProperty") {
|
|
67
|
+
it("defines non-enumerable property") {
|
|
68
|
+
object?.defineProperty(key, value: value1, options: [])
|
|
69
|
+
expect(try! object?.getProperty(key).asString()) == value1
|
|
70
|
+
expect(object?.getPropertyNames()).notTo(contain(key))
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
it("defines enumerable property") {
|
|
74
|
+
// When the property is enumerable, it is listed in the property names
|
|
75
|
+
object?.defineProperty(key, value: value1, options: .enumerable)
|
|
76
|
+
expect(try! object?.getProperty(key).asString()) == value1
|
|
77
|
+
expect(object?.getPropertyNames()).to(contain(key))
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
it("defines configurable property") {
|
|
81
|
+
// Configurable allows to redefine the property
|
|
82
|
+
object?.defineProperty(key, value: value1, options: .configurable)
|
|
83
|
+
expect(try! object?.getProperty(key).asString()) == value1
|
|
84
|
+
object?.defineProperty(key, value: value2, options: [])
|
|
85
|
+
expect(try! object?.getProperty(key).asString()) == value2
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
it("defines writable property") {
|
|
89
|
+
// Writable allows changing the property
|
|
90
|
+
object?.defineProperty(key, value: value1, options: .writable)
|
|
91
|
+
expect(try! object?.getProperty(key).asString()) == value1
|
|
92
|
+
object?.setProperty(key, value: value2)
|
|
93
|
+
expect(try! object?.getProperty(key).asString()) == value2
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import ExpoModulesTestCore
|
|
2
|
+
|
|
3
|
+
@testable import ExpoModulesCore
|
|
4
|
+
|
|
5
|
+
class JavaScriptRuntimeSpec: ExpoSpec {
|
|
6
|
+
override func spec() {
|
|
7
|
+
let runtime = JavaScriptRuntime()
|
|
8
|
+
|
|
9
|
+
it("has global object accessible") {
|
|
10
|
+
expect(runtime.global) !== nil
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
describe("eval") {
|
|
14
|
+
it("returns undefined") {
|
|
15
|
+
let undefined = try! runtime.eval("undefined")
|
|
16
|
+
expect(undefined.isUndefined()) == true
|
|
17
|
+
expect(undefined.kind) == .undefined
|
|
18
|
+
expect(undefined.isNull()) == false
|
|
19
|
+
expect(undefined.getRaw()).to(beNil())
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
it("returns null") {
|
|
23
|
+
let null = try! runtime.eval("null")
|
|
24
|
+
expect(null.isNull()) == true
|
|
25
|
+
expect(null.kind) == .null
|
|
26
|
+
expect(null.getRaw()).to(beNil())
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
it("returns bool") {
|
|
30
|
+
let boolTrue = try! runtime.eval("true")
|
|
31
|
+
let boolFalse = try! runtime.eval("false")
|
|
32
|
+
expect(boolTrue.isBool()) == true
|
|
33
|
+
expect(boolFalse.isBool()) == true
|
|
34
|
+
expect(boolTrue.kind) == .bool
|
|
35
|
+
expect(boolFalse.kind) == .bool
|
|
36
|
+
expect(try! boolTrue.asBool()) == true
|
|
37
|
+
expect(try! boolFalse.asBool()) == false
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
it("returns number") {
|
|
41
|
+
let number = try! runtime.eval("1.23")
|
|
42
|
+
expect(number.isNumber()) == true
|
|
43
|
+
expect(number.kind) == .number
|
|
44
|
+
expect(try! number.asInt()) == 1
|
|
45
|
+
expect(try! number.asDouble()) == 1.23
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
it("returns string") {
|
|
49
|
+
let string = try! runtime.eval("'foobar'")
|
|
50
|
+
expect(string.isString()) == true
|
|
51
|
+
expect(string.kind) == .string
|
|
52
|
+
expect(try! string.asString()) == "foobar"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
it("returns array") {
|
|
56
|
+
let array = try! runtime.eval("(['foo', 'bar'])")
|
|
57
|
+
expect(array.isObject()) == true
|
|
58
|
+
expect(array.kind) == .object
|
|
59
|
+
expect(try! array.asArray().map { try $0?.asString() }) == ["foo", "bar"]
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
it("returns dict") {
|
|
63
|
+
let dict1 = try! runtime.eval("({ 'foo': 123 })")
|
|
64
|
+
let dict2 = try! runtime.eval("({ 'foo': 'bar' })")
|
|
65
|
+
expect(dict1.isObject()) == true
|
|
66
|
+
expect(dict2.isObject()) == true
|
|
67
|
+
expect(dict1.kind) == .object
|
|
68
|
+
expect(dict2.kind) == .object
|
|
69
|
+
expect(try! dict1.asDict() as? [String: Int]) == ["foo": 123]
|
|
70
|
+
expect(try! dict2.asDict() as? [String: String]) == ["foo": "bar"]
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
it("returns function") {
|
|
74
|
+
let function = try! runtime.eval("(function() {})")
|
|
75
|
+
expect(function.isObject()) == true
|
|
76
|
+
expect(function.isFunction()) == true
|
|
77
|
+
expect(function.kind) == .function
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
it("returns symbol") {
|
|
81
|
+
let symbol = try! runtime.eval("Symbol('foo')")
|
|
82
|
+
expect(symbol.isSymbol()) == true
|
|
83
|
+
expect(symbol.kind) == .symbol
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
it("throws evaluation exception") {
|
|
87
|
+
expect({ try runtime.eval("foo") }).to(throwError { error in
|
|
88
|
+
expect(error).to(beAKindOf(JavaScriptEvalException.self))
|
|
89
|
+
expect((error as! JavaScriptEvalException).reason).to(contain("Can't find variable: foo"))
|
|
90
|
+
})
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -32,7 +32,7 @@ class CustomModule: Module {
|
|
|
32
32
|
typealias MockedDefinitionFunc = (CustomModule) -> ModuleDefinition
|
|
33
33
|
|
|
34
34
|
func mockModuleHolder(_ appContext: AppContext, @ModuleDefinitionBuilder _ definitionBody: @escaping () -> ModuleDefinition) -> ModuleHolder {
|
|
35
|
-
return ModuleHolder(appContext: appContext, module: CustomModule(appContext: appContext, {
|
|
35
|
+
return ModuleHolder(appContext: appContext, module: CustomModule(appContext: appContext, { _ in definitionBody() }))
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
func mockModuleHolder(_ appContext: AppContext, @ModuleDefinitionBuilder _ definitionBody: @escaping (CustomModule) -> ModuleDefinition) -> ModuleHolder {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Nimble
|
|
1
|
+
import ExpoModulesTestCore
|
|
3
2
|
|
|
4
3
|
@testable import ExpoModulesCore
|
|
5
4
|
|
|
@@ -11,7 +10,7 @@ import Nimble
|
|
|
11
10
|
|
|
12
11
|
NOTE: Each test registers the module because only registered modules can capture events.
|
|
13
12
|
*/
|
|
14
|
-
class ModuleEventListenersSpec:
|
|
13
|
+
class ModuleEventListenersSpec: ExpoSpec {
|
|
15
14
|
override func spec() {
|
|
16
15
|
var appContext: AppContext!
|
|
17
16
|
|
|
@@ -19,22 +18,22 @@ class ModuleEventListenersSpec: QuickSpec {
|
|
|
19
18
|
appContext = AppContext()
|
|
20
19
|
}
|
|
21
20
|
|
|
22
|
-
it("calls
|
|
21
|
+
it("calls OnCreate once the module instance is created") {
|
|
23
22
|
waitUntil { done in
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
_ = mockModuleHolder(appContext) {
|
|
24
|
+
OnCreate {
|
|
26
25
|
done()
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
|
|
32
|
-
it("calls
|
|
31
|
+
it("calls OnDestroy once the module is about to be deallocated") {
|
|
33
32
|
waitUntil { done in
|
|
34
33
|
let moduleName = "mockedModule"
|
|
35
34
|
let holder = mockModuleHolder(appContext) {
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
Name(moduleName)
|
|
36
|
+
OnDestroy {
|
|
38
37
|
done()
|
|
39
38
|
}
|
|
40
39
|
}
|
|
@@ -45,10 +44,10 @@ class ModuleEventListenersSpec: QuickSpec {
|
|
|
45
44
|
}
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
it("calls
|
|
47
|
+
it("calls OnAppContextDestroys once the context destroys") {
|
|
49
48
|
waitUntil { done in
|
|
50
49
|
let holder = mockModuleHolder(appContext) {
|
|
51
|
-
|
|
50
|
+
OnAppContextDestroys {
|
|
52
51
|
done()
|
|
53
52
|
}
|
|
54
53
|
}
|
|
@@ -70,10 +69,10 @@ class ModuleEventListenersSpec: QuickSpec {
|
|
|
70
69
|
}
|
|
71
70
|
}
|
|
72
71
|
|
|
73
|
-
it("calls
|
|
72
|
+
it("calls OnAppEntersForeground when system's willEnterForegroundNotification is sent") {
|
|
74
73
|
waitUntil { done in
|
|
75
74
|
let holder = mockModuleHolder(appContext) {
|
|
76
|
-
|
|
75
|
+
OnAppEntersForeground {
|
|
77
76
|
done()
|
|
78
77
|
}
|
|
79
78
|
}
|
|
@@ -82,10 +81,10 @@ class ModuleEventListenersSpec: QuickSpec {
|
|
|
82
81
|
}
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
it("calls
|
|
84
|
+
it("calls OnAppBecomesActive when system's didBecomeActiveNotification is sent") {
|
|
86
85
|
waitUntil { done in
|
|
87
86
|
let holder = mockModuleHolder(appContext) {
|
|
88
|
-
|
|
87
|
+
OnAppBecomesActive {
|
|
89
88
|
done()
|
|
90
89
|
}
|
|
91
90
|
}
|
|
@@ -94,10 +93,10 @@ class ModuleEventListenersSpec: QuickSpec {
|
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
|
|
97
|
-
it("calls
|
|
96
|
+
it("calls OnAppEntersBackground when system's didEnterBackgroundNotification is sent") {
|
|
98
97
|
waitUntil { done in
|
|
99
98
|
let holder = mockModuleHolder(appContext) {
|
|
100
|
-
|
|
99
|
+
OnAppEntersBackground {
|
|
101
100
|
done()
|
|
102
101
|
}
|
|
103
102
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import Nimble
|
|
1
|
+
import ExpoModulesTestCore
|
|
3
2
|
|
|
4
3
|
@testable import ExpoModulesCore
|
|
5
4
|
|
|
6
|
-
class RecordSpec:
|
|
5
|
+
class RecordSpec: ExpoSpec {
|
|
7
6
|
override func spec() {
|
|
8
7
|
it("initializes with empty dictionary") {
|
|
9
8
|
struct TestRecord: Record { }
|
|
10
|
-
|
|
9
|
+
_ = try TestRecord(from: [:])
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
it("works back and forth with a field") {
|
|
@@ -37,14 +36,9 @@ class RecordSpec: QuickSpec {
|
|
|
37
36
|
@Field(.required) var a: Int
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} catch let error as CodedError {
|
|
44
|
-
expect(error).to(beAKindOf(FieldRequiredError.self))
|
|
45
|
-
expect(error.code).to(equal("ERR_FIELD_REQUIRED"))
|
|
46
|
-
expect(error.description).to(equal(FieldRequiredError(fieldKey: "a").description))
|
|
47
|
-
}
|
|
39
|
+
expect { try TestRecord(from: [:]) }.to(throwError { error in
|
|
40
|
+
expect(error).to(beAKindOf(FieldRequiredException.self))
|
|
41
|
+
})
|
|
48
42
|
}
|
|
49
43
|
|
|
50
44
|
it("throws when casting is not possible") {
|
|
@@ -53,14 +47,9 @@ class RecordSpec: QuickSpec {
|
|
|
53
47
|
}
|
|
54
48
|
let dict = ["a": "try with String instead of Int"]
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
} catch let error as CodedError {
|
|
60
|
-
expect(error).to(beAKindOf(FieldInvalidTypeError.self))
|
|
61
|
-
expect(error.code).to(equal("ERR_FIELD_INVALID_TYPE"))
|
|
62
|
-
expect(error.description).to(equal(FieldInvalidTypeError(fieldKey: "a", value: dict["a"], desiredType: Int.self).description))
|
|
63
|
-
}
|
|
50
|
+
expect { try TestRecord(from: dict) }.to(throwError { error in
|
|
51
|
+
expect(error).to(beAKindOf(FieldInvalidTypeException.self))
|
|
52
|
+
})
|
|
64
53
|
}
|
|
65
54
|
}
|
|
66
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"author": "650 Industries, Inc.",
|
|
32
32
|
"license": "MIT",
|
|
33
|
-
"homepage": "https://github.com/expo/expo/tree/
|
|
33
|
+
"homepage": "https://github.com/expo/expo/tree/main/packages/expo-modules-core",
|
|
34
34
|
"jest": {
|
|
35
35
|
"preset": "expo-module-scripts"
|
|
36
36
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@testing-library/react-hooks": "^7.0.1",
|
|
43
43
|
"expo-module-scripts": "^2.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "0f796e10a2b2f258c40f9d56aa141c372cd63fc1"
|
|
46
46
|
}
|