Skip to content

Commit

Permalink
upgrade(react-native): 0.66 🙌 (#6169)
Browse files Browse the repository at this point in the history
Co-authored-by: Kizito Egeonu <[email protected]>
  • Loading branch information
pvinis and lordkiz authored Mar 16, 2022
1 parent 2941475 commit 8bedc84
Show file tree
Hide file tree
Showing 118 changed files with 3,669 additions and 7,099 deletions.
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: ".vendor"
BUNDLE_FORCE_RUBY_PLATFORM: 1
21 changes: 7 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ commands:
scripts/generate-manifest.js .manifests/node_modules '^yarn\.lock$' '^patches/' '^package\.json$'
scripts/generate-manifest.js .manifests/js_transform '^\.manifests/node_modules' '^babel\.config\.js' '^relay\.config\.js' '^jest\.config\.js'
scripts/generate-manifest.js .manifests/js_bundle '^\.manifests/js_transform' '^data/' '^index\.ios\.js' '^src/(?!.*(__mocks__|__fixtures__))'
scripts/generate-manifest.js .manifests/js_test_results '^\.manifests/js_transform' '^data/' '^src/'
ls -lR emission > .manifests/emission_pod_file_list
scripts/generate-manifest.js .manifests/cocoapods '^Podfile' '^Gemfile' '^\.manifests/emission_pod_file_list'
scripts/generate-manifest.js .manifests/native_code '^\.manifests/node_modules' '^Podfile' '^Gemfile' '^emission/' '^Artsy' '^patches/react-native' '^\.env\.example'
Expand Down Expand Up @@ -86,22 +85,17 @@ commands:
- restore_cache:
keys:
- v6-jest-{{ .Branch }}
- restore_cache:
keys:
- v5-js_test_results-{{ checksum ".manifests/js_test_results" }}
- run:
name: Run TypeScript check
command: ls test-results.json || yarn type-check
command: yarn type-check
- run:
name: Run TSLint check
command: ls test-results.json || yarn lint
command: yarn lint
- run:
name: Run jest tests
command: ls test-results.json || yarn jest --outputFile test-results.json --json --ci --forceExit --runInBand
- save_cache:
key: v5-js_test_results-{{ checksum ".manifests/js_test_results" }}
paths:
- test-results.json
command: yarn jest --ci --forceExit --runInBand --reporters=default --reporters=jest-junit
environment:
JEST_JUNIT_OUTPUT_DIR: ./reports/junit/
- save_cache:
key: v6-jest-{{ .Branch }}
paths:
Expand Down Expand Up @@ -362,6 +356,8 @@ jobs:
command: ./scripts/generate-manifest.js .manifests/app_build '^\./manifests/native_code' '^emission/Pod/Assets/'
- store_artifacts:
path: .manifests
- store_test_results:
path: ./reports/junit/
- persist_to_workspace:
root: .
paths:
Expand Down Expand Up @@ -429,9 +425,6 @@ jobs:
path: xcode_test_raw.log
prefix: tests

- store_test_results:
path: test-results.xml

- run:
name: Danger
command: bundle exec danger --danger_id=circle --dangerfile=Dangerfile.circle.rb --verbose
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
insert_final_newline = true
end_of_line = lf # even on windows files

[*.{js,jsx,ts,tsx}]
indent_style = space
Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ DerivedData
tmtags
tmtagsHistory
config/releasenotes.txt
.bundle
Podfile.local
chairs/
Artsy.xcodeproj/project.xcworkspace/xcshareddata/
Artsy.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
vendor/
.vendor/
compiler_commands.json
.swiftpm

Expand Down Expand Up @@ -98,7 +97,6 @@ data/complete.queryMap.json
native-code-checksum.hash

.manifests
test-results.json

# metro cache
.metro
Expand All @@ -114,7 +112,6 @@ test-results.json
!.env.example

# Ignore test artefacts
test-results.xml
xcode_test_raw.log

.recordingSnapshots
Expand Down Expand Up @@ -150,6 +147,9 @@ metaflags.json
# Relay
src/__generated__/*

# jest circleci reports
reports

# Keep this rule last.
# Keep these, so we can keep the folders these appear in.
!.gitkeep
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.2
2.7.4
36 changes: 3 additions & 33 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
"filename": "android/app/build.gradle",
"hashed_secret": "91f71e355c66ef5ff819b35c867d4d28b9a8c469",
"is_verified": false,
"line_number": 151
"line_number": 153
}
],
"src/app/Scenes/Artwork/Components/CommercialInformation.tests.tsx": [
Expand Down Expand Up @@ -462,7 +462,7 @@
"filename": "src/app/Scenes/MyCollection/Screens/ArtworkForm/MyCollectionArtworkForm.tests.tsx",
"hashed_secret": "b5b44d59e3036fde34acae6a4ac3a669e27496ab",
"is_verified": false,
"line_number": 420
"line_number": 438
}
],
"src/app/Scenes/MyCollection/utils/randomMyCollectionArtwork.ts": [
Expand Down Expand Up @@ -521,37 +521,7 @@
"is_verified": false,
"line_number": 65
}
],
"src/setupJest.ts": [
{
"type": "Secret Keyword",
"filename": "src/setupJest.ts",
"hashed_secret": "54e9af600f3bcfd1153b00430b345fcb68c8efc2",
"is_verified": false,
"line_number": 599
},
{
"type": "Secret Keyword",
"filename": "src/setupJest.ts",
"hashed_secret": "62befb82f1107014f73b30096000b729a1018601",
"is_verified": false,
"line_number": 600
},
{
"type": "Secret Keyword",
"filename": "src/setupJest.ts",
"hashed_secret": "34bac5b688f5b61044c219bbf8d241e52d79c2a6",
"is_verified": false,
"line_number": 609
},
{
"type": "Secret Keyword",
"filename": "src/setupJest.ts",
"hashed_secret": "c5110328c5d8a4204c28e7415cf3db6a95239891",
"is_verified": false,
"line_number": 610
}
]
},
"generated_at": "2022-03-15T11:40:00Z"
"generated_at": "2022-03-16T12:32:34Z"
}
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodejs 14.17.1
ruby 2.7.2
ruby 2.7.4
python 3.7.12
java adoptopenjdk-11.0.14+101
1 change: 0 additions & 1 deletion .watchmanconfig
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
{}

2 changes: 2 additions & 0 deletions Artsy.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3350,12 +3350,14 @@
"${PODS_ROOT}/Target Support Files/Pods-Artsy/Pods-Artsy-frameworks.sh",
"${PODS_ROOT}/Mapbox-iOS-SDK/dynamic/Mapbox.framework",
"${BUILT_PRODUCTS_DIR}/MapboxMobileEvents/MapboxMobileEvents.framework",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-DoubleConversion/double-conversion.framework/double-conversion",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mapbox.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MapboxMobileEvents.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/double-conversion.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source 'https://rubygems.org'

gem 'fastlane'

gem 'cocoapods'
gem 'cocoapods', '1.11.2'

# So we know if we need to run `pod install`
gem 'cocoapods-check'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ PLATFORMS
ruby

DEPENDENCIES
cocoapods
cocoapods (= 1.11.2)
cocoapods-check
danger
dotenv
Expand All @@ -350,4 +350,4 @@ DEPENDENCIES
xcpretty

BUNDLED WITH
2.2.11
2.3.5
45 changes: 45 additions & 0 deletions HACKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,48 @@ If it is still an issue with old native navigation gone this can either be remov

City Guide is a mixture of native components and react components, prop updates from the native side are not updating the component on the react native side without this manual check and update. See the PR here for the change in the AppRegistry:
https://github.com/artsy/eigen/pull/6348

## @react-native-async-storage/async-storage patch

#### When can we remove this:

When https://github.com/react-native-async-storage/async-storage/issues/746 is solved.

#### Explanation/Context:

The types in this package are not correct, and there is a type error that comes up when we try to use it.
It's a type error on the mock declaration, so we don't really care for it, so we just add a ts-ignore instruction to that declaration.

## @wojtekmaj/enzyme-adapter-react-17 patch

#### When can we remove this:

When we remove enzyme from eigen.

#### Explanation/Context:

Enzyme is missing types and this package is importing enzyme, so typescript is sad.
We ignore enzyme types in our tests in eigen too. Once we remove enzyme, we can get rid of this and everything connected to enzyme.

## rn-async-storage-flipper patch

#### When can we remove this:

Unsure.

#### Explanation/Context:

The types in this package are not correct, and there is a type error that comes up when we try to use it.
It is a helper package only used for developing, so we are not afraid of wrong types causing issues to users.

## ParentAwareScrollView

#### When can we remove this:

To remove this, we need to change our InfiniteScrollArtworksGrid to use a FlatList or any VirtualizedList. We haven't done that yet, because we need the masonry layout.
We either need to find a library that gives us masonry layout using a VirtualizedList, or we need to make our own version of this.

#### Explanation/Context:

Currently our masonry layout (in InfiniteScrollArtworksGrid `render()`) is using a ScrollView, which is not a VirtualizedList.
Also, currently, the parent that is the FlatList, comes from StickyTabPageFlatList.
27 changes: 14 additions & 13 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ target 'Artsy' do
)

# Networking
pod 'AFNetworking', '~> 2.5', subspecs: %w[Reachability Serialization Security NSURLSession NSURLConnection]
pod 'AFNetworking', '2.7.0', subspecs: %w[Reachability Serialization Security NSURLSession NSURLConnection]
pod 'AFOAuth1Client', git: 'https://github.com/artsy/AFOAuth1Client.git', tag: '0.4.0-subspec-fix'
pod 'AFNetworkActivityLogger'
pod 'SDWebImage', '5.8.3'
Expand All @@ -77,7 +77,7 @@ target 'Artsy' do
pod 'ARGenericTableViewController', git: 'https://github.com/artsy/ARGenericTableViewController.git'
pod 'CocoaLumberjack', '3.7.2'
pod 'FLKAutoLayout', git: 'https://github.com/artsy/FLKAutoLayout.git', branch: 'v1'
pod 'FXBlurView'
pod 'FXBlurView', '1.6.4'
pod 'ISO8601DateFormatter', git: 'https://github.com/artsy/iso-8601-date-formatter'
pod 'JLRoutes', git: 'https://github.com/artsy/JLRoutes.git'
pod 'JSDecoupledAppDelegate'
Expand All @@ -98,7 +98,7 @@ target 'Artsy' do
pod 'ObjectiveSugar'

# Artsy Spec repo stuff
pod 'Artsy+UIFonts', '~> 3.3.4'
pod 'Artsy+UIFonts', '3.3.4'
pod 'Artsy-UIButtons'
pod 'Artsy+UIColors'
pod 'Artsy+UILabels'
Expand All @@ -110,21 +110,21 @@ target 'Artsy' do
pod 'Pulley', git: 'https://github.com/artsy/Pulley.git', branch: 'master'

# Facebook
pod 'FBSDKCoreKit', '~> 9.3'
pod 'FBSDKLoginKit', '~> 9.3'
pod 'FBSDKShareKit', '~> 9.3'
pod 'FBSDKCoreKit', '9.3.0'
pod 'FBSDKLoginKit', '9.3.0'
pod 'FBSDKShareKit', '9.3.0'

# Google & Firebase
pod 'GoogleSignIn', '~> 5.0.2'
pod 'GoogleSignIn', '5.0.2'
pod 'Firebase/Auth', '8.1.1'

# Analytics
pod 'Segment-Appboy'
pod 'Segment-Adjust'
pod 'Segment-Appboy', '4.2.0'
pod 'Segment-Adjust', '3.1.4'

# Developer Pods
pod 'DHCShakeNotifier'
pod 'ORKeyboardReactingApplication'
pod 'DHCShakeNotifier', '0.2.0'
pod 'ORKeyboardReactingApplication', '0.5.3'

# Swift pods 🎉
pod 'Then', '2.3.0'
Expand Down Expand Up @@ -174,7 +174,7 @@ post_install do |installer|
end
end

# Forces the minimum to be 9.0 as that's our last deployment targer, and new xcode build tools
# Forces the minimum to be 9.0 as that's our last deployment target, and new xcode build tools
# give an error in Xcode 10
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
Expand Down Expand Up @@ -214,8 +214,8 @@ post_install do |installer|
# * Send PRs for the rest
%w[
Pods/ORStackView/Classes/ios/ORStackView.h
Pods/NAMapKit/NAMapKit/*.h
].flat_map { |x| Dir.glob(x) }.each do |header|
system("chmod +w #{header}")
addition = "#import <UIKit/UIKit.h>\n"
contents = File.read(header)
next if contents.include?(addition)
Expand All @@ -232,6 +232,7 @@ post_install do |installer|
Pods/Nimble-Snapshots
Pods/Quick/Sources/QuickObjectiveC
].flat_map { |x| Dir.glob(File.join(x, '**/*.{h,m}')) }.each do |header|
system("chmod +w #{header}")
contents = File.read(header)
patched = contents.sub(%r{["<]\w+/(\w+-Swift\.h)[">]}, '"\1"')
File.write(header, patched) if Regexp.last_match
Expand Down
Loading

0 comments on commit 8bedc84

Please sign in to comment.