Skip to content

Commit

Permalink
Remove deprecated modules from core code base (facebook#3729)
Browse files Browse the repository at this point in the history
  • Loading branch information
thegreatercurve authored Jan 24, 2023
1 parent 209b63a commit 3e8231f
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 255 deletions.
4 changes: 0 additions & 4 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ module.name_mapper='^@lexical/mark' -> '<PROJECT_ROOT>/packages/lexical-mark/flo
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalEditor' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalEditor.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalRichText' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalRichText.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalPlainText' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalPlainText.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalEditorEvents' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalEditorEvents.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalAutoFormatter' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalAutoFormatter.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalDecorators' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalDecorators.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalList' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalList.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalCanShowPlaceholder' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalCanShowPlaceholder.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalCharacterLimit' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalCharacterLimit.js.flow'
module.name_mapper='^@lexical/react/DEPRECATED_useLexicalHistory' -> '<PROJECT_ROOT>/packages/lexical-react/flow/DEPRECATED_useLexicalHistory.js.flow'
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions packages/lexical-react/flow/DEPRECATED_useLexicalList.js.flow

This file was deleted.

7 changes: 5 additions & 2 deletions packages/lexical-react/flow/LexicalPlainTextPlugin.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
* @flow strict
*/

import type {ErrorBoundaryType} from './DEPRECATED_useLexicalDecorators';
import type {EditorState, LexicalEditor} from 'lexical';

import typeof LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';

import * as React from 'react';

type InitialEditorStateType =
| null
| string
Expand All @@ -19,5 +22,5 @@ type InitialEditorStateType =
declare export function PlainTextPlugin({
contentEditable: React$Node,
placeholder: ((isEditable: boolean) => React$Node) | React$Node,
ErrorBoundary: ErrorBoundaryType,
ErrorBoundary: LexicalErrorBoundary,
}): React$Node;
7 changes: 5 additions & 2 deletions packages/lexical-react/flow/LexicalRichTextPlugin.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
* @flow strict
*/

import type {ErrorBoundaryType} from './DEPRECATED_useLexicalDecorators';
import type {EditorState, LexicalEditor} from 'lexical';

import typeof LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';

import * as React from 'react';

type InitialEditorStateType =
| null
| string
Expand All @@ -19,5 +22,5 @@ type InitialEditorStateType =
declare export function RichTextPlugin({
contentEditable: React$Node,
placeholder: ((isEditable: boolean) => React$Node) | React$Node,
ErrorBoundary: ErrorBoundaryType,
ErrorBoundary: LexicalErrorBoundary,
}): React$Node;
18 changes: 0 additions & 18 deletions packages/lexical-react/src/DEPRECATED_useLexicalAutoFormatter.ts

This file was deleted.

18 changes: 0 additions & 18 deletions packages/lexical-react/src/DEPRECATED_useLexicalDecorators.tsx

This file was deleted.

19 changes: 0 additions & 19 deletions packages/lexical-react/src/DEPRECATED_useLexicalEditorEvents.ts

This file was deleted.

15 changes: 0 additions & 15 deletions packages/lexical-react/src/DEPRECATED_useLexicalList.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/lexical-react/src/shared/useDecorators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type ErrorBoundaryProps = {
children: JSX.Element;
onError: (error: Error) => void;
};

export type ErrorBoundaryType =
| React.ComponentClass<ErrorBoundaryProps>
| React.FC<ErrorBoundaryProps>;
Expand Down
75 changes: 0 additions & 75 deletions packages/lexical-react/src/shared/useEditorEvents.ts

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/www/rewriteImports.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,6 @@ glob('packages/**/flow/*.flow', options, function (error1, files) {
/from '@lexical\/react\/DEPRECATED_useLexicalPlainText'/g,
"from 'DEPRECATED_useLexicalPlainText'",
)
.replace(
/from '@lexical\/react\/DEPRECATED_useLexicalEditorEvents'/g,
"from 'DEPRECATED_useLexicalEditorEvents'",
)
.replace(
/from '@lexical\/react\/DEPRECATED_useLexicalAutoFormatter'/g,
"from 'DEPRECATED_useLexicalAutoFormatter'",
)
.replace(
/from '@lexical\/react\/DEPRECATED_useLexicalDecorators'/g,
"from 'DEPRECATED_useLexicalDecorators'",
)
.replace(
/from '@lexical\/react\/DEPRECATED_useLexicalList'/g,
"from 'DEPRECATED_useLexicalList'",
)
.replace(
/from '@lexical\/react\/DEPRECATED_useLexicalCanShowPlaceholder'/g,
"from 'DEPRECATED_useLexicalCanShowPlaceholder'",
Expand Down
12 changes: 0 additions & 12 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,6 @@
"@lexical/react/DEPRECATED_useLexicalPlainText": [
"./packages/lexical-react/src/DEPRECATED_useLexicalPlainText.ts"
],
"@lexical/react/DEPRECATED_useLexicalEditorEvents": [
"./packages/lexical-react/src/DEPRECATED_useLexicalEditorEvents.ts"
],
"@lexical/react/DEPRECATED_useLexicalAutoFormatter": [
"./packages/lexical-react/src/DEPRECATED_useLexicalAutoFormatter.ts"
],
"@lexical/react/DEPRECATED_useLexicalDecorators": [
"./packages/lexical-react/src/DEPRECATED_useLexicalDecorators.ts"
],
"@lexical/react/DEPRECATED_useLexicalList": [
"./packages/lexical-react/src/DEPRECATED_useLexicalList.ts"
],
"@lexical/react/DEPRECATED_useLexicalCanShowPlaceholder": [
"./packages/lexical-react/src/DEPRECATED_useLexicalCanShowPlaceholder.ts"
],
Expand Down

0 comments on commit 3e8231f

Please sign in to comment.