Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdriver authored Jul 4, 2023
2 parents 6b10e1f + 9c0441b commit cbdc60e
Show file tree
Hide file tree
Showing 830 changed files with 34,650 additions and 16,844 deletions.
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# and build a Android application that can be used to run the
# tests specified in the scripts/ directory.
#
FROM reactnativecommunity/react-native-android:8.0
FROM reactnativecommunity/react-native-android:9.0

LABEL Description="React Native Android Test Image"
LABEL maintainer="Meta Open Source <opensource@meta.com>"
Expand Down
35 changes: 19 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ references:
# -------------------------
dependency_versions:
xcode_version: &xcode_version "14.3.0"
nodelts_image: &nodelts_image "cimg/node:18.12.1"
nodeprevlts_image: &nodeprevlts_image "cimg/node:16.18.1"
nodelts_image: &nodelts_image "cimg/node:20.2.0"
nodeprevlts_image: &nodeprevlts_image "cimg/node:18.12.1"

# -------------------------
# Cache Key Anchors
Expand All @@ -60,8 +60,8 @@ references:
gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }}
gradle_cache_key: &gradle_cache_key v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "packages/react-native/ReactAndroid/gradle.properties" }}
hermes_workspace_cache_key: &hermes_workspace_cache_key v5-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
hermes_workspace_debug_cache_key: &hermes_workspace_debug_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_workspace_release_cache_key: &hermes_workspace_release_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_workspace_debug_cache_key: &hermes_workspace_debug_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
hermes_workspace_release_cache_key: &hermes_workspace_release_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
hermes_linux_cache_key: &hermes_linux_cache_key v1-hermes-{{ .Environment.CIRCLE_JOB }}-linux-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-windows-{{ checksum "/Users/circleci/project/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
hermes_tarball_debug_cache_key: &hermes_tarball_debug_cache_key v4-hermes-tarball-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
Expand Down Expand Up @@ -113,7 +113,7 @@ executors:
reactnativeandroid:
<<: *defaults
docker:
- image: reactnativecommunity/react-native-android:8.0
- image: reactnativecommunity/react-native-android:9.0
resource_class: "xlarge"
environment:
- TERM: "dumb"
Expand Down Expand Up @@ -795,7 +795,7 @@ jobs:
name: Create Android template project
command: |
REPO_ROOT=$(pwd)
node ./scripts/set-rn-template-version.js "file:$REPO_ROOT/build/$(cat build/react-native-package-version)"
node ./scripts/update-template-package.js "{\"react-native\":\"file:$REPO_ROOT/build/$(cat build/react-native-package-version)\"}"
node ./scripts/template/initialize.js --reactNativeRootPath $REPO_ROOT --templateName $PROJECT_NAME --templateConfigPath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME"
- run:
name: Build the template application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
Expand All @@ -814,7 +814,7 @@ jobs:
./gradlew assemble<< parameters.flavor >> -PREACT_NATIVE_MAVEN_LOCAL_REPO=/root/react-native/maven-local
- store_artifacts:
path: /tmp/$PROJECT_NAME/android/app/build/outputs/apk/
path: /tmp/AndroidTemplateProject/android/app/build/outputs/apk/
destination: template-apk

# -------------------------
Expand Down Expand Up @@ -879,17 +879,13 @@ jobs:
REPO_ROOT=$(pwd)
PACKAGE=$(cat build/react-native-package-version)
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE"
node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
node ./scripts/update-template-package.js "{\"react-native\":\"file:$PATH_TO_PACKAGE\"}"
node ./scripts/template/initialize.js --reactNativeRootPath $REPO_ROOT --templateName $PROJECT_NAME --templateConfigPath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME"
- run:
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>; Flipper << parameters.flipper >>
command: |
cd /tmp/$PROJECT_NAME/ios
if [[ << parameters.flavor >> == "Release" ]]; then
export PRODUCTION=1
fi
if [[ << parameters.architecture >> == "NewArch" ]]; then
export RCT_NEW_ARCH_ENABLED=1
fi
Expand All @@ -908,8 +904,9 @@ jobs:
export USE_FRAMEWORKS=dynamic
fi
cd ..
bundle install
bundle exec pod install
bundle exec pod install --project-directory=ios
- run:
name: Build template project
command: |
Expand Down Expand Up @@ -1071,9 +1068,15 @@ jobs:
name: Enable Yarn with corepack
command: corepack enable

# it looks like that, last week, envinfo released version 7.9.0 which does not works
# with Windows. I have opened an issue here: https://github.com/tabrindle/envinfo/issues/238
# TODO: T156811874 - Revert this to npx envinfo@latest when the issue is addressed
- run:
name: Display Environment info
command: npx envinfo@latest
command: |
npm install -g envinfo
envinfo -v
envinfo
- restore_cache:
keys:
Expand Down Expand Up @@ -1132,7 +1135,7 @@ jobs:
# -------------------------
prepare_hermes_workspace:
docker:
- image: debian:11
- image: debian:bullseye
environment:
- HERMES_WS_DIR: *hermes_workspace_root
- HERMES_VERSION_FILE: "packages/react-native/sdks/.hermesversion"
Expand All @@ -1143,7 +1146,7 @@ jobs:
command: |
apt update
apt install -y wget git curl
curl -sL https://deb.nodesource.com/setup_16.x | bash -
curl -sL https://deb.nodesource.com/setup_18.x | bash -
apt install -y nodejs
npm install --global yarn
- checkout
Expand Down
17 changes: 8 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ module.exports = {
'no-undef': 0,
},
},

{
files: ['flow-typed/**/*.js'],
rules: {
'lint/valid-flow-typed-signature': 2,
'no-unused-vars': 0,
quotes: 0,
},
},
{
files: ['packages/react-native/Libraries/**/*.js'],
rules: {
Expand All @@ -46,14 +53,6 @@ module.exports = {
'lint/sort-imports': 1,
},
},
{
files: ['packages/react-native/flow-typed/**/*.js'],
rules: {
'lint/valid-flow-typed-signature': 2,
'no-unused-vars': 0,
quotes: 0,
},
},
{
files: [
'**/__fixtures__/**/*.js',
Expand Down
7 changes: 5 additions & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
.*/node_modules/.*

[libs]
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
packages/react-native/flow-typed/

[options]
enums=true
conditional_type=true
mapped_type=true
type_guards=true

emoji=true

Expand Down Expand Up @@ -75,4 +78,4 @@ untyped-import
untyped-type-import

[version]
^0.206.0
^0.211.0
7 changes: 5 additions & 2 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
.*/node_modules/.*

[libs]
flow-typed/
packages/react-native/interface.js
packages/react-native/flow/
packages/react-native/flow-typed/

[options]
enums=true
conditional_type=true
mapped_type=true
type_guards=true

emoji=true

Expand Down Expand Up @@ -75,4 +78,4 @@ untyped-import
untyped-type-import

[version]
^0.206.0
^0.211.0
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: 📦 Metro Issue
url: https://github.com/facebook/metro/issues/new
about: |
If you've encountered a module resolution problem, e.g. "Error: Unable to resolve module ...", or something else that might be related to Metro, please open an issue in the Metro repo instead.
- name: 📃 Documentation Issue
url: https://github.com/facebook/react-native-website/issues
about: Please report documentation issues in the React Native website repository.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflow-scripts/verifyVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = async (github, context) => {
const issue = context.payload.issue;

// Ignore issues using upgrade template (they use a special label)
if (issue.labels.find(label => label.name == 'Type: Upgrade Issue')) {
if (issue.labels.find(label => label.name === 'Type: Upgrade Issue')) {
return;
}

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/autorebase.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
name: Automatic Rebase
# This workflow is used to automatically rebase a PR when a comment is made
# containing the text "/rebase". It uses the cirrus-actions/rebase action.
# See https://github.com/cirrus-actions/rebase
on:
issue_comment:
types: [created]
permissions:
contents: read
jobs:
rebase:
permissions:
contents: write # for cirrus-actions/rebase to push code to rebase
pull-requests: read # for cirrus-actions/rebase to get info about PR
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
permissions:
contents: write # for cirrus-actions/rebase to push code to rebase
pull-requests: read # for cirrus-actions/rebase to get info about PR
runs-on: ubuntu-latest
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.7
uses: cirrus-actions/rebase@1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ DerivedData
*.xcuserstate
project.xcworkspace
**/.xcode.env.local
/poackages/react-native/sdks/downloads/

# Gradle
/build/
Expand All @@ -38,6 +39,7 @@ project.xcworkspace
/packages/react-native/ReactAndroid/gradlew.bat
/packages/react-native/ReactAndroid/external-artifacts/build/
/packages/react-native/ReactAndroid/external-artifacts/artifacts/
/packages/react-native/ReactAndroid/flipper-integration/build/
/packages/react-native/ReactAndroid/hermes-engine/build/
/packages/react-native/ReactAndroid/hermes-engine/.cxx/
/packages/react-native/template/android/app/build/
Expand Down
12 changes: 11 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@
"requirePragma": true,
"singleQuote": true,
"trailingComma": "all",
"endOfLine": "lf"
"endOfLine": "lf",
"overrides": [
{
"files": [
"*.js"
],
"options": {
"parser": "hermes"
}
}
]
}
Loading

0 comments on commit cbdc60e

Please sign in to comment.