expo-modules-core 1.5.3 → 1.5.4
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 +10 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/kotlin/views/ErrorViewGroup.kt +11 -0
- package/android/src/main/java/expo/modules/kotlin/views/ViewDefinitionBuilder.kt +6 -1
- package/build/sweet/setUpErrorManager.fx.js +1 -1
- package/build/sweet/setUpErrorManager.fx.js.map +1 -1
- package/ios/ReactDelegates/EXReactDelegateWrapper+Private.h +1 -1
- package/ios/ReactDelegates/EXReactDelegateWrapper.m +2 -2
- package/ios/ReactDelegates/ExpoReactDelegate.swift +1 -1
- package/ios/ReactDelegates/ExpoReactDelegateHandler.swift +1 -1
- package/package.json +2 -2
- package/src/sweet/setUpErrorManager.fx.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 1.5.4 — 2023-07-04
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fix the `View cannot be cast to ViewGroup` exception on Android. ([#23264](https://github.com/expo/expo/pull/23264) by [@lukmccall](https://github.com/lukmccall))
|
|
18
|
+
|
|
19
|
+
### 💡 Others
|
|
20
|
+
|
|
21
|
+
- Changed Objective-C names for `ExpoReactDelegate` and `ExpoReactDelegateHandler` to fix issues with versioning in Expo Go. ([#23229](https://github.com/expo/expo/pull/23229) by [@tsapeta](https://github.com/tsapeta))
|
|
22
|
+
|
|
13
23
|
## 1.5.3 — 2023-06-24
|
|
14
24
|
|
|
15
25
|
### 🎉 New features
|
package/android/build.gradle
CHANGED
|
@@ -6,7 +6,7 @@ apply plugin: 'maven-publish'
|
|
|
6
6
|
apply plugin: "de.undercouch.download"
|
|
7
7
|
|
|
8
8
|
group = 'host.exp.exponent'
|
|
9
|
-
version = '1.5.
|
|
9
|
+
version = '1.5.4'
|
|
10
10
|
|
|
11
11
|
buildscript {
|
|
12
12
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -160,7 +160,7 @@ android {
|
|
|
160
160
|
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
161
161
|
consumerProguardFiles 'proguard-rules.pro'
|
|
162
162
|
versionCode 1
|
|
163
|
-
versionName "1.5.
|
|
163
|
+
versionName "1.5.4"
|
|
164
164
|
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled.toString()
|
|
165
165
|
|
|
166
166
|
testInstrumentationRunner "expo.modules.TestRunner"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
package expo.modules.kotlin.views
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import android.view.ViewGroup
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A NOOP view group, which is used when an error occurs.
|
|
8
|
+
*/
|
|
9
|
+
class ErrorViewGroup(context: Context) : ViewGroup(context) {
|
|
10
|
+
override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) = Unit
|
|
11
|
+
}
|
|
@@ -334,7 +334,12 @@ class ViewDefinitionBuilder<T : View>(
|
|
|
334
334
|
UnexpectedException(e)
|
|
335
335
|
}
|
|
336
336
|
)
|
|
337
|
-
|
|
337
|
+
|
|
338
|
+
return if (ViewGroup::class.java.isAssignableFrom(viewClass.java)) {
|
|
339
|
+
ErrorViewGroup(context)
|
|
340
|
+
} else {
|
|
341
|
+
View(context)
|
|
342
|
+
}
|
|
338
343
|
}
|
|
339
344
|
|
|
340
345
|
private fun getPrimaryConstructor(): KFunction<T>? {
|
|
@@ -10,5 +10,5 @@ if (__DEV__ && Platform.OS === 'android' && NativeErrorManager) {
|
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
// We have to export `CodedError` via global object to use in later in the C++ code.
|
|
13
|
-
|
|
13
|
+
globalThis.ExpoModulesCore_CodedError = CodedError;
|
|
14
14
|
//# sourceMappingURL=setUpErrorManager.fx.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setUpErrorManager.fx.js","sourceRoot":"","sources":["../../src/sweet/setUpErrorManager.fx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,IAAI,OAAO,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,kBAAkB,EAAE;IAC9D,MAAM,cAAc,GAAG,4CAA4C,CAAC;IACpE,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAE1D,YAAY,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,EAAE,OAAO,EAAuB,EAAE,EAAE;QAC5E,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;CACJ;AAED,oFAAoF;AACpF,
|
|
1
|
+
{"version":3,"file":"setUpErrorManager.fx.js","sourceRoot":"","sources":["../../src/sweet/setUpErrorManager.fx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,IAAI,OAAO,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,IAAI,kBAAkB,EAAE;IAC9D,MAAM,cAAc,GAAG,4CAA4C,CAAC;IACpE,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,kBAAkB,CAAC,CAAC;IAE1D,YAAY,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,EAAE,OAAO,EAAuB,EAAE,EAAE;QAC5E,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;CACJ;AAED,oFAAoF;AACpF,UAAU,CAAC,0BAA0B,GAAG,UAAU,CAAC","sourcesContent":["import { EventEmitter } from '../EventEmitter';\nimport Platform from '../Platform';\nimport { CodedError } from '../errors/CodedError';\nimport NativeErrorManager from './NativeErrorManager';\n\nif (__DEV__ && Platform.OS === 'android' && NativeErrorManager) {\n const onNewException = 'ExpoModulesCoreErrorManager.onNewException';\n const eventEmitter = new EventEmitter(NativeErrorManager);\n\n eventEmitter.addListener(onNewException, ({ message }: { message: string }) => {\n console.error(message);\n });\n}\n\n// We have to export `CodedError` via global object to use in later in the C++ code.\nglobalThis.ExpoModulesCore_CodedError = CodedError;\n"]}
|
|
@@ -11,7 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
11
11
|
*/
|
|
12
12
|
@interface EXReactDelegateWrapper(Private)
|
|
13
13
|
|
|
14
|
-
- (instancetype)initWithExpoReactDelegate:(
|
|
14
|
+
- (instancetype)initWithExpoReactDelegate:(EXReactDelegate *)expoReactDelegate;
|
|
15
15
|
|
|
16
16
|
@end
|
|
17
17
|
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
@interface EXReactDelegateWrapper()
|
|
9
9
|
|
|
10
|
-
@property (nonatomic, weak)
|
|
10
|
+
@property (nonatomic, weak) EXReactDelegate *expoReactDelegate;
|
|
11
11
|
|
|
12
12
|
@end
|
|
13
13
|
|
|
14
14
|
@implementation EXReactDelegateWrapper
|
|
15
15
|
|
|
16
|
-
- (instancetype)initWithExpoReactDelegate:(
|
|
16
|
+
- (instancetype)initWithExpoReactDelegate:(EXReactDelegate *)expoReactDelegate
|
|
17
17
|
{
|
|
18
18
|
if (self = [super init]) {
|
|
19
19
|
_expoReactDelegate = expoReactDelegate;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
An extensible react instance creation delegate. This class will loop through each `ExpoReactDelegateHandler` to determine the winner to create the instance.
|
|
5
5
|
*/
|
|
6
|
-
@objc
|
|
6
|
+
@objc(EXReactDelegate)
|
|
7
7
|
public class ExpoReactDelegate: NSObject {
|
|
8
8
|
private let handlers: [ExpoReactDelegateHandler]
|
|
9
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-modules-core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "The core of Expo Modules architecture",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"@testing-library/react-hooks": "^7.0.1",
|
|
43
43
|
"expo-module-scripts": "^3.0.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "cf90d5c30c2a08a6493ebfa8aa3791aa70666759"
|
|
46
46
|
}
|