diff --git a/desktop/flipper-plugin/src/ui/data-table/DataTable.tsx b/desktop/flipper-plugin/src/ui/data-table/DataTable.tsx index b283f2c70..fe2e71f22 100644 --- a/desktop/flipper-plugin/src/ui/data-table/DataTable.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/DataTable.tsx @@ -51,7 +51,7 @@ import {Formatter} from '../DataFormatter'; import {usePluginInstanceMaybe} from '../../plugin/PluginContext'; import {debounce} from 'lodash'; import {useInUnitTest} from '../../utils/useInUnitTest'; -import {createDataSource} from 'flipper-plugin/src/state/createDataSource'; +import {createDataSource} from '../../state/createDataSource'; interface DataTableBaseProps { columns: DataTableColumn[]; diff --git a/desktop/pkg/src/__tests__/runInit.node.ts b/desktop/pkg/src/__tests__/runInit.node.ts index bda57996c..54c79ffb2 100644 --- a/desktop/pkg/src/__tests__/runInit.node.ts +++ b/desktop/pkg/src/__tests__/runInit.node.ts @@ -80,12 +80,16 @@ test('It generates the correct files for client plugin', async () => { \\"test\\": \\"jest --no-watchman\\" }, \\"peerDependencies\\": { + \\"@emotion/styled\\": \\"latest\\", \\"flipper-plugin\\": \\"^0.0.0\\", - \\"antd\\": \\"latest\\" + \\"antd\\": \\"latest\\", + \\"react\\": \\"latest\\", + \\"react-dom\\": \\"latest\\" }, \\"devDependencies\\": { \\"@babel/preset-react\\": \\"latest\\", \\"@babel/preset-typescript\\": \\"latest\\", + \\"@emotion/styled\\": \\"latest\\", \\"@testing-library/react\\": \\"latest\\", \\"@types/jest\\": \\"latest\\", \\"@types/react\\": \\"latest\\", @@ -94,7 +98,13 @@ test('It generates the correct files for client plugin', async () => { \\"flipper-plugin\\": \\"latest\\", \\"flipper-pkg\\": \\"latest\\", \\"jest\\": \\"latest\\", + \\"jest-mock-console\\": \\"latest\\", + \\"react\\": \\"latest\\", + \\"react-dom\\": \\"latest\\", \\"typescript\\": \\"latest\\" + }, + \\"jest\\": { + \\"testEnvironment\\": \\"jsdom\\" } } ", diff --git a/desktop/pkg/templates/plugin/package.json.template b/desktop/pkg/templates/plugin/package.json.template index 56c59f906..f6db2383e 100644 --- a/desktop/pkg/templates/plugin/package.json.template +++ b/desktop/pkg/templates/plugin/package.json.template @@ -20,12 +20,16 @@ "test": "jest --no-watchman" }, "peerDependencies": { + "@emotion/styled": "latest", "flipper-plugin": "^{{flipper_version}}", - "antd": "latest" + "antd": "latest", + "react": "latest", + "react-dom": "latest" }, "devDependencies": { "@babel/preset-react": "latest", "@babel/preset-typescript": "latest", + "@emotion/styled": "latest", "@testing-library/react": "latest", "@types/jest": "latest", "@types/react": "latest", @@ -34,6 +38,12 @@ "flipper-plugin": "latest", "flipper-pkg": "latest", "jest": "latest", + "jest-mock-console": "latest", + "react": "latest", + "react-dom": "latest", "typescript": "latest" + }, + "jest": { + "testEnvironment": "jsdom" } }