Skip to content

[pull] main from microsoft:main #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Conversation

pull[bot]
Copy link

@pull pull bot commented Apr 24, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

Can you help keep this open source service alive? 💖 Please sponsor : )

## Summary:

It's not clear (both to humans and to build tools like `nx`) that the
only packages we fork from the React Native monorepo upstream are `
'react-native' --> 'react-native-macos'` and
`'@react-native/virtualized-lists' -->
'@react-native-mac/virtualized-lists'`. The rest of the packages should
essentially only ever be used in local development, while the published
package `react-native-macos` uses the upstream versions of these
packages. We can solve this by marking the packages as private.

## Test Plan:

IIRC, this caused some build failure last time I tried this.. let's see
how CI reacts to this change. Further testing with `nx release` should
be done locally to make sure the nx build graph stops marking the
unforked monoreppo packages as dependencies.
@pull pull bot added the ⤵️ pull label Apr 24, 2025
hansenyy and others added 16 commits May 15, 2025 16:22
## Summary:

`findLastestVersionWithArtifact` fails to find older versions of Hermes
prebuilds because the Maven endpoint it uses does not return all
versions.

Resolves #2499

## Test Plan:

`pod install` output from RNTA with RN 0.78.2 and RNM 0.78.3

![image](https://github.com/user-attachments/assets/a6984ba0-87c0-4304-95d1-4a5b054b44fa)
## Summary:

`TextPropsMacOS` has been using `MouseEvent` defined by web as opposed
to React's.

## Test Plan:

n/a
… non null (#2515)

## Summary:

Internally, we build with
[UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html),
which caught an instance of a method returning nil while marked as non
null. Apple documentation says that method should return an empty array
as a fallback, so let's do that.

## Test Plan:

Tested internally.
## Summary:

I found that RNTester works with Hermes, so let's enable it in our CIs!

This requires a bit of extra finagling to get the correct version. The
implementation of `podspec_source_build_from_github_merge_base` shows
how to do this.

## Test Plan:

If CIs pass, we're good!

---------

Co-authored-by: Adam Gleitman <[email protected]>
## Summary:

I had previously created a documentation website in a new repo at
r[eact-native-macos-docs](https://github.com/microsoft/react-native-macos-docs),
however due to how Github Pages works, I can't easily publish that to
microsoft.github.io/react-native-macos. So... let's move it here.

## Test Plan:

`yarn start` deploys the website locally, successfully.
The `yarn start` command in `packages/rn-tester` was failing because the
binary name in the `react-native` package didn't match the package name
`react-native-macos`.

## Problem
- Running `yarn start` in `packages/rn-tester` resulted in "command not
found: react-native-macos"
- Users had to use `npx react-native-macos start` as a workaround
- The issue was that the `bin` field in
`packages/react-native/package.json` defined the binary as
`"react-native"` instead of `"react-native-macos"`

## Solution
1. **Updated binary name**: Changed the `bin` field in
`packages/react-native/package.json` from `"react-native": "cli.js"` to
`"react-native-macos": "cli.js"` to match the package name
2. **Fixed script paths**: Updated the `start` and `android` scripts in
`packages/rn-tester/package.json` to use the correct relative path to
the binary: `../../node_modules/.bin/react-native-macos`

## Testing
- ✅ `yarn start` now works from `packages/rn-tester` directory
- ✅ `yarn start` works from root directory (delegates to rn-tester)
- ✅ `npx react-native-macos start` continues to work as before
- ✅ Test scripts in `scripts/objc-test.sh` continue to work (they use
`yarn start` from rn-tester context)

Both the standard React Native workflow (`yarn start`) and the existing
workaround (`npx react-native-macos start`) now function correctly.

Fixes #2528.

> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> -
`https://api.github.com/repos/react-native-community/rn-diff-purge/tags`
> - Triggering command: `node
/home/REDACTED/work/react-native-macos/react-native-macos/node_modules/.bin/react-native
start ` (http block)
> - Triggering command: `node ../../node_modules/.bin/react-native-macos
start ` (http block)
> - Triggering command: `/usr/local/bin/node
../../node_modules/.bin/react-native-macos start ` (http block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to my [firewall allow
list](https://gh.io/copilot/firewall-config)
>
> </details>



<!-- START COPILOT CODING AGENT TIPS -->
---

💬 Share your feedback on Copilot coding agent for the chance to win a
$200 gift card! Click
[here](https://survey.alchemer.com/s3/8343779/Copilot-Coding-agent) to
start the survey.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Saadnajmi <[email protected]>
Bumps [undici](https://github.com/nodejs/undici) from 5.28.5 to 5.29.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nodejs/undici/releases">undici's
releases</a>.</em></p>
<blockquote>
<h2>v5.29.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix tests in v5.x for Node 20 by <a
href="https://github.com/mcollina"><code>@​mcollina</code></a> in <a
href="https://redirect.github.com/nodejs/undici/pull/4104">nodejs/undici#4104</a></li>
<li>Removed clients with unrecoverable errors from the Pool <a
href="https://redirect.github.com/nodejs/undici/pull/4088">nodejs/undici#4088</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/nodejs/undici/compare/v5.28.5...v5.29.0">https://github.com/nodejs/undici/compare/v5.28.5...v5.29.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodejs/undici/commit/9528f6853a72a637823e863f1dd12ec47a3fc9e7"><code>9528f68</code></a>
Bumped v5.29.0</li>
<li><a
href="https://github.com/nodejs/undici/commit/f1d75a4e107866110c48003f00e5d0de52ef2cce"><code>f1d75a4</code></a>
increase timeout for redirect test</li>
<li><a
href="https://github.com/nodejs/undici/commit/2d31ed61f7ca12ef6d89a323dc236346364ac379"><code>2d31ed6</code></a>
remove fuzzing tests</li>
<li><a
href="https://github.com/nodejs/undici/commit/6b36d49cb2fa14217baa11b6fd27ee20b661ea4c"><code>6b36d49</code></a>
fix redirect test in Node v16</li>
<li><a
href="https://github.com/nodejs/undici/commit/648dd8f7ba3654db09a095361a167e3576db8cd0"><code>648dd8f</code></a>
more fix for the wpt runner on Windows</li>
<li><a
href="https://github.com/nodejs/undici/commit/a0516bae59b6aa8aa8124f9ae5cfed79541d10e2"><code>a0516ba</code></a>
don't use internal header state for cookies (<a
href="https://redirect.github.com/nodejs/undici/issues/3295">#3295</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/87ce4af0e58657506cedb2d07a5ba24f964b733f"><code>87ce4af</code></a>
fix test/client for node 20</li>
<li><a
href="https://github.com/nodejs/undici/commit/c2c8fd55b778267ad8b2e9ee04218c038a5d02af"><code>c2c8fd5</code></a>
fix: accept v20 SSL specific error for alpn selection in http/2</li>
<li><a
href="https://github.com/nodejs/undici/commit/82200bd10b7073ac235f8fc48d4daa82b350cd4c"><code>82200bd</code></a>
[v6.x] fix wpts on windows (<a
href="https://redirect.github.com/nodejs/undici/issues/4093">#4093</a>)</li>
<li><a
href="https://github.com/nodejs/undici/commit/47546fa68d04eec5b96ab93225c3bc08b77cd94f"><code>47546fa</code></a>
test: fix windows wpt (<a
href="https://redirect.github.com/nodejs/undici/issues/4050">#4050</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nodejs/undici/compare/v5.28.5...v5.29.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=undici&package-manager=npm_and_yarn&previous-version=5.28.5&new-version=5.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/react-native-macos/network/alerts).

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…2531)

## Summary:

This is a follow-up to #2524 where we expect the RNCore version to be
explicitly specified as a peer dependency in our stable branches.

#2530 brings this in for 0.74-stable; this brings it into the main
branch for cherry-picking into other branches.

## Test Plan:

If CIs pass, we're good.

This shouldn't do anything on the main branch anyway, since we don't run
through any of the peer dependency logic. Either way, a quick run of
RNTester validates that we're still getting our Hermes version via the
same `git merge-base` approach.

---------

Co-authored-by: Adam Gleitman <[email protected]>
## Summary:

Discovered when cherry-picking #2531 into #2530. I didn't catch it
before because we don't actually run through this part on the main
branch.

## Test Plan:

No effects on main branch, but #2530 CIs should succeed now.

Co-authored-by: Adam Gleitman <[email protected]>
## Summary:

Our NX release dry run job depends on a read-only GitHub token (I'm
pretty sure...) which is hard to get with Azure Pipelines. Let's move
the job to Github Actions. In the process, I also updated both the dry
run and the Azure Pipelines publish job to read our publish tag directly
from `nx.json` instead of having it set in YAML. Not sure why we didn't
do that earlier.. I'll have to go check those PRs to see if we had a
strong reason.

## Test Plan:

CI should pass
The `verifyNpmAuth` function in `.ado/scripts/prepublish-check.mjs` was
failing in CI with:

```
❌ Auth token for 'https://registry.npmjs.org/' returned error code E403
```

This occurred because the function performs two npm checks:
1. `npm whoami --registry <registry>` - verifies user authentication ✅
2. `npm token list --registry <registry>` - attempts to list user tokens
❌

While the first check succeeds (confirming the user is authenticated),
the second check fails with E403 because some npm tokens don't have
permission to list tokens, even though they can publish packages
successfully.

## Solution

Made a minimal change to treat E403 errors from `npm token list` as
non-fatal warnings:

```javascript
// Before - All token list errors were fatal
throw new Error(`Auth token for '${registry}' returned error code ${errorCode}`);

// After - E403 is non-fatal, others still throw
if (errorCode === "E403") {
  info(`Token verification skipped: token doesn't have permission to list tokens (${errorCode})`);
} else {
  throw new Error(`Auth token for '${registry}' returned error code ${errorCode}`);
}
```

## Benefits

- ✅ **Fixes CI publishing** - No more E403 failures blocking npm publish
jobs
- ✅ **Maintains security** - `npm whoami` still validates authentication
properly
- ✅ **Preserves existing behavior** - All other error codes (E401,
ENEEDAUTH, etc.) still throw as before
- ✅ **Zero breaking changes** - Fully backward compatible
- ✅ **Clear logging** - Informative message when E403 occurs

## Testing

- Script syntax validation passes
- Code formatting with Prettier is correct
- Manual testing confirms E403 errors are now non-fatal
- All other error scenarios continue to work as expected
- Script runs successfully with all existing options

This surgical fix resolves the specific CI authentication issue while
preserving all existing safeguards and functionality.

Fixes #2546.

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.

Co-authored-by: Saad Najmi <[email protected]>
## Summary:

Add a link to React Native Windows on our docs site. Remove some
redundant files while we're at it.

## Test Plan:

<img width="1712" alt="image"
src="https://github.com/user-attachments/assets/697cb911-846a-4a61-a9cd-00cb00f72670"
/>
## Summary:

Function keys on macOS currently get dispatched with the value from the
underlying NS*FunctionKey code point. For instance, a `F12` event gets
dispatched as `\uf70f` for
[NS12FunctionKey](https://developer.apple.com/documentation/appkit/nsf12functionkey?language=objc).
To clean this up, we should dispatch the same strings we use on other
platforms (i.e. `'F12'` for the F12 key).

## Test Plan:
I used a pressable component with a `onKeyDown` handler in
`RNTester-macOS` to test keyboard events. With this change, the function
keys come in as `F12`, `F11` etc... instead of the underlying
NS*FunctionKey code points.

---------

Co-authored-by: Colin Heffernan <[email protected]>
## Summary:

This is fixed upstream with
facebook#52472 . Let's commit (and
backport) a smaller fix for now.

## Test Plan:

Minimal repro of bug is this code below. Basically, you can't focus on
"Pressable Child 2" twice by clicking on the container

```
      <Pressable style={{backgroundColor: 'lightblue', padding: 10, gap: 10}} onPress={() => {myRef.current.focus();}}>
          <Text>Pressable Container</Text>
          <Pressable><Text>Pressable Child 1</Text></Pressable>
          <Pressable ref={myRef}><Text>Pressable Child 2</Text></Pressable>
          <Pressable><Text>Pressable Child 3</Text></Pressable>
      </Pressable>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants