Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions packages/eslint-plugin-react-native/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ const publicAPIMapping = {
default: 'Button',
types: ['ButtonInstance', 'ButtonProps'],
},
'Libraries/Components/Clipboard/Clipboard': {
default: 'Clipboard',
types: null,
},
'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid': {
default: 'DrawerLayoutAndroid',
types: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ module.exports = new Set([
'AppState',
'AsyncStorage',
'BackHandler',
'Clipboard',
'DeviceInfo',
'Dimensions',
'Easing',
Expand Down
8 changes: 1 addition & 7 deletions packages/react-native/ReactNativeApi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<2ceaa8e472a53fc667994edb63ccd995>>
* @generated SignedSource<<0df40052762a394474666f7090b89f69>>
*
* This file was generated by scripts/js-api/build-types/index.js.
*/
Expand Down Expand Up @@ -163,10 +163,6 @@ declare const Button_default: (
ref?: React.Ref<ButtonInstance>
},
) => React.ReactNode
declare const Clipboard: {
getString(): Promise<string>
setString(content: string): void
}
declare const codegenNativeCommands: typeof codegenNativeCommands_default
declare const codegenNativeComponent: typeof codegenNativeComponent_default
declare const compose: typeof composeStyles_default
Expand Down Expand Up @@ -1717,7 +1713,6 @@ declare class CellRenderMask {
equals(other: CellRenderMask): boolean
numCells(): number
}
declare type Clipboard = typeof Clipboard
declare type codegenNativeCommands = typeof codegenNativeCommands
declare function codegenNativeCommands_default<T extends {}>(
options: NativeCommandsOptions<keyof T & string>,
Expand Down Expand Up @@ -5796,7 +5791,6 @@ export {
Button, // 35d2ff2d
ButtonInstance, // 8d4861a8
ButtonProps, // 5f462ce0
Clipboard, // 41addb89
CodegenTypes, // 9067fd06
ColorSchemeName, // 6615edd6
ColorValue, // 98989a8f
Expand Down
25 changes: 16 additions & 9 deletions packages/react-native/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,15 +236,6 @@ module.exports = {
get BackHandler() {
return require('./Libraries/Utilities/BackHandler').default;
},
get Clipboard() {
warnOnce(
'clipboard-moved',
'Clipboard has been extracted from react-native core and will be removed in a future release. ' +
"It can now be installed and imported from '@react-native-clipboard/clipboard' instead of 'react-native'. " +
'See https://github.com/react-native-clipboard/clipboard',
);
return require('./Libraries/Components/Clipboard/Clipboard').default;
},
get codegenNativeCommands() {
return require('./Libraries/Utilities/codegenNativeCommands').default;
},
Expand Down Expand Up @@ -443,4 +434,20 @@ if (__DEV__) {
);
},
});

/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access Clipboard. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access Clipboard. */
Object.defineProperty(module.exports, 'Clipboard', {
configurable: true,
get() {
invariant(
false,
'Clipboard has been removed from react-native core. ' +
"It can now be installed and imported from '@react-native-clipboard/clipboard' instead of 'react-native'. " +
'See https://github.com/react-native-clipboard/clipboard',
);
},
});
}
2 changes: 0 additions & 2 deletions packages/react-native/index.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ export type {
export type {BackPressEventName} from './Libraries/Utilities/BackHandler';
export {default as BackHandler} from './Libraries/Utilities/BackHandler';

export {default as Clipboard} from './Libraries/Components/Clipboard/Clipboard';

export {default as codegenNativeComponent} from './Libraries/Utilities/codegenNativeComponent';
export {default as codegenNativeCommands} from './Libraries/Utilities/codegenNativeCommands';

Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion packages/react-native/types_DEPRECATED/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export * from './Libraries/AppState/AppState';
export * from './Libraries/BatchedBridge/NativeModules';
export * from './Libraries/Components/AccessibilityInfo/AccessibilityInfo';
export * from './Libraries/Components/ActivityIndicator/ActivityIndicator';
export * from './Libraries/Components/Clipboard/Clipboard';
export * from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
export * from './Libraries/Components/Keyboard/Keyboard';
export * from './Libraries/Components/Keyboard/KeyboardAvoidingView';
Expand Down
Loading