Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47104
In https://github.com/facebook/react-native/pull/46082, the lint configuration for `lint/sort-imports` was accidentally removed.
This has happened on more than one occasion in the past. In order to prevent this from happening again in the future, I'm also adding a Jest integration test to verify that this lint rule is enabled in the `eslintrc.js` configuration.
Changelog:
[Internal]
Reviewed By: robhogan
Differential Revision: D64547410
fbshipit-source-id: ec4f14aff140691b644189dfa3116a3d39285f80
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41051
Strictifies flow to flow strict-local in files where doing that doesn't cause new flow errors.
Changelog: Internal
Reviewed By: yungsters
Differential Revision: D50369011
fbshipit-source-id: b4a5a26b839b7327a3178e6f5b35246dea365a38
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/39064
Creates a new lint rule that enforces the following constraints:
- `react-native/monorepo` cannot have `dependencies`.
- `react-native` cannot have `devDependencies`.
This also includes a lengthy comment in the rule definition explaining why these constraints exist, so that future contributors can make an informed decision when reconsidering these constraints.
Changelog:
[Internal]
Reviewed By: NickGerleman
Differential Revision: D48448633
fbshipit-source-id: 26b0d74b9120ddfd2a6a72bb91f86a98c8d679ef
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36900
This commit effectively removes all the Buck 1 OSS infra code we do have inside
React Native as we'll need to rework most of it once we move to Buck 2
Changelog:
[Internal] [Changed] - Remove Buck OSS 1 setup
Reviewed By: mdvacca, cipolleschi
Differential Revision: D44956134
fbshipit-source-id: c0ad1914286c428480248658c4282df5477bba2b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36866
For consistency with internal build rules, rename this kwarg. This will make it easier to keep both internal and external usages consistent.
Changelog: [General][Changed] react-native-codegen: Buck-only: renamed src_prefix kwarg
Reviewed By: sammy-SC
Differential Revision: D44857745
fbshipit-source-id: 475658281a6c2846be42e130f81e23dfcae5856b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36805
**Changelog:** Export macOS specific dependencies for react-native-codgen
[Internal][Changed] - RN macOS uses an older version of React Native (0.68) so we need to specify macOS specific dependencies when running codegen for RN Desktop
Reviewed By: christophpurrer
Differential Revision: D44687704
fbshipit-source-id: 9dcabc88d4abf17845db0844c952f1cb4a13e3ad
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36843
It already consumes .ts files for native module specs, but not for native components, so let's enable it.
Changelog: [General][Fixed] react-native-codegen Buck support: also process .ts files for native component specs
Reviewed By: cortinico
Differential Revision: D44735387
fbshipit-source-id: 7173e07280dfaec06f08347838824827ef88e31a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36795
This change bump the min iOS version for React Native to 13.4, to align with company guidelines.
## Changelog:
[iOS][Changed] - Moved the min iOS version to 13.4
Reviewed By: cortinico
Differential Revision: D44634663
fbshipit-source-id: 035e8fcbb395f7394f8253e3ec485ad9937531c2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36814
Working through the backlog of failing open source requirements (T139285789). Most files that are violating Copyright rules are due to the exemptions being outdated, but this file actually needs a header.
Changelog: [Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D44705585
fbshipit-source-id: 0319be3be0726a76cd98448205f5af76343ad356
Summary:
Changelog: [General][Removed] Remove experimental support for loading bytecode from Metro
Removes the experimental bundling strategy that offloads Hermes bytecode compilation to the packager server. The React Native parts of this experiment were never part of the public API, and the Metro parts never fully shipped in open source.
Followup from D43597007.
Reviewed By: robhogan
Differential Revision: D43604705
fbshipit-source-id: db3be553750ccbf286d876f75858299c5b750f19
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36531
Changelog: [Internal]
In order to make `react-native/tester` imports work, adding this package to `xplat/js/public`
Also moving devDependecies from `react-native/tester/package.json` to root package json to avoid checking in dev dependencies in `xplat/js/public/node_modules`
Reviewed By: cortinico
Differential Revision: D44030539
fbshipit-source-id: b06e49869cdad6e511b1675d1063a1ceac56e3e6
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36197
[Changelog][Internal]
This turns NativePerformance* module dependencies into "TurboModule plugins", which allows for more streamlined client integration (as it makes them register automatically once the dependency is there).
Reviewed By: rubennorte
Differential Revision: D43353204
fbshipit-source-id: 01d0089750a4873088dc4aefe34fd48693ee9791
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:
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:
Rename this helper to make it explicit what it's used for. There's still more to do here to simplify these.
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D41184338
fbshipit-source-id: a33d306978cb9026ebf10b00853042da4aaecd5a
Summary:
Add TurboModule code-gen support for macOS and Windows
Changelog
[General][Internal] - Add TurboModule code-gen support for macOS and Windows
Reviewed By: javache
Differential Revision: D40140890
fbshipit-source-id: 60d235f16af590c07abddba3d289efa7d1d973c0
Summary:
Creates a new `valid-flow-typed-signature` ESLint rule that validates the `flow-typed` signatures at the top of each file.
This lint rule will discourage contributors from locally forking the `flow-typed` definitions. Instead, any changes should be submitted as patches to the upstream definition in: https://github.com/flow-typed/flow-typed
Changelog:
[Internal]
Reviewed By: rickhanlonii
Differential Revision: D39868721
fbshipit-source-id: e5e3ffe7568dbe52c9b598b53110b0fcbcad3e38
Summary:
Introduces a portable bundle that implements the `sort-imports` ESLint rule that we use internally at Meta, to the React Native repository.
As a consequence of the rapid changes that occur to this rule internally (and the desire to minimize red tape for Meta engineers), the portable bundle is built with Rollup with a lot of context omitted.
Changelog:
[Internal]
Reviewed By: skinsshark
Differential Revision: D39907799
fbshipit-source-id: 58fb6dc08030f20ac02c0e3fd1b175e22e4d74c0
Summary:
This lint rule (and the associated Jest test) fails because `path` on Windows outputs backslashes. This diff fixes the rule.
Changelog:
[Internal]
Reviewed By: cortinico, cipolleschi
Differential Revision: D39887464
fbshipit-source-id: b75480ccf4dcc384e2f7b91d8dcaf3af5f341434
Summary:
Removes the `error-subclass-name` ESLint rule from `react-native/eslint-plugin`, and implements a new `require-extends-error` ESLint rule inside the React Native repository. This rule was only intended to be used for internal development of React Native.
This will change `react-native/eslint-plugin` to no longer provide the `error-subclass-name` rule.
NOTE: One behavior difference here is that I also implemented the desired behavior of checking classes that extend `Library.SomeError`.
Changelog:
[General][Removed] - `react-native/eslint-plugin` no longer provides the `error-subclass-name` rule.
Reviewed By: lunaleaps
Differential Revision: D39858882
fbshipit-source-id: 27b53216d77a15b3425bd9669dbc9d954c1c61da
Summary:
Moves the `no-haste-imports` ESLint rule into the React Native repository because it was only intended to be used for internal development of React Native.
This will change `react-native/eslint-plugin` to no longer provide the `no-haste-imports` rule.
Changelog:
[General][Removed] - `react-native/eslint-plugin` no longer provides the `no-haste-imports` rule.
Reviewed By: lunaleaps
Differential Revision: D39858883
fbshipit-source-id: b8d91ce5996b615341cf60c6f839afac1e26dac9
Summary:
Creates an ESLint rule that prohibits (and autofixes) imports from `react-native` or `react-native/path/to/file`, within the React Native repository.
The ESLint rule is configured using the `eslint-plugin-lint` package instead of `react-native/eslint-plugin` because the rule is only applicable to the React Native repository. The rule does not (and should not) be publicly facing, and changes to the rule should not require publishing new versions of `react-native/eslint-plugin`. (As a follow-up, the `no-haste-imports` rule should be migrated over from `react-native/eslint-plugin`.)
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D39831222
fbshipit-source-id: 566330e6df77fdff5ce755324b9f592b9365019e
Summary:
This is an attempt to fix the `test_buck` CI after the land of 063c2b4668
There were references to internal args that are causing Buck OSS to fail. I'm removing them all.
## Changelog
[Internal] - Do not use kwargs which are not known in Buck OSS
Pull Request resolved: https://github.com/facebook/react-native/pull/34388
Test Plan: If CI is green, we can merge this 👍
Reviewed By: motiz88
Differential Revision: D38619542
Pulled By: cortinico
fbshipit-source-id: e00b4b5da7e181365e63e10aa50d0ecde8024359
Summary:
React Native is compiled downstream with MSVC, meaning the introduction of code depending on language extensions specific to gcc/clang may cause breakage.
We can enable `-Wpedantic` to flag any behavior not officially supported by the specified C++ standard. This will includes rules beyond what MSVC has trouble with, but seems to not have too many "noisy warnings".
This change enables -Wpedantic in BUCK targets within ReactCommon.
This makes the OSS C++ build for Android/iOS slightly more permissive than the internal build, A followup is to add the changes to OSS build logic as well, to avoid contributors seeing more errors upon internal submission. (checking with cortinico on how to do this for Android).
react-native-windows uses a higher warning level than `-Wall`, which is an additional cause of compilation failures, but is not addressed as part of this change.
Changelog:
[Internal][Changed] - Enable -Wpedantic for targets inside ReactCommon
Reviewed By: rshest
Differential Revision: D38457812
fbshipit-source-id: 014da1ac0b7ad8f78154e6e447ed58def6bd0d47
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34161
This is a follow up to D37648363 (64fe67695b) which breaks up `TestBundle.js` into two modules. This enables `TestApps.js` (which defines and exports the set of integration test apps) to be required in the Meta-specific dependency graph without violating our internal naming pattern for JS entry points.
`force_include_bundles` is removed from the `js_glob` macro signature.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D37686883
fbshipit-source-id: 492c13dfcdd76ea8347d4d11c85818e31777c663
Summary:
These changes are a side-effect of a Meta-internal Buck macro change. This does not affect how RNTester is built in open source.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D37648363
fbshipit-source-id: 6fd5d56a7a7a9ea71dc3d0df91e510fcd45a1e17
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33773
I noticed this was a very slow part of my build because each instance of the binary would run its own yarn install. Instead use the yarn_workspace approach to share a single yarn setup.
Changelog: [Internal]
Reviewed By: d16r
Differential Revision: D36164350
fbshipit-source-id: 5290587010fe6021b758bda98bf01995fdf14acd
Summary:
This fixes a mistake I made introduced in D34451208 (a0a2958cda) where the OSS buck file was missing the `rn_codegen_cxx_modules` import.
Changelog:
Internal
Pull Request resolved: https://github.com/facebook/react-native/pull/33197
Reviewed By: JoshuaGross
Differential Revision: D34541508
fbshipit-source-id: d99472b69aed78897b88acabee4a7faa63c7bb72
Summary:
This adjusts the previously unused (but fully working!) `rn_codegen_cxx_modules` rule to be consistent with the other codegen rules and calls it from the `rn_codegen` with the "JSI" suffix to not conflict with the other rules, and to match the convention established by hand-written C++ TurboModules.
Changelog:
Internal
Reviewed By: RSNara
Differential Revision: D34451208
fbshipit-source-id: 4d779b068dfa4f7fd73fd3bca354fffe86d01f73
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33166
`pure_kotlin` kwarg doesn't exist in the OSS Buck definition, so we should remove it
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D34417682
fbshipit-source-id: 24a0d1adb15dc244d37be7ded12e244619cc803c
Summary:
feels like this should be shared across oss
Changelog: [Internal]
Reviewed By: fkgozali
Differential Revision: D32940936
fbshipit-source-id: 76fa8fdac5a768586f7f3e916af2c57685a70e12
Summary:
Changelog: [Internal] Adding an option to change the component name for react native codegen.
This will help some use cases where the target name and the actual component names are different.
Reviewed By: fkgozali
Differential Revision: D32852437
fbshipit-source-id: 054a62214cf8bcfea5662b8fba6582d9d7209f90
Summary:
Noticed we explicitly dropped the `allow_jni_merging` while not actually using it anywhere, and that we didn't have `fbandroid_allow_jni_merging` on some other libs.
Changelog: [Internal]
Reviewed By: RSNara
Differential Revision: D32355868
fbshipit-source-id: 6bd3fcc395e3dcacf4a8fc1033d471b2ffb0e8af
Summary:
I missed some spots where an unsupported key (fbandroid_compiler_flags) was being referenced.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D31796826
fbshipit-source-id: 491b5121ef6461bef4a59c6aef65ce61f683341f