Skip to content

Commit

Permalink
Merge branch 'facebook:main' into feature/text-input-ios-support-for-…
Browse files Browse the repository at this point in the history
…adjusting-caret
  • Loading branch information
OlimpiaZurek authored May 22, 2023
2 parents 2cbd5a3 + 6d24ee1 commit caefbb8
Show file tree
Hide file tree
Showing 464 changed files with 28,468 additions and 9,714 deletions.
74 changes: 23 additions & 51 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,6 @@ jobs:
test_ios:
executor: reactnativeios
parameters:
use_frameworks:
type: boolean
default: false
run_unit_tests:
description: Specifies whether unit tests should run.
type: boolean
Expand Down Expand Up @@ -647,13 +644,6 @@ jobs:
name: Configure Watchman
command: echo "{}" > .watchmanconfig

- when:
condition: << parameters.use_frameworks >>
steps:
- run:
name: Set USE_FRAMEWORKS=1
command: echo "export USE_FRAMEWORKS=1" >> $BASH_ENV

- run:
name: Setup the CocoaPods environment
command: |
Expand Down Expand Up @@ -724,10 +714,6 @@ jobs:
# -------------------------
test_android:
executor: reactnativeandroid
parameters:
run_disabled_tests:
type: boolean
default: false
steps:
- checkout
- setup_artifacts
Expand All @@ -741,18 +727,16 @@ jobs:
- report_bundle_size:
platform: android

- store_test_results:
path: ~/react-native/packages/react-native-gradle-plugin/build/test-results

- store_test_results:
path: ~/react-native/packages/react-native/ReactAndroid/build/test-results

- store_artifacts:
path: ~/react-native/packages/rn-tester/android/app/build/outputs/apk/
destination: rntester-apk

# Optionally, run disabled tests
- when:
condition: << parameters.run_disabled_tests >>
steps:
- run: echo "Failing tests may be moved here temporarily."
- run_e2e:
platform: android

# -------------------------
# JOBS: Test Android Docker Image
# -------------------------
Expand Down Expand Up @@ -937,6 +921,11 @@ jobs:
description: Which React Native architecture to use. Must be one of "OldArch", "NewArch".
type: enum
enum: ["NewArch", "OldArch"]
use_frameworks:
default: "StaticLibraries"
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "StaticFrameworks", "DynamicFrameworks"
type: enum
enum: ["StaticLibraries", "StaticFrameworks", "DynamicFrameworks"]
ruby_version:
default: "2.6.10"
description: The version of ruby that must be used
Expand Down Expand Up @@ -971,6 +960,16 @@ jobs:
export USE_HERMES=0
fi
if [[ << parameters.use_frameworks >> == "StaticFrameworks" ]]; then
export NO_FLIPPER=1
export USE_FRAMEWORKS=static
fi
if [[ << parameters.use_frameworks >> == "DynamicFrameworks" ]]; then
export NO_FLIPPER=1
export USE_FRAMEWORKS=dynamic
fi
cd packages/rn-tester
bundle install
Expand Down Expand Up @@ -1602,8 +1601,7 @@ workflows:
- build_hermesc_windows
- test_js:
run_disabled_tests: false
- test_android:
run_disabled_tests: false
- test_android
- test_android_docker_image
- test_android_template:
requires:
Expand Down Expand Up @@ -1653,11 +1651,6 @@ workflows:
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
Expand All @@ -1673,11 +1666,6 @@ workflows:
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Release"
jsengine: "Hermes"
Expand Down Expand Up @@ -1733,21 +1721,11 @@ workflows:
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "Hermes"
Expand Down Expand Up @@ -1777,6 +1755,7 @@ workflows:
parameters:
architecture: ["NewArch", "OldArch"]
jsengine: ["Hermes", "JSC"]
use_frameworks: ["StaticLibraries", "StaticFrameworks", "DynamicFrameworks"]
- test_ios:
name: "Test iOS with Ruby 2.7.7"
run_unit_tests: true
Expand All @@ -1796,13 +1775,6 @@ workflows:
matrix:
parameters:
jsengine: ["Hermes", "JSC"]
# DISABLED: USE_FRAMEWORKS=1 not supported by Flipper
# - test_ios:
# name: test_ios_frameworks
# use_frameworks: true
# run_unit_tests: true
# requires:
# - build_ios_frameworks
- test_js:
name: test_js_prev_lts
executor: nodeprevlts
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
plugins: ['@react-native/eslint-plugin-specs', 'lint'],

overrides: [
// overriding the JS config from eslint-config-react-native-community config to ensure
// overriding the JS config from @react-native/eslint-config to ensure
// that we use hermes-eslint for all js files
{
files: ['*.js'],
Expand Down
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ untyped-import
untyped-type-import

[version]
^0.204.1
^0.206.0
2 changes: 1 addition & 1 deletion .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ untyped-import
untyped-type-import

[version]
^0.204.1
^0.206.0
8 changes: 4 additions & 4 deletions .github/workflow-scripts/actOnLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @format
*/

module.exports = async (github, context, label) => {
module.exports = async (github, context, labelWithContext) => {
const closeIssue = async () => {
await github.rest.issues.update({
issue_number: context.issue.number,
Expand Down Expand Up @@ -45,7 +45,7 @@ module.exports = async (github, context, label) => {
});
};

switch (label) {
switch (labelWithContext.label) {
case 'Type: Invalid':
await addComment(
`| :warning: | Issue is Invalid |\n` +
Expand Down Expand Up @@ -102,11 +102,11 @@ module.exports = async (github, context, label) => {
);
await requestAuthorFeedback();
return;
case 'Needs: Verify on Latest Version':
case 'Newer Patch Available':
await addComment(
`| :warning: | Newer Version of React Native is Available! |\n` +
`| --- | --- |\n` +
`| :information_source: | You are on a supported minor version, but it looks like there's a newer patch available. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |`,
`| :information_source: | You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |`,
);
return;
case 'Needs: Version Info':
Expand Down
File renamed without changes.
9 changes: 6 additions & 3 deletions .github/workflow-scripts/verifyVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = async (github, context) => {
if (reportedVersionIsNightly(issueVersionUnparsed, issueVersion)) return;

if (!issueVersion) {
return 'Needs: Version Info';
return {label: 'Needs: Version Info'};
}

// Ensure the version matches one we support
Expand All @@ -43,7 +43,7 @@ module.exports = async (github, context) => {
const latestVersion = parseVersionFromString(latestRelease.name);

if (!isVersionSupported(issueVersion, latestVersion)) {
return 'Type: Unsupported Version';
return {label: 'Type: Unsupported Version'};
}

// We want to encourage users to repro the issue on the highest available patch for the given minor.
Expand All @@ -52,7 +52,10 @@ module.exports = async (github, context) => {
recentReleases,
);
if (latestPatchForVersion > issueVersion.patch) {
return 'Needs: Verify on Latest Version';
return {
label: 'Newer Patch Available',
newestPatch: `${issueVersion.major}.${issueVersion.minor}.${latestPatchForVersion}`,
};
}
};

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/on-issue-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ jobs:
with:
script: |
const verifyVersion = require('./.github/workflow-scripts/verifyVersion.js')
const labelToAdd = await verifyVersion(github, context);
const labelWithContext = await verifyVersion(github, context);
if(labelToAdd) {
if(labelWithContext && labelWithContext.label) {
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [labelToAdd]
labels: [labelWithContext.label]
})
const actOnLabel = require('./.github/workflow-scripts/actOnLabel.js')
await actOnLabel(github, context, labelToAdd)
await actOnLabel(github, context, labelWithContext)
}
- name: Add descriptive label
uses: actions/github-script@v6
with:
script: |
const addDescriptiveLabel = require('./.github/workflows/addDescriptiveLabels.js')
const addDescriptiveLabel = require('./.github/workflow-scripts/addDescriptiveLabels.js')
await addDescriptiveLabel(github, context);
# Reacts to the label that triggered this workflow (added manually or via other workflows)
Expand All @@ -54,4 +54,4 @@ jobs:
with:
script: |
const actOnLabel = require('./.github/workflow-scripts/actOnLabel.js')
await actOnLabel(github, context, context.payload.label.name)
await actOnLabel(github, context, {label: context.payload.label.name})
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## v0.71.8

### Fixed

#### Android specific

- Read GROUP name in gradle-plugin dependency code ([615d9aefc4](https://github.com/facebook/react-native/commit/615d9aefc4274ed7a193c0410ed7f86e90ad1bff) by [@douglowder](https://github.com/douglowder))
- Bump RNGP to 0.71.18 ([4bf4c470fe](https://github.com/facebook/react-native/commit/4bf4c470fe4996af02f45c9a9d77c6a790a95362) by [@kelset](https://github.com/kelset))

#### iOS specific

- Do not send extra onChangeText even wnen instantianting multiline TextView ([a804c0f22b](https://github.com/facebook/react-native/commit/a804c0f22b4b11b3d9632dc59a6da14f6c4325e3) by [@dmytrorykun](https://github.com/dmytrorykun))

## v0.71.7

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id("com.android.library") version "7.4.2" apply false
id("com.android.application") version "7.4.2" apply false
id("de.undercouch.download") version "5.0.1" apply false
kotlin("android") version "1.7.22" apply false
kotlin("android") version "1.8.0" apply false
}

val reactAndroidProperties = java.util.Properties()
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"outputName": "js-test-results.xml"
},
"scripts": {
"start": "react-native start",
"start": "cd packages/rn-tester && npm run start",
"android": "cd packages/rn-tester && npm run android",
"test": "jest",
"test-ci": "jest --maxWorkers=2 --ci --reporters=\"default\" --reporters=\"jest-junit\"",
"flow": "flow",
Expand Down Expand Up @@ -51,14 +52,14 @@
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.19.0",
"@babel/eslint-parser": "^7.20.0",
"@babel/generator": "^7.20.0",
"@babel/plugin-transform-regenerator": "^7.0.0",
"@babel/plugin-transform-regenerator": "^7.20.0",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.2.1",
"@react-native/metro-config": "^0.73.0",
"@types/react": "^18.0.18",
"@typescript-eslint/parser": "^5.30.5",
"@typescript-eslint/parser": "^5.57.1",
"async": "^3.2.2",
"babel-plugin-transform-flow-enums": "^0.0.2",
"clang-format": "^1.8.0",
Expand All @@ -77,7 +78,7 @@
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-bin": "^0.204.1",
"flow-bin": "^0.206.0",
"hermes-eslint": "0.8.0",
"inquirer": "^7.1.0",
"jest": "^29.2.1",
Expand All @@ -93,7 +94,7 @@
"react-test-renderer": "18.2.0",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"typescript": "4.1.3",
"typescript": "5.0.4",
"ws": "^6.2.2"
}
}
21 changes: 21 additions & 0 deletions packages/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# @react-native/assets-registry

[![Version][version-badge]][package]

## Installation

```
yarn add --dev @react-native/assets-registry
```

*Note: We're using `yarn` to install deps. Feel free to change commands to use `npm` 3+ and `npx` if you like*

[version-badge]: https://img.shields.io/npm/v/@react-native/assets-registry?style=flat-square
[package]: https://www.npmjs.com/package/@react-native/assets-registry

## Testing

To run the tests in this package, run the following commands from the React Native root folder:

1. `yarn` to install the dependencies. You just need to run this once
2. `yarn jest packages/assets`.
Loading

0 comments on commit caefbb8

Please sign in to comment.