Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump react-native from 0.73.10 to 0.75.4 #10995

Merged
merged 40 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
034e76d
build(deps): bump react-native from 0.73.10 to 0.74.6
gkartalis Oct 22, 2024
9294bdf
pbxproj
gkartalis Oct 22, 2024
f59a122
fix: mapbox fix attempt still having issues with registering map city…
gkartalis Oct 23, 2024
78c35a5
podfile diff
brainbicycle Oct 24, 2024
d70671f
update bridge handling to fix city guide modules
brainbicycle Oct 24, 2024
f7c15b8
build(deps): bump react-native from 0.74.6 to 0.75.4
gkartalis Oct 31, 2024
488deb1
bump react native ios cli patch
gkartalis Nov 4, 2024
551832f
bump other deps
gkartalis Nov 4, 2024
1ec7f47
fix deps
gkartalis Nov 5, 2024
a4524b6
chore: remove react native patch
gkartalis Nov 5, 2024
7208c75
testing changes
gkartalis Nov 5, 2024
45daf6f
fix getConstants types
gkartalis Nov 5, 2024
9ad5f3e
docs: remove hacks entry for react native
gkartalis Nov 5, 2024
f18c6fc
fix: bottom-sheet migration
gkartalis Nov 6, 2024
54aa466
fix moti broken animation
gkartalis Nov 6, 2024
a735c84
reanimated test mock
gkartalis Nov 6, 2024
5dbaf23
mock new func for constants
brainbicycle Nov 6, 2024
841146b
fix mocks in migration tests
brainbicycle Nov 6, 2024
f7ff8bb
fix failure in registration test
brainbicycle Nov 6, 2024
01bbe49
fix failure in confirm bid test
brainbicycle Nov 6, 2024
77c6448
Merge branch 'main' into gkartalis/bump-rn-74
gkartalis Nov 7, 2024
d34f5a1
patch collapsible-tab view
gkartalis Nov 7, 2024
a19543e
refresh caches
gkartalis Nov 7, 2024
11d63c1
android workaround 44291 issue bundle size
gkartalis Nov 7, 2024
a351c81
Merge branch 'main' into gkartalis/bump-rn-74
gkartalis Nov 7, 2024
dca58e3
bump flashlist + pager view
gkartalis Nov 7, 2024
6fac789
get rid of patch
gkartalis Nov 7, 2024
c64a76b
revert the android workaround tryout
gkartalis Nov 7, 2024
1fd204a
bump palette canary
gkartalis Nov 7, 2024
47d7448
rtl support
gkartalis Nov 7, 2024
3510da8
remove proptype hack and entry from package json
gkartalis Nov 7, 2024
4650e5e
Update ios/Artsy/Emission/ViewControllers/ARMapComponentViewController.m
gkartalis Nov 8, 2024
a558521
Update src/app/AppRegistry.tsx
gkartalis Nov 8, 2024
d5f4937
chore: address pr comments and type issues
gkartalis Nov 8, 2024
75256b2
get rid of displayLicensingViews native method
gkartalis Nov 11, 2024
fdfefdc
bring back licencing mapbox logo on the JS side
gkartalis Nov 11, 2024
55f3778
Merge branch 'main' into gkartalis/bump-rn-74
gkartalis Nov 11, 2024
70330d4
fix: dependencies
gkartalis Nov 11, 2024
a52c599
remove commented code
brainbicycle Nov 11, 2024
5346646
minor cleanup
brainbicycle Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/NativeModules/LegacyNativeModules.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AsyncStorage from "@react-native-async-storage/async-storage"
import { BottomTabType } from "app/Scenes/BottomTabs/BottomTabType"
import { NativeState } from "app/store/NativeModel"
import { PushAuthorizationStatus } from "app/utils/PushNotification"
import { NativeModules as AllNativeModules, Platform } from "react-native"
import { getLocales, getTimeZone } from "react-native-localize"
Expand Down Expand Up @@ -35,7 +36,7 @@ interface LegacyNativeModules {
getPushToken(): Promise<string | null>
}
ARNotificationsManager: {
getConstants(): object
getConstants(): NativeState
postNotificationName(type: string, data: object): void
didFinishBootstrapping(): void
reactStateUpdated(state: {
Expand Down Expand Up @@ -127,11 +128,10 @@ const LegacyNativeModulesAndroid = {
},

ARNotificationsManager: {
// nativeState: null as any,
postNotificationName: noop("postNotificationName"),
didFinishBootstrapping: () => null,
reactStateUpdated: () => null,
getConstants: () => ({}),
getConstants: () => null as any,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with this as it was in line 130 to avoid solving extra type issues but it is not ideal

},

ARTemporaryAPIModule: {
Expand Down
7 changes: 3 additions & 4 deletions src/app/store/NativeModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { LegacyNativeModules } from "app/NativeModules/LegacyNativeModules"
// import { NotificationsManager } from "app/NativeModules/NotificationsManager"
import { NotificationsManager } from "app/NativeModules/NotificationsManager"
import { navigate, navigationEvents } from "app/system/navigation/navigate"
import { SegmentTrackingProvider } from "app/utils/track/SegmentTrackingProvider"
import { InfoType } from "app/utils/track/providers"
Expand Down Expand Up @@ -50,7 +50,7 @@ export interface NativeModel {
}

export const getNativeModel = (): NativeModel => ({
sessionState: {}, // LegacyNativeModules.ARNotificationsManager?.nativeState ?? {},
sessionState: LegacyNativeModules.ARNotificationsManager.getConstants(),
setLocalState: action((state, nextNativeState) => {
Object.assign(state.sessionState, nextNativeState)
}),
Expand All @@ -60,8 +60,7 @@ export const getNativeModel = (): NativeModel => ({
})

export function listenToNativeEvents(cb: (event: NativeEvent) => void) {
return "hamburgers"
// return NotificationsManager.addListener("event", cb)
return NotificationsManager.addListener("event", cb)
}

listenToNativeEvents((event: NativeEvent) => {
Expand Down
2 changes: 1 addition & 1 deletion src/app/store/__tests__/migration.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ describe("PendingPushNotification migration", () => {

describe("CopyIOSNativeSessionAuthToTS migration", () => {
beforeAll(() => {
LegacyNativeModules.ARNotificationsManager.nativeState = {
LegacyNativeModules.ARNotificationsManager.getConstants = {
authenticationToken: "authenticationToken",
onboardingState: "complete",
userID: "userID",
Expand Down
5 changes: 3 additions & 2 deletions src/app/store/migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,10 @@ export const artsyAppMigrations: Migrations = {
[Versions.CopyIOSNativeSessionAuthToTS]: (state) => {
if (Platform.OS === "ios") {
const nativeState = LegacyNativeModules.ARNotificationsManager.getConstants()
state.auth.userAccessToken = nativeState.authenticationToken

state.auth.userAccessToken = nativeState?.authenticationToken
state.auth.onboardingState = (nativeState as any).onboardingState ?? "none"
state.auth.userID = nativeState.userID
state.auth.userID = nativeState?.userID
}
},
[Versions.AddExperimentsModel]: (state) => {
Expand Down
3 changes: 3 additions & 0 deletions src/app/utils/useFreshInstallTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ import { postEventToProviders } from "./track/providers"
export const useFreshInstallTracking = () => {
useEffect(() => {
const launchCount = getCurrentEmissionState().launchCount
console.warn("[debug]", { launchCount })
gkartalis marked this conversation as resolved.
Show resolved Hide resolved
if (launchCount > 1) {
console.warn("[debug] Not a fresh install, skipping fresh install tracking")
return
}
console.warn("[debug] fresh install")
postEventToProviders({ name: AnalyticsConstants.FreshInstall })
}, [])
}
4 changes: 2 additions & 2 deletions src/setupJest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,13 @@ function getNativeModules(): OurNativeModules {
},

ARNotificationsManager: {
nativeState: {
getConstants: jest.fn(() => ({
userAgent: "Jest Unit Tests",
authenticationToken: "authenticationToken",
launchCount: 1,
userID: "userID",
userEmail: "[email protected]",
},
})),
postNotificationName: jest.fn(),
didFinishBootstrapping: jest.fn(),
reactStateUpdated: jest.fn(),
Expand Down