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

Chore: Upgrade core to RN 0.75 #4173

Merged
merged 48 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4a409cb
Updates RN to 0.75.4 in the sample app and E2E test
antonis Oct 7, 2024
3ff1e71
Removes Flipper from iOS
antonis Oct 7, 2024
a5ef6c8
Revert changes in the test apps for now
antonis Oct 8, 2024
a67410e
Update e2e tests dependencies
antonis Oct 8, 2024
03608cf
Updates Android sample
antonis Oct 8, 2024
44e1e0b
Updates iOS sample
antonis Oct 8, 2024
dddcaad
Merge branch 'v6' into antonis/rn-0.75.4-no-flipper
antonis Oct 8, 2024
4acda45
Updates lockfile
antonis Oct 8, 2024
2c6e9e6
Updates changelog
antonis Oct 8, 2024
2a51888
Adds codegen missing targetPlatform parameter
antonis Oct 8, 2024
86990ed
Fixes lint issue (see https://github.com/facebook/react-native/issues…
antonis Oct 8, 2024
d0a8a29
enable corepack in testflight dependencies step
antonis Oct 9, 2024
ce4ed26
Sets the newArchEnabled=false for legacy builds
antonis Oct 9, 2024
9c3480c
enable corepack in testflight build step
antonis Oct 9, 2024
21228bd
Enable corepack in a separate step
antonis Oct 9, 2024
47d108d
Removes corepack step
antonis Oct 9, 2024
1ca6390
Updates OnLoad.cpp and CMakeList.txt to match the RN version samples
antonis Oct 9, 2024
83169cc
Enable corepack and remove cache check
antonis Oct 9, 2024
9b6f84e
Remove changelog
antonis Oct 11, 2024
3b165dc
Reverts CMakeLists.txt change
antonis Oct 11, 2024
e5a1bb2
Reverts code removal
antonis Oct 11, 2024
9497914
Update yarn cache in testflight build
antonis Oct 14, 2024
c45761a
Updates PrivacyInfo
antonis Oct 14, 2024
9a717b3
Merge branch 'v6' into antonis/rn-0.75.4-no-flipper
antonis Oct 14, 2024
c7edc0d
Updates RN version and dependencies
antonis Oct 15, 2024
c32f8cb
Fixes prerelease property type (see https://github.com/getsentry/sent…
antonis Oct 15, 2024
bc32154
Adds babel/plugin-transform-private-methods to fix broken tests
antonis Oct 15, 2024
7f3f63d
Updates lockfile
antonis Oct 15, 2024
122417c
Fixes lint issue
antonis Oct 15, 2024
f4105bd
misc(ci): Remove unused testflight node_modules cache (#4178)
krystofwoldrich Oct 15, 2024
49408ec
Merge branch 'main' into antonis/rn-0.75.4-no-flipper
antonis Oct 15, 2024
abcf737
Merge branch 'antonis/rn-0.75.4-no-flipper' into antonis/rn-0.75.4-core
antonis Oct 15, 2024
31054a9
Merge branch 'main' into antonis/rn-0.75.4-no-flipper
antonis Oct 15, 2024
5a219de
Merge branch 'antonis/rn-0.75.4-no-flipper' into antonis/rn-0.75.4-core
antonis Oct 15, 2024
85da712
Merge branch 'main' into antonis/rn-0.75.4-core
antonis Oct 16, 2024
54607ba
Fixes codegen issue in Native Tests / ios after the RN update
antonis Oct 16, 2024
91c0edb
Updates project file
antonis Oct 16, 2024
a633c74
Reverse workaround
antonis Oct 16, 2024
0d937ed
Merge branch 'main' into antonis/rn-0.75.4-core
antonis Oct 16, 2024
c8bc67f
Deployment target workaround
antonis Oct 16, 2024
47e63f1
Revert "Deployment target workaround"
antonis Oct 16, 2024
addcdaa
Add REACT_NATIVE_PATH to tester build settings
krystofwoldrich Oct 16, 2024
5a74c05
fix missing var
krystofwoldrich Oct 16, 2024
6bc6e08
Merge branch 'main' into antonis/rn-0.75.4-core
antonis Oct 21, 2024
3b730cb
Adds @react-native/babel-preset
antonis Oct 21, 2024
9873beb
Merge branch 'main' into antonis/rn-0.75.4-core
antonis Oct 21, 2024
3b4965a
Set exact RN versions
antonis Oct 21, 2024
8e092ca
Updates lockfile
antonis Oct 21, 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
25 changes: 25 additions & 0 deletions packages/core/RNSentryCocoaTester/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,29 @@ target 'RNSentryCocoaTesterTests' do
)
pod 'RNSentry', :path => '../RNSentry.podspec'
pod 'OCMock', '3.9.1'

post_install do |installer|
set_react_native_path(installer)
end
end

def extract_projects(installer)
return installer.aggregate_targets
.map{ |t| t.user_project }
.uniq{ |p| p.path }
.push(installer.pods_project)
end

def set_react_native_path(installer)
# https://github.com/facebook/react-native/blob/9cc6f007ba1cf112466ccf685c0ef918bba69dd7/packages/react-native/scripts/react_native_pods.rb#L378
Pod::UI.puts("Setting REACT_NATIVE_PATH build settings")

projects = extract_projects(installer)

projects.each do |project|
project.build_configurations.each do |config|
config.build_settings["REACT_NATIVE_PATH"] = '${PODS_ROOT}/../../node_modules/react-native'
end
project.save()
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
objects = {

/* Begin PBXBuildFile section */
330F308C2C0F3840002A0D4E /* RNSentryBreadcrumbTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 330F308B2C0F3840002A0D4E /* RNSentryBreadcrumbTests.m */; };
336084392C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 336084382C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift */; };
33958C692BFCF12600AD1FB6 /* RNSentryOnDrawReporterTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33958C682BFCF12600AD1FB6 /* RNSentryOnDrawReporterTests.m */; };
33AFDFED2B8D14B300AAB120 /* RNSentryFramesTrackerListenerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 33AFDFEC2B8D14B300AAB120 /* RNSentryFramesTrackerListenerTests.m */; };
Expand All @@ -19,7 +18,6 @@
/* Begin PBXFileReference section */
1482D5685A340AB93348A43D /* Pods-RNSentryCocoaTesterTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNSentryCocoaTesterTests.release.xcconfig"; path = "Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests.release.xcconfig"; sourceTree = "<group>"; };
330F308D2C0F385A002A0D4E /* RNSentryBreadcrumb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNSentryBreadcrumb.h; path = ../ios/RNSentryBreadcrumb.h; sourceTree = "<group>"; };
336084372C32E382008CC412 /* RNSentryCocoaTesterTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "RNSentryCocoaTesterTests-Bridging-Header.h"; sourceTree = "<group>"; };
336084382C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RNSentryReplayBreadcrumbConverterTests.swift; sourceTree = "<group>"; };
3360843A2C32E3A8008CC412 /* RNSentryReplayBreadcrumbConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RNSentryReplayBreadcrumbConverter.h; path = ../ios/RNSentryReplayBreadcrumbConverter.h; sourceTree = "<group>"; };
3360843C2C340C76008CC412 /* RNSentryBreadcrumbTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RNSentryBreadcrumbTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -89,7 +87,6 @@
33AFDFF22B8D15F600AAB120 /* RNSentryDependencyContainerTests.h */,
33958C682BFCF12600AD1FB6 /* RNSentryOnDrawReporterTests.m */,
3360843C2C340C76008CC412 /* RNSentryBreadcrumbTests.swift */,
3360843B2C340C75008CC412 /* RNSentryCocoaTesterTests-Bridging-Header.h */,
);
path = RNSentryCocoaTesterTests;
sourceTree = "<group>";
Expand Down Expand Up @@ -219,7 +216,6 @@
336084392C32E382008CC412 /* RNSentryReplayBreadcrumbConverterTests.swift in Sources */,
33F58AD02977037D008F60EA /* RNSentryTests.mm in Sources */,
33958C692BFCF12600AD1FB6 /* RNSentryOnDrawReporterTests.m in Sources */,
3360843D2C340C76008CC412 /* RNSentryBreadcrumbTests.swift in Sources */,
33AFDFED2B8D14B300AAB120 /* RNSentryFramesTrackerListenerTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -282,6 +278,7 @@
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
name = Debug;
Expand Down Expand Up @@ -334,6 +331,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 12.4;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
Expand Down Expand Up @@ -394,6 +392,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.sentry.RNSentryCocoaTesterTests;
PRODUCT_NAME = "$(TARGET_NAME)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down Expand Up @@ -460,6 +459,7 @@
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.sentry.RNSentryCocoaTesterTests;
PRODUCT_NAME = "$(TARGET_NAME)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
Expand Down
3 changes: 2 additions & 1 deletion packages/core/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};

9 changes: 5 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@
"@babel/core": "^7.23.5",
"@expo/metro-config": "0.17.5",
"@mswjs/interceptors": "^0.25.15",
"@react-native/babel-preset": "0.75.4",
"@sentry-internal/eslint-config-sdk": "8.34.0",
"@sentry-internal/eslint-plugin-sdk": "8.34.0",
"@sentry-internal/typescript": "8.34.0",
"@sentry/wizard": "3.16.3",
"@testing-library/react-native": "^12.6.1",
"@testing-library/react-native": "^12.7.2",
"@types/jest": "^29.5.3",
"@types/node": "^20.9.3",
"@types/react": "^18.2.64",
Expand All @@ -105,9 +106,9 @@
"madge": "^6.1.0",
"metro": "0.80.10",
"prettier": "^2.0.5",
"react": "18.2.0",
"react-native": "0.73.9",
"react-test-renderer": "^18.2.0",
"react": "18.3.1",
"react-native": "0.75.4",
"react-test-renderer": "^18.3.1",
"rimraf": "^4.1.1",
"ts-jest": "^29.1.1",
"typescript": "4.9.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/vendor/react-native/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ export type ReactNativeVersion = {
major: number;
minor: number;
patch: number;
prerelease?: number | null | undefined;
prerelease?: string | null | undefined;
};
};
19 changes: 10 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6756,6 +6756,7 @@ __metadata:
"@babel/core": ^7.23.5
"@expo/metro-config": 0.17.5
"@mswjs/interceptors": ^0.25.15
"@react-native/babel-preset": 0.75.4
"@sentry-internal/eslint-config-sdk": 8.34.0
"@sentry-internal/eslint-plugin-sdk": 8.34.0
"@sentry-internal/typescript": 8.34.0
Expand All @@ -6767,7 +6768,7 @@ __metadata:
"@sentry/types": 8.34.0
"@sentry/utils": 8.34.0
"@sentry/wizard": 3.16.3
"@testing-library/react-native": ^12.6.1
"@testing-library/react-native": ^12.7.2
"@types/jest": ^29.5.3
"@types/node": ^20.9.3
"@types/react": ^18.2.64
Expand All @@ -6791,9 +6792,9 @@ __metadata:
madge: ^6.1.0
metro: 0.80.10
prettier: ^2.0.5
react: 18.2.0
react-native: 0.73.9
react-test-renderer: ^18.2.0
react: 18.3.1
react-native: 0.75.4
react-test-renderer: ^18.3.1
rimraf: ^4.1.1
ts-jest: ^29.1.1
typescript: 4.9.5
Expand Down Expand Up @@ -7074,9 +7075,9 @@ __metadata:
languageName: node
linkType: hard

"@testing-library/react-native@npm:^12.6.1":
version: 12.6.1
resolution: "@testing-library/react-native@npm:12.6.1"
"@testing-library/react-native@npm:^12.7.2":
version: 12.7.2
resolution: "@testing-library/react-native@npm:12.7.2"
dependencies:
jest-matcher-utils: ^29.7.0
pretty-format: ^29.7.0
Expand All @@ -7089,7 +7090,7 @@ __metadata:
peerDependenciesMeta:
jest:
optional: true
checksum: 8966e074e10fc73cafea7630d4f6af35bc0bb42f1f79cc84d2c4336136b50c5c00546216219aea170481c6a3916e82a5dd17dfd5e0109483b52e7438a506bbeb
checksum: 7e3d8ab7d549823fcf438c17353e6c40386da88bbb1edfbd0747282a28c673597be27fdc2fa1f3a7d8786b77c72bb2e37f67ad2c9134225e9b68db97838f77e2
languageName: node
linkType: hard

Expand Down Expand Up @@ -23295,7 +23296,7 @@ __metadata:
languageName: node
linkType: hard

"react-test-renderer@npm:18.3.1, react-test-renderer@npm:^18.2.0":
"react-test-renderer@npm:18.3.1, react-test-renderer@npm:^18.3.1":
version: 18.3.1
resolution: "react-test-renderer@npm:18.3.1"
dependencies:
Expand Down
Loading