Clean up packages and types
Summary:
This diff removes most deps from the root package.json, which now only contains electron and shared build / test infra structure: lint, prettier, jest, typescript.
This makes it possible to control much better which packages are used where, as all sub packages now have their deps explicitly in their package.json instead of incidentally shared. This allows for example to disable DOM types for all packages by default (flipper-plugin, ui(-core) and app still request it), and in the next diff I hope to add to this that nodeJS types are no longer shared either, so that UI oriented packages will generate compile errors when using Node built-ins
This diff removes most deps that were currently unused, and dedupes a bunch of other ones, so the build should probably be a bit smaller now as well:
{F686704253}
{F686704295}
Reviewed By: antonk52
Differential Revision: D33062859
fbshipit-source-id: 5afaa4f2103d055188382a3370c1fffa295a298a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
78413c1ecf
commit
dcfeb4a4d5
@@ -15,8 +15,6 @@
|
||||
"@emotion/react": "^11.6.0",
|
||||
"@emotion/styled": "^11.6.0",
|
||||
"@tanishiking/aho-corasick": "^0.0.1",
|
||||
"@types/archiver": "^5.1.1",
|
||||
"@types/uuid": "^8.3.1",
|
||||
"antd": "4.16.8",
|
||||
"archiver": "^5.0.2",
|
||||
"async-mutex": "^0.3.2",
|
||||
@@ -68,10 +66,17 @@
|
||||
"7zip-bin-mac": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/dom": "^8.10.1",
|
||||
"@testing-library/dom": "^8.11.1",
|
||||
"@testing-library/react": "^12.1.2",
|
||||
"@types/archiver": "^5.1.1",
|
||||
"@types/deep-equal": "^1.0.1",
|
||||
"@types/lodash.memoize": "^4.1.6",
|
||||
"@types/react-test-renderer": "^17.0.1",
|
||||
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
||||
"@types/react-window": "^1.8.5",
|
||||
"@types/redux-mock-store": "^1.0.3",
|
||||
"@types/split2": "^3.2.1",
|
||||
"@types/uuid": "^8.3.1",
|
||||
"flipper-test-utils": "0.0.0",
|
||||
"mock-fs": "^5.1.2",
|
||||
"redux-mock-store": "^1.0.1",
|
||||
|
||||
@@ -9,13 +9,51 @@
|
||||
|
||||
import type {NotificationEvents} from './dispatcher/notifications';
|
||||
import type {PluginNotification} from './reducers/notifications';
|
||||
// TODO: Fix me
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import type {NotificationConstructorOptions} from 'electron';
|
||||
import {FlipperLib} from 'flipper-plugin';
|
||||
import {FlipperServer, FlipperServerConfig} from 'flipper-common';
|
||||
import {Icon} from './utils/icons';
|
||||
|
||||
interface NotificationAction {
|
||||
// Docs: https://electronjs.org/docs/api/structures/notification-action
|
||||
|
||||
/**
|
||||
* The label for the given action.
|
||||
*/
|
||||
text?: string;
|
||||
/**
|
||||
* The type of action, can be `button`.
|
||||
*/
|
||||
type: 'button';
|
||||
}
|
||||
|
||||
// Subset of electron.d.ts
|
||||
interface NotificationConstructorOptions {
|
||||
/**
|
||||
* A title for the notification, which will be shown at the top of the notification
|
||||
* window when it is shown.
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* The body text of the notification, which will be displayed below the title or
|
||||
* subtitle.
|
||||
*/
|
||||
body: string;
|
||||
/**
|
||||
* Actions to add to the notification. Please read the available actions and
|
||||
* limitations in the `NotificationAction` documentation.
|
||||
*
|
||||
* @platform darwin
|
||||
*/
|
||||
actions?: NotificationAction[];
|
||||
/**
|
||||
* A custom title for the close button of an alert. An empty string will cause the
|
||||
* default localized text to be used.
|
||||
*
|
||||
* @platform darwin
|
||||
*/
|
||||
closeButtonText?: string;
|
||||
}
|
||||
|
||||
// Events that are emitted from the main.ts ovr the IPC process bridge in Electron
|
||||
type MainProcessEvents = {
|
||||
'flipper-protocol-handler': [query: string];
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
"outDir": "lib",
|
||||
"rootDir": "src",
|
||||
"esModuleInterop": true,
|
||||
"emitDeclarationOnly": true
|
||||
"emitDeclarationOnly": true,
|
||||
"lib": ["dom"]
|
||||
},
|
||||
"references": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user