Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48975
After cutting 0.78-stable, we need to bump the monorepo packages to `0.79.0-main`
## Changelog:
[Internal] - Bump monorepo packages to `0.79.0-main`
Reviewed By: cortinico, huntie
Differential Revision: D68715005
fbshipit-source-id: cb5abbf05e8638683687be8d61d66b3037111572
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48524
I've confirmed that we are no longer using `eslint-plugin-prettier` in Metro or React Native. This removes it from the package dependencies.
Changelog:
[Internal]
Reviewed By: huntie
Differential Revision: D67920511
fbshipit-source-id: 9c8036ccfb94d974d344d861942c076dc2b70125
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48453
Changelog: [internal]
Adds tinybench 3.1.0 (which has support for sync execution) and defined Flow types for the package.
Reviewed By: dmytrorykun
Differential Revision: D66698545
fbshipit-source-id: faf44add74e5711ac0d50794ce3360eedc45f0a5
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48029
Changelog: [Internal]
Adding snapshot support for rendered output only for now.
This will only work if snapshot is created beforehand by hand.
# Next steps
* Create snapshot when no prior snapshot is available
* Pass and update if instructed
Reviewed By: christophpurrer
Differential Revision: D66601387
fbshipit-source-id: fe528cded43c5ba36d314bd9af8e3fb84b98ac3e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48144
Changelog: [internal]
Adds package.json script to run Fantom tests:
```
yarn fantom
```
NOTE: At the moment, this only works on Meta's infra. We're working on making this available in OSS/Github CI.
Reviewed By: javache
Differential Revision: D66874962
fbshipit-source-id: d9746428b618a31ce0bf96c3233828cdba501dd6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47704
Now that we have a min requirement of Node 18.18 on `main`, drop dependency on this polyfill.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D66162328
fbshipit-source-id: e8ab6669fe14ed177eccf4b861c01df4fb0d405a
Summary:
While we're waiting for 19 stable, let's bring main back to 18.3.1 ahead of the 0.77 branch cut. We'll land this change just after 19 stable lands.
This is a cherry pick of b93b378fa0 which landed in 0.76 already
bypass-github-export-checks
## Changelog:
[INTERNAL] - Revert React 19RC to React 18.3.1
Pull Request resolved: https://github.com/facebook/react-native/pull/47380
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D65430775
Pulled By: cortinico
fbshipit-source-id: f0f211754c8ffe5d037fd299e4de52c29d1d7913
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47208
Changelog: [internal]
Small change to unify the yarn commands for feature flags into a single `featureflags` command with options.
Reviewed By: NickGerleman, mdvacca
Differential Revision: D64982509
fbshipit-source-id: 3f9d7ac35f61950bd03fef243e1a95625144a0cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47012
Update Metro from `0.81.0-alpha.2` to `0.81.0`.
This is also intended to be the final, stable release for RN 0.76.
Changelog:
[General][Changed]: Update Metro to 0.81.0
Reviewed By: blakef
Differential Revision: D64329574
fbshipit-source-id: e12bed356b46e4ed68c75b397b7f9e2228c377be
Summary:
This pull request replaces the use of mkdirp with Node.js's built-in fs.mkdirSync({ recursive: true }) function, which is available in Node.js version 10.12.0 and above. This change reduces the number of external dependencies and simplifies the codebase by using the native capabilities of Node.js.
The motivation behind this change is to remove the unnecessary mkdirp dependency, as Node.js natively supports recursive directory creation since version 10.12.0. This streamlines the code and reduces the reliance on external libraries.
## Changelog:
[INTERNAL] [REMOVED] - Replaced mkdirp with fs.mkdirSync({ recursive: true }) in build scripts and codegen. Requires Node.js 10.12.0 and above.
Pull Request resolved: https://github.com/facebook/react-native/pull/46388
Test Plan: I ran the build and codegen scripts locally with Node.js version 10.12.0 and above after replacing mkdirp, ensuring the scripts work as expected. No issues were encountered, and all processes, including directory creation and file handling, function correctly.
Reviewed By: cortinico
Differential Revision: D62852488
Pulled By: huntie
fbshipit-source-id: 76f44102a80b499521c156308d276a17d279ce38
Summary:
This reverts commit 0cb97f0261.
Revert this commit that adds a `post install` script for a couple of reasons:
1. (EDIT: This turns out to be unrelated) The `postinstall` script causes `yarn install` to fail on React Native macOS, where we use Yarn 4. I'm not entirely sure why, but I probably won't debug it for the rest of the reasons.
2. `postinstall` scripts (at least inside Microsoft) are viewed as a security risk. Any package in your dependency tree can get compromised, add the phase, and run arbitrary code. This has happened in the past with React Native past if I recall correctly. As such, we disable `postinstall` scripts in many of our repos (including `rnx-kit` and `react-native-test-app`).
3. The issue this is trying to solve is to help newcomers avoid a stale cache when they switch branches in the React Native monorepo and only run `yarn install`. I think it would be sufficient to add some documentation somewhere that it is expected one runs `yarn && yarn build` to use this repo locally? That's a fairly common practice in monorepos, at least ones inside Microsoft.
## Changelog:
[INTERNAL] [SECURITY] - Remove post install script phase in the React Native monorepo
Pull Request resolved: https://github.com/facebook/react-native/pull/46420
Test Plan: CI should pass
Reviewed By: christophpurrer, robhogan, cortinico, rshest
Differential Revision: D62755022
Pulled By: huntie
fbshipit-source-id: bf94ed33e3e451ea337ef7a6984f7ba964d0b212
Summary:
This change bumps the React Native version in main to 0.77
bypass-github-export-checks
## Changelog:
[General][Changed] - Bump main to 0.77-main
## Facebook:
generated by running `js1 publish react-native 0.77.0-main`
Reviewed By: cortinico
Differential Revision: D62575939
fbshipit-source-id: 6d239fca2eed6cfe51f8c37f78d8dc8730c18b8c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46295
X-link: https://github.com/facebook/metro/pull/1343
Updated all **babel** packages in all `package.json` across the repo and ran `npx yarn-deduplicate yarn.lock --scopes babel`. Afterwards, fixed the following issues appearing as a result of that (squashed the following initially separate diffs to make this packages update work atomically):
### (D61336392) updated jest snapshot tests failing
### (D61336393) updated babel types and corrected typings accordingly
The latest babel 7 introduces the following features we need to adjust our types to:
* `JSXNamespacedName` is removed from valid `CallExpression` args ([PR](https://github.com/babel/babel/pull/16421))
* `JSXNamespacedName` is used for namespaced XML properties in things like `<div namespace:name="value">`, but `fn(namespace:name)` doesn't make any sense.
* Dynamic imports are enabled behind a new flag `createImportExpressions` ([PR](https://github.com/babel/babel/pull/15682)), introducing calls such as `import(foo, options)`. These complicate the expected values passed to `import` to be more than just strings.
* Since these are behind a flag that is not expected to be enabled, we can throw an error for now and whoever uses it can add a support to it if needed later.
### Added a new metro ENV ignore
`BROWSERSLIST_ROOT_PATH` is set to `""` explicitly in `xplat/js/BUCK`
and then ignored in
`js/tools/metro-buck-transform-worker/src/EnvVarAllowList.js`
Reviewed By: robhogan
Differential Revision: D61543660
fbshipit-source-id: abbcab72642cf6dc03eed5142eb78dbcc7f63a86
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46264
React-native was not in sync with metro changes that RN relies on
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D61982240
fbshipit-source-id: 63b1f53174ab0ec663a537569a032c62c431eb83
Summary:
This PR solves a small issue I've encountered when working with the repo.
When changing branches we often run `yarn` to reinstall dependencies (let's say we change from 0.74-stable to main).
There are lots of changes between those two versions in the `react-native-codegen` package. This causes an issue when we install pods in `packages/rn-tester` the old version of codegen is used (the one cached from 0.74-stable) leading to a big error that's hard to solve at first.
This PR solves this by building codegen on `postinstall`. I've seen many newcomers blocked by this issue (and rerunning `yarn` is the natural thing to do in this situation)
## Changelog:
[INTERNAL] [ADDED] - Build codegen on postinstall when working with the monorepo
Pull Request resolved: https://github.com/facebook/react-native/pull/46227
Test Plan: Run `yarn`
Reviewed By: cipolleschi
Differential Revision: D61849150
Pulled By: huntie
fbshipit-source-id: 24fc5cf9b6a2510298f7bcdce59043e5dcfbfdd4