Files
react-native/packages/react-native-compatibility-check/src/__tests__/ErrorFormattingTests.js
T
Eli White 60e3921f9c Initial Open Sourcing of React Native Compatibility Check (#49340)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49340

This tool enables checking the boundary between JavaScript and Native for
backwards incompatible changes to protect against crashes.

This is useful for:

- Local Development
- Over the Air updates on platforms that support it
- Theoretically: Server Components with React Native

Check out the Readme for more information

Changelog: [General][Added] Open Sourcing React Native's Compatibility Check

Reviewed By: panagosg7

Differential Revision: D69476742

fbshipit-source-id: 8af6039839c5475c1258fa82d9750a9320cf0751
2025-02-12 08:24:13 -08:00

151 lines
4.4 KiB
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
* @oncall react_native
*/
export const okayChanges = [
[
'native-module-before-after-types-removed/NativeModuleBeforeAfterTypes',
'native-module-before-after-types/NativeModuleBeforeAfterTypes',
],
[
'native-module-get-constants/NativeModule',
'native-module-get-constants-added-optional-constant/NativeModule',
],
[
'native-module-with-enum-from-native-changes/NativeModule',
'native-module-with-enum-from-native/NativeModule',
],
[
'native-module-with-union/NativeModule',
'native-module-with-union-changes/NativeModule',
],
[
'native-component-with-command/NativeComponent',
'native-component-with-command/NativeComponent',
],
[
'native-component-with-props/NativeComponent',
'native-component-with-props-default-change/NativeComponent',
],
];
export const incompatibleChanges = [
[
'native-module-before-after-types/NativeModuleBeforeAfterTypes',
'native-module-before-after-types-removed/NativeModuleBeforeAfterTypes',
],
[
'native-module-before-after-types/NativeModuleBeforeAfterTypes',
'native-module-before-after-types-type-changed/NativeModuleBeforeAfterTypes',
],
['native-module/NativeModule', 'native-module-changed/NativeModule'],
[
'native-module-nested/NativeModule',
'native-module-nested-changed/NativeModule',
],
[
'native-module-nested-optional/NativeModule',
'native-module-nested/NativeModule',
],
[
'native-module-nested-nullable/NativeModule',
'native-module-nested-optional/NativeModule',
],
[
'native-module-nested-optional/NativeModule',
'native-module-nested-changed/NativeModule',
],
[
'native-module-nested-alias/NativeModule',
'native-module-nested-alias-changed/NativeModule',
],
[
'native-module-with-dictionary/NativeModule',
'native-module-with-dictionary-changed/NativeModule',
],
[
'native-module-with-enum-changes/NativeModule',
'native-module-with-enum/NativeModule',
],
[
'native-module-with-enum/NativeModule',
'native-module-with-enum-type-changes/NativeModule',
],
[
'native-module-with-enum/NativeModule',
'native-module-with-enum-value-changes/NativeModule',
],
[
'native-module-with-enum-from-native/NativeModule',
'native-module-with-enum-from-native-changes/NativeModule',
],
[
'native-module-with-enum-from-native/NativeModule',
'native-module-with-enum-from-native-type-changes/NativeModule',
],
[
'native-module-with-enum-from-native/NativeModule',
'native-module-with-enum-from-native-value-changes/NativeModule',
],
[
'native-module-with-eventemitter/NativeModule',
'native-module-with-eventemitter-changes/NativeModule',
],
[
'native-module/NativeModule',
'native-module-with-optional-argument/NativeModule',
],
[
'native-module-with-union/NativeModule',
'native-module-with-union-type-changes/NativeModule',
],
[
'native-module-with-union-changes/NativeModule',
'native-module-with-union/NativeModule',
],
[
'native-module-with-union-from-native/NativeModule',
'native-module-with-union-from-native-changes/NativeModule',
],
[
'native-module-with-union/NativeModule',
'native-module-with-union-confusing-string-literals/NativeModule',
],
[
'native-component-with-command/NativeComponent',
'native-component-with-command-changed/NativeComponent',
],
[
'native-component-with-command-all-basic-types-arrays/NativeComponent',
'native-component-with-command-all-basic-types/NativeComponent',
],
[
'native-component-with-command-extra-arg/NativeComponent',
'native-component-with-command/NativeComponent',
],
[
'native-component-with-props/NativeComponent',
'native-component-with-props-changes/NativeComponent',
],
[
'native-component-with-props/NativeComponent',
'native-component-with-props-added-required-prop/NativeComponent',
],
[
'native-component-with-props-union-added/NativeComponent',
'native-component-with-props-union/NativeComponent',
],
[
'native-component-with-props-array-union-added/NativeComponent',
'native-component-with-props-array-union/NativeComponent',
],
];