Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .nx/version-plans/version-plan-1771540330218.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
__default__: patch
---

Sync to upstream React Native 0.81.6 release
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-macos/monorepo",
"version": "0.81.1",
"version": "0.81.2",
"license": "MIT",
"packageManager": "yarn@4.12.0",
"scripts": {
Expand Down Expand Up @@ -56,8 +56,8 @@
"@jest/create-cache-key-function": "^29.7.0",
"@microsoft/api-extractor": "^7.52.2",
"@nx/js": "^21.4.1",
"@react-native/metro-babel-transformer": "0.81.5",
"@react-native/metro-config": "0.81.5",
"@react-native/metro-babel-transformer": "0.81.6",
"@react-native/metro-config": "0.81.6",
"@tsconfig/node22": "22.0.2",
"@types/react": "^19.1.4",
"@typescript-eslint/parser": "^7.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.81.5",
"version": "0.81.6",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.81.5",
"version": "0.81.6",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/community-cli-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.81.5",
"version": "0.81.6",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function getResourceIdentifier(asset: PackagerAsset): string {
.toLowerCase()
.replace(/\//g, '_') // Encode folder structure in file name
.replace(/([^a-z0-9_])/g, '') // Remove illegal chars
.replace(/^assets_/, ''); // Remove "assets_" prefix
.replace(/^(?:assets|assetsunstable_path)_/, ''); // Remove "assets_" or "assetsunstable_path_" prefix
}

function getBasePath(asset: PackagerAsset): string {
Expand Down
2 changes: 1 addition & 1 deletion packages/core-cli-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.81.5",
"version": "0.81.6",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/debugger-frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.81.5",
"version": "0.81.6",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
Expand Down
2 changes: 1 addition & 1 deletion packages/debugger-shell/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-shell",
"version": "0.81.5",
"version": "0.81.6",
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
"keywords": [
"react-native",
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-middleware/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.81.5",
"version": "0.81.6",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.81.5",
"version": "0.81.6",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.81.5",
"version": "0.81.6",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-specs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.81.5",
"version": "0.81.6",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/gradle-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.81.5",
"version": "0.81.6",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/metro-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.81.5",
"version": "0.81.6",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/new-app-screen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/new-app-screen",
"version": "0.81.5",
"version": "0.81.6",
"description": "NewAppScreen component for React Native",
"keywords": [
"react-native"
Expand Down
2 changes: 1 addition & 1 deletion packages/normalize-color/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.81.5",
"version": "0.81.6",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/nx-release-version/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native-macos/nx-release-version",
"version": "0.81.1",
"version": "0.81.2",
"description": "Nx Release Version Actions for React Native macOS",
"homepage": "https://github.com/microsoft/react-native-macos/tree/HEAD/packages/nx-release-version#readme",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/polyfills/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.81.5",
"version": "0.81.6",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-babel-preset/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.81.5",
"version": "0.81.6",
"description": "Babel preset for React Native applications",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-babel-transformer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.81.5",
"version": "0.81.6",
"description": "Babel transformer for React Native applications.",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.81.5",
"version": "0.81.6",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-compatibility-check/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/compatibility-check",
"version": "0.81.5",
"version": "0.81.6",
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-popup-menu-android/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.81.5",
"version": "0.81.6",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-test-library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/oss-library-example",
"version": "0.81.5",
"version": "0.81.6",
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
"license": "MIT",
"homepage": "https://github.com/facebook/react-native.git",
Expand Down
16 changes: 16 additions & 0 deletions packages/react-native/React/Base/RCTUtils.mm
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,22 @@ CGSize RCTSwitchSize(void)
return rctSwitchSize;
}

CGSize RCTSwitchSize(void)
{
static CGSize rctSwitchSize;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
RCTUnsafeExecuteOnMainQueueSync(^{
CGSize switchSize = [UISwitch new].intrinsicContentSize;
// Apple does not take into account the thumb border when returning the
// width of the UISwitch component, so we are adding 2 pixels for the border
// which is not customizable and it is the same for legacy and liquid glass.
rctSwitchSize = CGSizeMake(switchSize.width + 2, switchSize.height);
});
});
return rctSwitchSize;
}

CGFloat RCTRoundPixelValue(CGFloat value)
{
CGFloat scale = RCTScreenScale();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1404,14 +1404,14 @@ private void detachRootViewFromInstance(ReactRoot reactRoot, ReactContext reactC
new RuntimeException(
"detachRootViewFromInstance called with ReactRootView with invalid id"));
}

clearReactRoot(reactRoot);
} else {
reactContext
.getCatalystInstance()
.getJSModule(AppRegistry.class)
.unmountApplicationComponentAtRootTag(reactRoot.getRootViewTag());
}

clearReactRoot(reactRoot);
}

@ThreadConfined(UI)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,9 +679,6 @@ public synchronized void removeRootView(int rootViewTag) {
View rootView = mTagsToViews.get(rootViewTag);
dropView(rootView);
mRootTags.delete(rootViewTag);
if (rootView != null) {
rootView.setId(View.NO_ID);
}
}

/**
Expand Down
14 changes: 7 additions & 7 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"peerDependencies": {
"@types/react": "^19.1.4",
"react": "^19.1.4",
"react-native": "0.81.5"
"react-native": "0.81.6"
},
"peerDependenciesMeta": {
"@types/react": {
Expand All @@ -167,12 +167,12 @@
"dependencies": {
"@jest/create-cache-key-function": "^29.7.0",
"@react-native-macos/virtualized-lists": "0.81.2",
"@react-native/assets-registry": "0.81.5",
"@react-native/codegen": "0.81.5",
"@react-native/community-cli-plugin": "0.81.5",
"@react-native/gradle-plugin": "0.81.5",
"@react-native/js-polyfills": "0.81.5",
"@react-native/normalize-colors": "0.81.5",
"@react-native/assets-registry": "0.81.6",
"@react-native/codegen": "0.81.6",
"@react-native/community-cli-plugin": "0.81.6",
"@react-native/gradle-plugin": "0.81.6",
"@react-native/js-polyfills": "0.81.6",
"@react-native/normalize-colors": "0.81.6",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"ansi-regex": "^5.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ exports[`execute test-app "ReactAppDependencyProvider.podspec" should match snap
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.1\\"
version = \\"0.81.2\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down Expand Up @@ -399,7 +399,7 @@ exports[`execute test-app "ReactCodegen.podspec" should match snapshot 1`] = `
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.1\\"
version = \\"0.81.2\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down Expand Up @@ -840,7 +840,7 @@ exports[`execute test-app-legacy "ReactAppDependencyProvider.podspec" should mat
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.1\\"
version = \\"0.81.2\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down Expand Up @@ -878,7 +878,7 @@ exports[`execute test-app-legacy "ReactCodegen.podspec" should match snapshot 1`
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

version = \\"0.81.1\\"
version = \\"0.81.2\\"
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
Expand Down
2 changes: 1 addition & 1 deletion packages/rn-tester/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/tester",
"version": "0.81.5",
"version": "0.81.6",
"description": "React Native tester app.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/typescript-config",
"version": "0.81.5",
"version": "0.81.6",
"description": "Default TypeScript configuration for React Native apps",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion private/cxx-public-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/cxx-public-api",
"version": "0.81.5",
"version": "0.81.6",
"description": "Captures the Objective-C / C++ public API of React Native",
"main": "public-api.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion private/eslint-plugin-monorepo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-monorepo",
"version": "0.81.5",
"version": "0.81.6",
"main": "index.js",
"dependencies": {
"jsonc-eslint-parser": "^2.3.0"
Expand Down
10 changes: 5 additions & 5 deletions private/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native/babel-preset": "0.81.5",
"@react-native/core-cli-utils": "0.81.5",
"@react-native/eslint-config": "0.81.5",
"@react-native/metro-config": "0.81.5",
"@react-native/typescript-config": "0.81.5",
"@react-native/babel-preset": "0.81.6",
"@react-native/core-cli-utils": "0.81.6",
"@react-native/eslint-config": "0.81.6",
"@react-native/metro-config": "0.81.6",
"@react-native/typescript-config": "0.81.6",
"@types/jest": "^29.5.14",
"commander": "^12.0.0",
"eslint": "^8.19.0",
Expand Down
2 changes: 1 addition & 1 deletion private/monorepo-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@react-native/monorepo-tests",
"version": "0.81.5",
"version": "0.81.6",
"private": true
}
2 changes: 1 addition & 1 deletion private/react-native-bots/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/bots",
"version": "0.81.5",
"version": "0.81.6",
"license": "MIT",
"engines": {
"node": ">= 20.19.4"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen-typescript-test",
"version": "0.81.5",
"version": "0.81.6",
"description": "TypeScript related unit test for @react-native/codegen",
"license": "MIT",
"engines": {
Expand Down
Loading
Loading