Summary:
Color support for AnimatedInterpolation was incomplete with native drivers, as only rgba type strings were supported. There was also an issue where color props instead a StyleAnimatedNode would never get applied. We were also potentially duplicating color parsing support, which is already centralized in normalizeColor / processColor.
Changelog: [iOS][Added] Enable AnimatedInterpolation to interpolate arbitrary color types.
Reviewed By: philIip
Differential Revision: D41649337
fbshipit-source-id: 505ba555b6a79113635fdfb35c6fe69c92d82234
Summary:
This PR prevents blob data from being prematurely de-allocated in native code when using slice to create views into an existing blob. Currently, whenever a new blob is created via createFromOptions, BlobManager.js creates a new blobCollector object since options.__collector is never provided.
dc80b2dcb5/Libraries/Blob/BlobManager.js (L115-L123)
When the reference to a blobCollector is garbage collected, the corresponding native memory for the blob data is de-allocated.
27651720b4/Libraries/Blob/RCTBlobCollector.mm (L19-L25)
Since, `blob.slice()` is supposed to create a new view onto the same binary data as the original blob, we need to re-use the same collector object when slicing so that it is not GC'd until the last reference to the binary data is no longer reachable. Currently, since each blob slice gets a new blobCollector object, the memory is de-allocated when the first blob is GC'd.
Fixes https://github.com/facebook/react-native/issues/29970
Fixes https://github.com/facebook/react-native/issues/27857
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[iOS] [Fixed] - Blob data is no longer prematurely deallocated when using blob.slice
Pull Request resolved: https://github.com/facebook/react-native/pull/31392
Test Plan: I could use help coming up with a test plan here. I could add a referential equality check for the blob.data.__collector in `Blob-test` but it doesn't seem quite right to be testing the implementation detail there.
Reviewed By: javache
Differential Revision: D41730782
Pulled By: cortinico
fbshipit-source-id: 5671ae2c69908f4c9acb5d203ba198b41b421294
Summary:
D40660765 (3982a2c6bd) introduced extra logging for abnormal closes. The websocked 'close' event may not be called with the event argument.
Changelog: [Internal] - Fix for undefined websocket close
Reviewed By: jacdebug, cortinico
Differential Revision: D41731339
fbshipit-source-id: 92b28dcc0d55d0e9e32b4f4321f325fb3471edcd
Summary:
Newer versions of Buck (not released open source) support an `oncall` annotation to denote who owns a particular BUCK file. These annotations are useful to support so that if BUCK files are updated with such annotations they don't break.
## Changelog
[Internal] [Changed] - support oncall annotation in BUCK files
Pull Request resolved: https://github.com/facebook/react-native/pull/35562
Test Plan: The `test_buck` CI job validates that the file can be evaluated by open-source Buck. I ran this on a CircleCI fork, and it passed.
Reviewed By: motiz88
Differential Revision: D41731925
Pulled By: cortinico
fbshipit-source-id: 7d0ae164c3e6289d4aa76892658d46bbe4faf99c
Summary:
This note was added when upgrading from 0.69x to 0.70.x when `hermes_enabled` is explicitly set to `true`.
<img width="669" alt="Screenshot 2022-12-05 at 11 26 15" src="https://user-images.githubusercontent.com/36528176/205543104-b4a72c1c-57c0-422b-881e-8a0cb9d5c2a1.png">
But on 0.71, we are now using `get_default_flags` again which makes the note obsolete.
## Changelog
[Internal] [Removed] - removed hermes note
Pull Request resolved: https://github.com/facebook/react-native/pull/35555
Test Plan: N/A
Reviewed By: dmytrorykun
Differential Revision: D41731004
Pulled By: cortinico
fbshipit-source-id: d5f377062bf94fa73bc6e73d1f108e37ad68c715
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35539
This file is unused now that we rely on RNGP. We should be able to remove it
in the next stable release 0.72. In 0.71 we shipped it with a removal warning,
and users should not rely on it anymore.
Changelog:
[Android] [Removed] - Remove the react.gradle file as it's unused
Reviewed By: rshest
Differential Revision: D41655709
fbshipit-source-id: 20860da5e596d35738eea5748c791d3d923dc4fb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35540
We now don't need to generate .mk files anymore, therefore I'm removing
this logic from the codegen. In RN 0.72 users should be fully migrated
to CMake.
Changelog:
[Android] [Removed] - Remove .mk prebuilt file and .mk file generation from codegen
Reviewed By: rshest
Differential Revision: D41654122
fbshipit-source-id: 3a3c01fa8ab4d48460338e1a9ce2ecbd6df25f47
Summary:
A codemod landed which broke our public CI as it added
disable_infer_precompiled_header which is not known to Buck OSS. This ignores the argument like we do for other internal parameter types.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D41729615
fbshipit-source-id: 30601d793b15cca3164d0513882da94064b47996
Summary:
D41708199 (3e91415696) updated `deprecated-react-native-prop-types` so we should be able to re-enable this test, which I previously disabled as part of making RN tests fail on `console.error()`/`console.warn()` (i.e. any test unintentionally creating a redbox/yellowbox).
Changelog:
[Internal]
Reviewed By: yungsters
Differential Revision: D41724052
fbshipit-source-id: 4e91809940c4bf9bde416367326167598a4d1354
Summary:
This PR extracts the content of the codegen case `'Array'` and `'ReadOnlyArray'` into a single `emitArrayType` function inside the `parsers-primitives.js` file and uses it in both Flow and TypeScript parsers as requested on https://github.com/facebook/react-native/issues/34872. This also adds unit tests to the new `emitArrayType` function.
## Changelog
[Internal] [Changed] - Extract the content of the case 'Array' and 'ReadOnlyArray' into a single emitArrayType function
Pull Request resolved: https://github.com/facebook/react-native/pull/35546
Test Plan:
Run `yarn jest react-native-codegen` and ensure CI is green
![image](https://user-images.githubusercontent.com/11707729/205375599-3bbf02bf-85b5-41e6-ae77-fc6e12bee538.png)
Reviewed By: christophpurrer
Differential Revision: D41700084
Pulled By: rshest
fbshipit-source-id: 4bfd2d3ab3f1343bb401ba9c278dc0e0e1ea0989
Summary:
[Changelog][Internal]
The NativePerformance module functionality corresponds to the [timing extensions of the Performance API standard interface](https://www.w3.org/TR/user-timing/#extensions-performance-interface).
As this is logically separate from `PerformanceObserver` (which may exist without it), it makes sense to have it as a different native module, so there is no coupling between both.
Reviewed By: christophpurrer
Differential Revision: D41690145
fbshipit-source-id: 7443f4c51f54cc2fdddbdb2e89f9a1fa457ab280
Summary:
[Changelog][Internal]
Addresses the corresponding TODO in code, to make sure that PerformanceObserver.observe may be called multiple times with different entry types to observe.
Reviewed By: christophpurrer
Differential Revision: D41686237
fbshipit-source-id: 4287f63f7e71e5b1056d30ed616149841ba4f892
Summary:
[Changelog][Internal]
The name corresponds more precisely to what the method does.
Reviewed By: christophpurrer
Differential Revision: D41686205
fbshipit-source-id: 36c47b57fdeb757515cd14b890f38247f7fe8d02
Summary:
[Changelog][Internal]
A follow up to the [discussion](https://www.internalfb.com/diff/D41496082 (14e69db482)?dst_version_fbid=831443041436872&transaction_fbid=1281583632681733) in D41496082 (14e69db482), this gets rid of the non-private fields in the `PerformanceObserver` - both to prevent abuse and better conform to the standard.
Reviewed By: rubennorte
Differential Revision: D41683363
fbshipit-source-id: 1fc98ff77e0bcdbf66c2a768e8b27a726831f106
Summary:
Changelog: [Internal]
Codemod-bot already hardcoded this to false a while back, so cleaning up the code related to it.
Reviewed By: RSNara
Differential Revision: D41615378
fbshipit-source-id: 7b62b20b8e25f0a06d207b2457d6caf9ad5c695e
Summary:
A flakey CDN is 404'ing the Java dep. Caching the Choco dependencies should stop this.
## Changelog
[Internal] [Fixed] - Cache Choco dependencies to stop erratic 404s on Java 8 install.
Pull Request resolved: https://github.com/facebook/react-native/pull/35399
Test Plan: Bump the PR to see if it's caching.
Reviewed By: huntie
Differential Revision: D41684462
Pulled By: blakef
fbshipit-source-id: f3eac9e8a00be33f7c3f0996f35abb63146cb3c4
Summary:
The `react-native-xcode` script assumes the that `node_modules` folder are in the same location as the react native project. This adds the ability to declare `CUSTOM_DIR` in `.xcode.env` file to let react-native-xcode know where the react native project is located - required for monorepos
## Issue
At the moment if a project is not using the default react native file structure then when trying to create a build or archive using Xcode it will fail, with the following error:
> File /Users/itxch/Library/Developer/Xcode/DerivedData/app-evgjukoxhuupzzdglopjnhcntvpw/Build/Intermediates.noindex/ArchiveIntermediates/jungul/BuildProductsPath/Release-iphoneos/app.app/main.jsbundle does not exist. This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues
## Background
My project is a monorepo, using `npm` workspaces.
#### This is the relevant file structure
![files](https://user-images.githubusercontent.com/54910400/203641210-596ee866-9f9f-429c-8bae-62d0f3afc623.png)
This file structure is incompatible with line 63 of `react-native-xcode.sh`
c5a8425fad/scripts/react-native-xcode.sh (L63)
Note: `$REACT_NATIVE_DIR` is the `react-native` package directory inside node modules.
So by default this sets project root to be the parent folder of the `node_modules` folder. However in my case this is not correct, it should actually be:
```sh
PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../../app"}
```
## Solution
Seeing as hardcoding the value would not work, the simplest solution is to set the directory via a variable
```sh
PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../../$CUSTOM_DIR"}
```
`$CUSTOM_DIR` can easily be set via `.xcode.env` file.
## Changelog
[IOS] [Added] - allow for custom project dir in react-native-xcode script
Pull Request resolved: https://github.com/facebook/react-native/pull/35449
Test Plan:
After updating my `.xcode.env` file to include `export CUSTOM_DIR=app`, I can successfully create a build or an archive.
If the variable is not set it will be black, so it will not effect `$PROJECT_ROOT`
Reviewed By: GijsWeterings
Differential Revision: D41529396
Pulled By: cortinico
fbshipit-source-id: 890e9867e31f83a08561df8c2de1069e771726fc
Summary:
Revert the template `Podfile` to using `react-native-community/cli-platform-ios/native_modules`. The new internal script currently has a hard-coded path to `react-native-community/cli-platform-ios` which may not work in monorepos. The path in the `Podfile` is also hard-coded, but this is a file that the user has access to and can fix themselves if necessary.
## Changelog
[iOS] [Fixed] - Don't use the internal `native_modules.rb` script yet, as it hides a hard-coded path
Pull Request resolved: https://github.com/facebook/react-native/pull/35531
Test Plan: n/a
Reviewed By: rshest
Differential Revision: D41682119
Pulled By: cortinico
fbshipit-source-id: 1822fcd20a794dc9df6e8d6f36615e90b42c1a94
Summary:
- Untracking StackDump files through `.gitignore`
- Most of the programs like shell (bash) **_crashes_** it generates **_StackDump_**; `*.stackdump` file(s)
- Such files are only for low level debugging purpose and _shouldn't be tracked_
- PS: When using integrated terminals on IDEs it's common to have these files especially on Win m/c :)
## Changelog
[Internal] [Changed] - Untracking Stack Dumps; `*.stackdump` files
Pull Request resolved: https://github.com/facebook/react-native/pull/35530
Test Plan: - [NO-CODE] Diff
Reviewed By: rshest
Differential Revision: D41653070
Pulled By: cortinico
fbshipit-source-id: 0727feb66daa286d077743a451643970555e9c20
Summary:
Refactor unique -> shared pointer in Component. This will be necessary in the next diffs of the stack
changelog: [intenal] internal
Differential Revision: D41629759
fbshipit-source-id: 335161c350692e25ac3443bd19675a89f9df60c4
Summary:
When this was done ad43deca23 (most likely because the scripts folder is not type-checked) some references to this script were left lying around.
This PR takes care of it.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[Internal] [Fixed] - remove leftover code for tmpPublishingFolder
Pull Request resolved: https://github.com/facebook/react-native/pull/35528
Test Plan: Running `yarn test-e2e-local` doesn't insta-fail.
Reviewed By: cortinico
Differential Revision: D41656151
Pulled By: GijsWeterings
fbshipit-source-id: 5fcf7fabce30076f90d92087a4f1e429903dfc0b
Summary:
`react-native/eslint-config` enables rules for TypeScript and `.js` files (as Flow), but seems to completely no-op if you have a `.jsx` file. Enabling it in an override leads to syntax errors because the config has not been enlightened on how to parse JSX.
This would normally happen if a config extended `plugin:react/recommended`, but we are already cutomizing the React plugin rules. So we instead just directly set `ecmaFeatures: {jsx: true}` as reccomended by https://github.com/jsx-eslint/eslint-plugin-react.
Changelog:
[General][Breaking] - Fix react-native/eslint-config linting of jsx files
Reviewed By: rickhanlonii
Differential Revision: D41654962
fbshipit-source-id: 778da0928fadb86caa6a33254379d3d7dd394892
Summary:
Consolidates creation of OkHttpClients used by RN panel apps into PanelAppOkHttpClientProvider. This diff adds no functional changes; however, a followup diff will leverage this to add an Interceptor for overriding the network tier.
Changelog:
[Internal] - Enable passing in custom OkHttpClient to NetworkingModule
Reviewed By: rshest
Differential Revision: D41621244
fbshipit-source-id: 8954f9adc6a0cfdf6312678e2dbd6be8ef9aa5ca
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35526
[Changelog][Internal]
This closes the full loop according to the [technical design](https://fb.quip.com/MdqgAk1Eb2dV) of the WebPerf API implementation, with the main components and the working central data flow in place.
The next step is to add some buffering/throttling, as in this diff we just spawn an idle-priority task after every performance entry coming (even though they still naturally do come in batches, because they manage to accumulate before the task is executed).
Reviewed By: christophpurrer
Differential Revision: D41496082
fbshipit-source-id: 5fd4cf22e75806f7bc98d1d1b6691596ccadf8b9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35525
[Changelog][Internal]
Adds ability to invoke an async JS callback from a C++ native module, as a task with priority.
This will allow native modules to schedule less important calls to JS thread with lower priority. One example use case is feeding collected perf metrics back to JS.
Reviewed By: javache
Differential Revision: D41492849
fbshipit-source-id: 12f738557972dc23398d9bb9a7a01125c79da070
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35529
ESLint configuration is derived from `react-native/eslint-config`, which has supported Flow, vanilla JS, and TypeScript.
https://github.com/react-native-community/react-native-template-typescript/pull/238 and a related PR ended up adding new rules to the TypeScript config, to fix bugs with TS linting. It required a followup change, to specify the parser/plugin, and explicity reference them as devDependencies. https://github.com/react-native-community/react-native-template-typescript/pull/240
`react-native/eslint-config` already includes setting the plugin/parser. But overriding rules requires declaring that again, and directly referencing a plugin means a need for the app to declare dependencies, since ESLint resolves modules from the current config.
The rules overridedn were later fixed in `react-native/eslint-config`, which is really the right place for the fix (e.g. https://github.com/facebook/react-native/pull/32644). I noticed this when deriving from the TS template in https://github.com/facebook/react-native/pull/32644 and removed the rule overrides, but didn't have the historical context to realize this means we can then:
1. Remove the explicit parser/plugins since `react-native/eslint-config` already sets them, and we are no longer overriding any rules.
2. Remove the devDependencies, to let the versions be managed entirely by `react-native/eslint-config`.
Changelog:
[General][Changed] - Simplify Template ESLint Configuration
Reviewed By: cortinico
Differential Revision: D41652699
fbshipit-source-id: 8e3313dbf27407c5866f3c2432cffc2ecec1b01d
Summary:
On main, We download and store `hermes.tar.gz` locally during builds.
If another commit on the Hermes repo lands, Gradle might not re-download the hermes.tar.gz
file.
This commit fixes it by using `useETag` that allows us to use ETag that Github exposes
to understand if the tarball has been updated or not.
Changelog:
[Internal] [Changed] - Ensure local hermes.tar.gz doesn't get stale between subsequent runs.
Reviewed By: javache
Differential Revision: D41652865
fbshipit-source-id: 9f6e02957989acb02f419286c94b05df701c8a04
Summary:
[PR: Avoid emitting mountitems for default values](56e9aa369f) used a constexpr in a template, which windows is unable to compile since type at this point is incomplete. Once removed, windows is able to build again. Let me know if there's a better way to fix this!
See [10072](https://github.com/microsoft/react-native-windows/issues/10072) for windows error messages
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Fixed] - Remove constexpr from RectangleEdges.h
Pull Request resolved: https://github.com/facebook/react-native/pull/35516
Test Plan: Windows has forked this file and had the change for ~5 month, all tests pass on Windows side
Reviewed By: javache
Differential Revision: D41639514
Pulled By: rshest
fbshipit-source-id: fbe595f71a7ab0accb7a76edf58ffb6aeef1ae96
Summary:
This makes it so that React Native unit tests will fail if code unexpectedly outputs a warning or error (which would show as a redbox error).
This logic split out from the normal `jest/setup.js` which is included by the jest-preset, to only effect our tests instead of existing RN Jest users.
Changelog:
[Internal][Changed] - Fail tests on `console.error()` or `console.warn()`
Reviewed By: huntie
Differential Revision: D41564032
fbshipit-source-id: 3cc7d3a8433fcb75f654669b9c350dea2da937a8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35521
Inside RC3 the jscexecutor target was prepared for prefab consumption
but not properly exposed.
This was not caught by the CI as we're not effectively using this target,
but some of our popular libraries do (i.e. Reanimated). I'm exposing it here.
Changelog:
[Internal] [Changed] - Properly expose `jscexecutor` as a prefab target
Reviewed By: javache
Differential Revision: D41648349
fbshipit-source-id: 1a04bc21aa50eece304828ce1d99ae795a51af48
Summary:
Yoga tries to use `std::bit_cast<>()` where it's available and falls back to
`std::memcpy()` everywhere else. Unfortunately, the feature-test macro
(`__cpp_lib_bit_cast`) is only defined if the feature is available *and you have
already included either `<version>` or `<bit>`* (or something else that includes
one of those). Since `CompactValue.h` checks `__cpp_lib_bit_cast` *first*, it's
not defined even if it *would be* defined, leading the header not to
`#include <bit>`, leaving `std::bit_cast<>()` undefined; later, other headers
from the STL are included, leading to `__cpp_lib_bit_cast` *becoming* defined
and causing later code to choose to use the undefind `std::bit_cast<>()`.
This diff fixes the problem by `#include`ing either `<version>` or `<ciso646>`
(depending on availability) before checking any feature-test macros.
Changelog: [Internal]
Reviewed By: smeenai
Differential Revision: D41641205
fbshipit-source-id: 7d7bc5791c902a45302d3707e6cbf21fc0493f0c
Summary:
This change adds a new action and workflow that will run whenever a commit is pushed that closes a PR via its message. When this happens, the corresponding PR will be labeled with "Merged" and a comment will be added with the name of the committer and the sha of the commit that resolved the PR.
This is not new functionality - it merely replaces a portion of the react-native-bot's functionality with a GitHub action.
## Changelog
[Internal] [Changed] - Moved close PR actions to a GitHub action
Pull Request resolved: https://github.com/facebook/react-native/pull/35500
Test Plan:
Tested the golden path here ("Merged" label and comment added): https://github.com/SlyCaptainFlint/react-native/pull/27
Tested the case where a PR already labeled with Merged was processed and no new comment was left on it (simulates the case where react-native-bot, which is still going to be running, got to the PR and processed it before the new GitHub action did): https://github.com/SlyCaptainFlint/react-native/pull/26
Reviewed By: cipolleschi
Differential Revision: D41567047
Pulled By: SlyCaptainFlint
fbshipit-source-id: 23745a17950b75c1a8f25f0b840c2172332c4cfa
Summary:
Update `babel/*` dependencies specifying `^7.x.y` where `x > 0` to the latest available semver minor, and corresponding superficial snapshot updates reflecting a small decrease in JS bundle size.
- `babel/core` to `^7.20.0`
- `babel/parser` to `^7.20.0`
- `babel/preset-env` to `^7.20.0`
- `babel/traverse` to `^7.20.0`
- `babel/cli` to `^7.19.0`
- `babel/eslint-parser` to `^7.19.0`
- `babel/preset-flow` to `^7.18.0`
- `babel/preset-syntax-flow` to `^7.18.0`
- Deduplicate / refresh others to take in patch updates
Changelog: [Internal] Bump Babel dependencies to latest 7.x
Reviewed By: JoeyMou
Differential Revision: D41449678
fbshipit-source-id: f04fe837a7961c4e2dde45fed59fcd138c2f8723
Summary: `dispatchPreallocationInBackground_` is removed and we don't need to use the lambda function anymore.
Reviewed By: javache
Differential Revision: D41574447
fbshipit-source-id: 9c2b8a067fb86b75320b338e3f8c7989315f9b8b
Summary:
Color support for AnimatedInterpolation was incomplete with native drivers, as only rgba type strings were supported. There was also an issue where color props instead a StyleAnimatedNode would never get applied. We were also potentially duplicating color parsing support, which is already centralized in normalizeColor / processColor.
Changelog: [iOS][Added] Enable AnimatedInterpolation to interpolate arbitrary color types.
Reviewed By: sammy-SC
Differential Revision: D40632443
fbshipit-source-id: 4dfb29edca4b919474408b43c3917ac9406a147a
Summary:
Color support for AnimatedInterpolation was incomplete with native drivers, as only rgba type strings were supported. There was also an issue where color props instead a StyleAnimatedNode would never get applied. We were also potentially duplicating color parsing support, which is already centralized in `normalizeColor` / `processColor`.
Changelog: [Android][Added] Enable AnimatedInterpolation to interpolate arbitrary color types.
Reviewed By: mdvacca
Differential Revision: D40571873
fbshipit-source-id: 41857ab0391279c5307bc31b855ea8fbcb4cccd8
Summary:
Restructured the JS implementation of AnimatedInterpolation to make it clearer how colors and other string-based interpolatables are supported. We're then able to use a very similar structure to implement this interpolation on the native driver as well, which simplifies implementation, and improves support for different color types.
Changelog: [General][Fixed] Improved support for AnimatedInterpolation of color props.
Reviewed By: mdvacca
Differential Revision: D40571890
fbshipit-source-id: 7c204a7b736722732dc5f9e0d158ef5af81b4bb1
Summary:
[Changelog][Internal]
Adds API definition for [Performance.mark](https://www.w3.org/TR/user-timing/#mark-method) support.
This is a bare bone implementation, that just logs events on the native side. The next step is the native logic for queuing, flushing etc.
Note that here I route both JS and native marks to native for now, for simplicity sake - ultimately this may not be what we want, as it may be more efficient to process marks, logged from JS, on the JS side.
Reviewed By: rubennorte
Differential Revision: D41472148
fbshipit-source-id: bdf2b182b8472a71a5500235849bca5af1c2f360
Summary:
This PR is a subtask of https://github.com/facebook/react-native/issues/34872
Moved `translateArrayTypeAnnotation` (Flow,TS) fns to `parsers-primitives.js`
- combined `Flow` and `TS` `translateArrayTypeAnnotation` fn 's into common fn
- moved it to `parsers-primitives.js`
- re-organized imports and exports :)
## Changelog
[Internal] [Changed] - Moved `translateArrayTypeAnnotation` (Flow,TS) fns to `parsers-primitives.js`
Pull Request resolved: https://github.com/facebook/react-native/pull/35479
Test Plan:
- ensure 👇 is `#00ff00`
`yarn lint && yarn flow && yarn test-ci`
Reviewed By: cipolleschi
Differential Revision: D41548046
Pulled By: GijsWeterings
fbshipit-source-id: 8fd7214f8b1e669ba42f326f814674eec179fed5