Skip to content

Commit

Permalink
Merge branch 'facebook:main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdhlzq authored May 12, 2023
2 parents 593be3c + a320dce commit 9f36da8
Show file tree
Hide file tree
Showing 713 changed files with 32,107 additions and 11,102 deletions.
21 changes: 7 additions & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -724,10 +724,6 @@ jobs:
# -------------------------
test_android:
executor: reactnativeandroid
parameters:
run_disabled_tests:
type: boolean
default: false
steps:
- checkout
- setup_artifacts
Expand All @@ -741,18 +737,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 @@ -1602,8 +1596,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
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.0
^0.205.1
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.0
^0.205.1
40 changes: 0 additions & 40 deletions .github/CODEOWNERS

This file was deleted.

10 changes: 5 additions & 5 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 All @@ -121,7 +121,7 @@ module.exports = async (github, context, label) => {
await addComment(
`| :warning: | Missing Reproducible Example |\n` +
`| --- | --- |\n` +
`| :information_source: | It looks like your issue is missing a reproducible example. Please provide a [Snack](https://snack.expo.dev) or a repository that demonstrates the issue you are reporting in a [minimal, complete, and reproducible](https://stackoverflow.com/help/minimal-reproducible-example) manner. |`,
`| :information_source: | It looks like your issue is missing a reproducible example. Please provide either: <br /><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/update related: use our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li></ul> |`,
);
await requestAuthorFeedback();
return;
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})
43 changes: 43 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 Expand Up @@ -940,6 +953,20 @@ Read the [announcement blogpost here](https://reactnative.dev/blog/2023/01/12/ve
- Add GitHub token permissions for workflows ([3da3d82320](https://github.com/facebook/react-native/commit/3da3d82320bd035c6bd361a82ea12a70dba4e851) by [@varunsh-coder](https://github.com/varunsh-coder))
- Bump RCT-Folly to 2021-07-22 ([68f3a42fc7](https://github.com/facebook/react-native/commit/68f3a42fc7380051714253f43b42175de361f8bd) by [@luissantana](https://github.com/luissantana))

## v0.69.10

### Fixed

#### Android specific

- Minimize EditText Spans 8/N: CustomStyleSpan ([b384bb613b](https://github.com/facebook/react-native/commit/b384bb613bf533aebf3271ba335c61946fcd3303) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize EditText Spans 6/N: letterSpacing ([5791cf1f7b](https://github.com/facebook/react-native/commit/5791cf1f7b43aed1d98cad7bcc272d97ab659111) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 5/N: Strikethrough and Underline ([0869ea29db](https://github.com/facebook/react-native/commit/0869ea29db6a4ca20b9043d592a2233ae1a0e7a2) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 4/N: ReactForegroundColorSpan ([8c9c8ba5ad](https://github.com/facebook/react-native/commit/8c9c8ba5adb59f7f891a5307a0bce7200dd3ac7d) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 3/N: ReactBackgroundColorSpan ([cc0ba57ea4](https://github.com/facebook/react-native/commit/cc0ba57ea42d876155b2fd7d9ee78604ff8aa57a) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 1/N: Fix precedence ([1743dd7ab4](https://github.com/facebook/react-native/commit/1743dd7ab40998c4d3491e3b2c56c531daf5dc47) by [@NickGerleman](https://github.com/NickGerleman))
- Fix measurement of uncontrolled TextInput after edit ([8a0fe30591](https://github.com/facebook/react-native/commit/8a0fe30591e21b90a3481c1ef3eeadd4b592f3ed) by [@NickGerleman](https://github.com/NickGerleman))

## v0.69.9

### Changed
Expand Down Expand Up @@ -1271,6 +1298,22 @@ Read the [announcement blogpost here](https://reactnative.dev/blog/2023/01/12/ve

- Encode URL params in URLSearchParams.toString() ([1042a8012f](https://github.com/facebook/react-native/commit/1042a8012fb472bd5c882b469fe507dd6279d562) by [@sshic](https://github.com/sshic))

## v0.68.7

### Fixed

- Use logical operator instead of bit operation in Yoga ([c3ad8](https://github.com/facebook/react-native/commit/c3ad8ec7eb01b7236e0081ac7c7f888630caac21) by [@cuva](https://github.com/cuva))

#### Android specific

- Minimize EditText Spans 8/N: CustomStyleSpan ([b384bb613b](https://github.com/facebook/react-native/commit/b384bb613bf533aebf3271ba335c61946fcd3303) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize EditText Spans 6/N: letterSpacing ([5791cf1f7b](https://github.com/facebook/react-native/commit/5791cf1f7b43aed1d98cad7bcc272d97ab659111) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 5/N: Strikethrough and Underline ([0869ea29db](https://github.com/facebook/react-native/commit/0869ea29db6a4ca20b9043d592a2233ae1a0e7a2) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 4/N: ReactForegroundColorSpan ([8c9c8ba5ad](https://github.com/facebook/react-native/commit/8c9c8ba5adb59f7f891a5307a0bce7200dd3ac7d) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 3/N: ReactBackgroundColorSpan ([cc0ba57ea4](https://github.com/facebook/react-native/commit/cc0ba57ea42d876155b2fd7d9ee78604ff8aa57a) by [@NickGerleman](https://github.com/NickGerleman))
- Minimize Spans 1/N: Fix precedence ([1743dd7ab4](https://github.com/facebook/react-native/commit/1743dd7ab40998c4d3491e3b2c56c531daf5dc47) by [@NickGerleman](https://github.com/NickGerleman))
- Fix measurement of uncontrolled TextInput after edit ([8a0fe30591](https://github.com/facebook/react-native/commit/8a0fe30591e21b90a3481c1ef3eeadd4b592f3ed) by [@NickGerleman](https://github.com/NickGerleman))

## v0.68.6

### 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
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 6 additions & 5 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -144,15 +141,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
10 changes: 5 additions & 5 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 @@ -57,9 +58,8 @@
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.2.1",
"@react-native/metro-config": "^0.73.0",
"@reactions/component": "^2.0.2",
"@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 @@ -78,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.0",
"flow-bin": "^0.205.1",
"hermes-eslint": "0.8.0",
"inquirer": "^7.1.0",
"jest": "^29.2.1",
Expand All @@ -94,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 9f36da8

Please sign in to comment.