Skip to content

Commit fb923fd

Browse files
committed
keep MapboxV10 constant as deprecated
The constant actually means "v10 or later" and is always true. Keep it for backwards compatibility but mark as deprecated.
1 parent f7f7702 commit fb923fd

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

android/src/main/java/com/rnmapbox/rnmbx/modules/RNMBXModule.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ class RNMBXModule(private val mReactContext: ReactApplicationContext) : ReactCon
114114
val locationModuleCallbackNames: MutableMap<String, String> = HashMap()
115115
locationModuleCallbackNames["Update"] = RNMBXLocationModule.LOCATION_UPDATE
116116
return MapBuilder.builder<String, Any>()
117+
// Deprecated: means v10 or later, always true. Will be removed in next major version.
118+
.put("MapboxV10", true)
117119
.put("StyleURL", styleURLS)
118120
.put("EventTypes", eventTypes)
119121
.put("StyleSource", styleSourceConsts)

ios/RNMBX/RNMBXModule.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class RNMBXModule : NSObject {
2323
@objc
2424
func constantsToExport() -> [AnyHashable: Any]! {
2525
return [
26+
// Deprecated: means v10 or later, always true. Will be removed in next major version.
27+
"MapboxV10":true,
2628
"StyleURL":
2729
[
2830
"Street": StyleURI.streets.rawValue,

setup-jest.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ NativeModules.RNMBXModule = {
9999
setTelemetryEnabled: jest.fn(),
100100
setConnected: jest.fn(),
101101
clearData: jest.fn(),
102+
// Deprecated: means v10 or later, always true. Will be removed in next major version.
103+
MapboxV10: true,
102104
};
103105

104106
NativeModules.RNMBXOfflineModule = nativeModule({

0 commit comments

Comments
 (0)