Skip to content

Commit

Permalink
chore: [IOPLT-764] Upgrade to react-native 0.75 (#6348)
Browse files Browse the repository at this point in the history
> [!note]
> This PR depends on pagopa/io-cie-sdk#53 pagopa/io-react-native-jwt#34
pagopa/io-react-native-crypto#32
## Short description
This PR bumps react-native to 0.75 and updates all necessary
dependencies.

## List of changes proposed in this pull request
- Upgrade react-native to v 0.75.4
- Updates yarn to version 3
- Updates CI workflows
- Removed Danger script
- Adds PR linter and Link to Jira issue action to replace Danger

## How to test
Anything should work as expected.

---------

Co-authored-by: LazyAfternoons <[email protected]>
Co-authored-by: Damiano Plebani <[email protected]>
Co-authored-by: LazyAfternoons <[email protected]>
  • Loading branch information
4 people authored Dec 17, 2024
1 parent 10f4351 commit fd27f42
Show file tree
Hide file tree
Showing 149 changed files with 30,279 additions and 19,329 deletions.
22 changes: 12 additions & 10 deletions .github/actions/setup-composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@ description: 'This action collects the steps to setup any job'
runs:
using: "composite"
steps:
- id: enable-corepack
shell: bash
run: corepack enable
- id: setup-node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
with:
node-version-file: '.node-version'
- id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
shell: bash
- id: yarn-cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
- id: install-packages
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
shell: bash
- id: generate-api-client
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/danger.yml

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/pr-title-linter-and-linker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: "Lint and Link PR title"

on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize

jobs:
lint:
name: Validate PR title And link Jira Issue
runs-on: ubuntu-22.04
env:
JIRA_COMMENT_REGEX: "^.*Jira.*"
steps:
- uses: Slashgear/action-check-pr-title@860e8dc639f8e60335a6f5e8936ba67ed2536890 #v4.3.0
id: lint
with:
regexp: "\\[(#?[A-Z]*-[0-9]*,?){1,}\\]" # Regex the title should match.
continue-on-error: true

- name: Find Jira Comment
uses: peter-evans/find-comment@81e2da3af01c92f83cb927cf3ace0e085617c556 #v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "github-actions[bot]"
body-regex: "${{ env.JIRA_COMMENT_REGEX }}"

- name: Extract Jira Issue to Link
id: extract_jira_issue
if: steps.lint.outcome == 'success'
run: |
PR_TITLE=$(echo "${{ github.event.pull_request.title }}")
ISSUES_STR=$(awk -F'\\[|\\]' '{print $2}' <<< "$PR_TITLE" | sed "s/#//g")
IFS=',' read -ra ISSUES <<< "$ISSUES_STR"
JIRA_ISSUE=$(echo "${ISSUES[-1]}" | sed 's/^ *//;s/ *$//')
MARKDOWN_CARRIAGE_RETURN="<br>"
MARKDOWN_PREFIX="- Link to"
JIRA_COMMENT_MARKDOWN="This Pull Request refers to Jira issues:<br>"
if [[ ${#ISSUES[@]} -eq 1 ]]; then
JIRA_COMMENT_MARKDOWN="This Pull Request refers to the following Jira issue"
MARKDOWN_PREFIX=""
fi
for ISSUE in "${ISSUES[@]}"; do
ISSUE=$(echo "$ISSUE" | sed 's/^ *//;s/ *$//') # Trim spaces
JIRA_COMMENT_MARKDOWN+="$MARKDOWN_PREFIX [$ISSUE](https://pagopa.atlassian.net/browse/$ISSUE) $MARKDOWN_CARRIAGE_RETURN"
done
echo "JIRA_ISSUE=$JIRA_ISSUE" >> $GITHUB_ENV
echo "JIRA_COMMENT_MARKDOWN=$JIRA_COMMENT_MARKDOWN" >> $GITHUB_ENV
- name: Create Jira Link comment
if: steps.lint.outcome == 'success'
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 #v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Jira Pull Request Link ##
${{ env.JIRA_COMMENT_MARKDOWN }}
edit-mode: replace
- name: Create Empty Jira Link comment
if: steps.lint.outcome != 'success'
uses: peter-evans/create-or-update-comment@5adcb0bb0f9fb3f95ef05400558bdb3f329ee808 #v2
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## Jira Pull request Link ##
It seems this Pull Request has no issues that refers to Jira!!!
Please check it out.
edit-mode: replace
- name: Failure message
if: steps.lint.outcome != 'success'
run: |
echo "Pull request title (${{ github.event.pull_request.title }}) is not properly formatted or it is not related to any Jira issue"
exit 1
13 changes: 9 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
**/.xcode.env.local

# Ruby / CocoaPods
/ios/Pods/
**/Pods/
/vendor/bundle/

# Android/IntelliJ
Expand Down Expand Up @@ -112,5 +112,10 @@ sentry.properties
# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# yarn cache dir
.yarn/cache
# Yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.4.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enableScripts: true

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs
16 changes: 0 additions & 16 deletions Dangerfile.ts

This file was deleted.

7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ source "https://rubygems.org"
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '>=2.6.10'

# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
# bound in the template on Cocoapods with next React Native release.
gem 'cocoapods', '>= 1.13', '< 1.15'
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem "fastlane", "~> 2.223.1"
gem 'activesupport', '>= 6.1.7.3', '< 7.1.0'
51 changes: 32 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ GEM
base64
nkf
rexml
activesupport (7.0.8.1)
activesupport (7.1.5.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
securerandom (>= 0.3)
tzinfo (~> 2.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
Expand All @@ -35,11 +43,13 @@ GEM
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
claide (1.1.0)
cocoapods (1.14.3)
cocoapods (1.16.2)
addressable (~> 2.8)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.14.3)
cocoapods-core (= 1.16.2)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 2.1, < 3.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
Expand All @@ -53,8 +63,8 @@ GEM
molinillo (~> 0.8.0)
nap (~> 1.0)
ruby-macho (>= 2.3.0, < 3.0)
xcodeproj (>= 1.23.0, < 2.0)
cocoapods-core (1.14.3)
xcodeproj (>= 1.27.0, < 2.0)
cocoapods-core (1.16.2)
activesupport (>= 5.0, < 8)
addressable (~> 2.8)
algoliasearch (~> 1.0)
Expand All @@ -77,12 +87,14 @@ GEM
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
declarative (0.0.20)
digest-crc (0.6.5)
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
drb (2.2.1)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.16.0)
Expand Down Expand Up @@ -158,7 +170,7 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
ffi (1.16.3)
ffi (1.17.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
Expand Down Expand Up @@ -202,19 +214,21 @@ GEM
http-cookie (1.0.7)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.4)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jmespath (1.6.2)
json (2.7.2)
json (2.9.0)
jwt (2.9.3)
base64
logger (1.6.3)
mini_magick (4.13.2)
mini_mime (1.1.5)
minitest (5.22.3)
minitest (5.25.4)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.4.1)
nanaimo (0.3.0)
mutex_m (0.3.0)
nanaimo (0.4.0)
nap (1.1.0)
naturally (2.2.1)
netrc (0.11.0)
Expand All @@ -229,12 +243,12 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.9)
strscan
rexml (3.4.0)
rouge (2.0.7)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
securerandom (0.3.2)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
Expand All @@ -244,7 +258,6 @@ GEM
simctl (1.6.10)
CFPropertyList
naturally
strscan (3.1.0)
terminal-notifier (2.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
Expand All @@ -260,13 +273,13 @@ GEM
uber (0.1.0)
unicode-display_width (2.6.0)
word_wrap (1.0.0)
xcodeproj (1.24.0)
xcodeproj (1.27.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty-travis-formatter (1.0.1)
Expand All @@ -276,8 +289,8 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (>= 6.1.7.3, < 7.1.0)
cocoapods (>= 1.13, < 1.15)
activesupport (>= 6.1.7.5, != 7.1.0)
cocoapods (>= 1.13, != 1.15.1, != 1.15.0)
fastlane (~> 2.223.1)

RUBY VERSION
Expand Down
Loading

0 comments on commit fd27f42

Please sign in to comment.