Skip to content

Commit

Permalink
Lock React version to ~18.2.0 (#1148)
Browse files Browse the repository at this point in the history
* lock React version to ~18.2.0

React 19 and React 18.3 are out (https://react.dev/blog/2024/04/25/react-19-upgrade-guide#react-18-3), but the React Native ecosystem is still on React 18.2.
We need to lock the versions down until the React Native packages update.

* 💩 Temporarily pin the version to 14.1 so that the CI is successful

Consisent with
#1148 (comment)

* 💩 Revert back even further to xcode 14

Consistent with
#1148 (comment)

* 📌 Ensure that we are using the correct version of java

Before this, we set only the `JAVA_HOME` to pin the java version
This was working until a couple of days ago, when, even after setting the
version, the java version was not changed.

This may be due to the location for the java executable changing, so let's try
to set the PATH as well

Also print out several environment variables to help debug further

Related info:
#1148 (comment)
#1148 (comment)

* 🔧 Change the environment variable to the one used in the new github actions runner

Related context:
#1148 (comment)

* 📌 Pin the mac version to 13

To be consistent with
#1148 (comment)

Before we fix
e-mission/e-mission-docs#1060

* 📌 Pin the mac version to 13

Consistent with
#1148 (comment)
and
b5072f3 (for iOS)

* ⏪️ Revert previous attempts to fix the issue

since pinning to OSX-13 fixed it
#1148 (comment)

* 📌 Pin the xcode version again

Because apparently the default version, even on the OSX 13 runner, is now xcode 15
#1148 (comment)

* Ensure that the switch command is run as root

---------

Co-authored-by: K. Shankari <[email protected]>
  • Loading branch information
JGreenlee and shankari authored Apr 28, 2024
1 parent 1589f74 commit 0f6aabc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest
runs-on: macos-13

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Prints related environment variables so that we can know what to set
run: env | egrep "JAVA|PATH|ANDROID"

# Runs a single command using the runners shell
- name: Print the java and gradle versions
run: |
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: macos-latest
runs-on: macos-13

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -33,6 +33,12 @@ jobs:
- name: Print the xcode path
run: xcode-select --print-path

- name: Set xcode to 14.1
run: |
sudo xcode-select --switch /Applications/Xcode_14.1.app
echo "After setting xcode version "`xcode-select --print-path`
- name: Print the xcode setup
run: xcodebuild -version -sdk

Expand Down
6 changes: 3 additions & 3 deletions package.cordovabuild.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@babel/preset-typescript": "^7.21.4",
"@ionic/cli": "6.20.8",
"@types/luxon": "^3.3.0",
"@types/react": "^18.2.20",
"@types/react": "~18.2.0",
"babel-loader": "^9.1.2",
"babel-plugin-optional-require": "^0.3.1",
"concurrently": "^8.0.1",
Expand Down Expand Up @@ -152,9 +152,9 @@
"npm": "^9.6.3",
"phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner#v8.1.0",
"prop-types": "^15.8.1",
"react": "^18.2.*",
"react": "~18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.*",
"react-dom": "~18.2.0",
"react-i18next": "^13.5.0",
"react-native-paper": "^5.11.0",
"react-native-paper-dates": "^0.18.12",
Expand Down
7 changes: 4 additions & 3 deletions package.serve.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@ionic/cli": "6.20.8",
"@testing-library/react-native": "^12.3.0",
"@types/luxon": "^3.3.0",
"@types/react": "^18.2.20",
"@types/react": "~18.2.0",
"babel-jest": "^29.7.0",
"babel-loader": "^9.1.2",
"babel-plugin-optional-require": "^0.3.1",
Expand All @@ -40,6 +40,7 @@
"jest-environment-jsdom": "^29.7.0",
"phonegap": "9.0.0+cordova.9.0.0",
"process": "^0.11.10",
"react-test-renderer": "~18.2.0",
"sass": "^1.62.1",
"sass-loader": "^13.3.1",
"style-loader": "^3.3.3",
Expand Down Expand Up @@ -76,9 +77,9 @@
"luxon": "^3.3.0",
"npm": "^9.6.3",
"prop-types": "^15.8.1",
"react": "^18.2.*",
"react": "~18.2.0",
"react-chartjs-2": "^5.2.0",
"react-dom": "^18.2.*",
"react-dom": "~18.2.0",
"react-i18next": "^13.5.0",
"react-native-paper": "^5.11.0",
"react-native-paper-dates": "^0.18.12",
Expand Down

0 comments on commit 0f6aabc

Please sign in to comment.