Summary:
- Removed compilation on startup which is not required anymore after switching to plugin spec v2.
- Removed from Node process ("static" package) all the dependencies which are not required anymore: e.g. metro, babel etc.
- Plugin loading code from node process moved to browser process and made asyncronous.
Some expected benefits after these changes:
1) Reduced size of Flipper bundle (~4.5MB reduction for lzma package in my tests) as well as startup time. It's hard to say the exact startup time difference as it is very machine-dependent, and on my machine it was already fast ~1500ms (vs 5500ms for p95) and decreased by just 100ms. But I think we should definitely see some improvements on "launch time" analytics graph for p95/p99.
2) Plugin loading is async now and happens when UI is already shown, so perceptive startup time should be also better now.
3) All plugin loading code is now consolidated in "app/dispatcher/plugins.tsx" instead of being splitted between Node and Browser processes as before. So it will be easier to debug plugin loading.
4) Now it is possible to apply updates of plugins by simple refresh of browser window instead of full Electron process restart as before.
5) 60% less code in Node process. This is good because it is harder to debug changes in Node process than in Browser process, especially taking in account differences between dev/release builds. Because of this Node process often ended up broken after changes. Hopefully now it will be more stable.
Changelog: changed the way of plugin loading, and removed obsolete dependencies, which should reduce bundle size and startup time.
Reviewed By: passy
Differential Revision: D23682756
fbshipit-source-id: 8445c877234b41c73853cebe585e2fdb1638b2c9
275 lines
9.1 KiB
JSON
275 lines
9.1 KiB
JSON
{
|
|
"name": "flipper-project",
|
|
"version": "0.57.0",
|
|
"description": "Mobile development tool",
|
|
"productName": "Flipper",
|
|
"author": {
|
|
"name": "Facebook Inc",
|
|
"email": "n/a",
|
|
"url": "https://github.com/facebook"
|
|
},
|
|
"homepage": "https://fbflipper.com/",
|
|
"icon": "icon.png",
|
|
"category": "facebook-intern",
|
|
"privileged": true,
|
|
"private": true,
|
|
"workspaces": {
|
|
"packages": [
|
|
"app",
|
|
"app/src/fb/*",
|
|
"babel-transformer",
|
|
"doctor",
|
|
"headless",
|
|
"headless-tests",
|
|
"pkg",
|
|
"pkg-lib",
|
|
"flipper-plugin",
|
|
"static",
|
|
"plugins/*",
|
|
"e2e",
|
|
"plugin-lib",
|
|
"test-utils",
|
|
"eslint-plugin-flipper"
|
|
],
|
|
"nohoist": [
|
|
"flipper-plugin-kaios-big-allocations/firefox-client"
|
|
]
|
|
},
|
|
"build": {
|
|
"appId": "flipper",
|
|
"productName": "Flipper",
|
|
"artifactName": "Flipper-${os}.${ext}",
|
|
"protocols": {
|
|
"name": "flipper",
|
|
"schemes": [
|
|
"flipper"
|
|
]
|
|
},
|
|
"mac": {
|
|
"category": "public.app-category.developer-tools",
|
|
"extendInfo": {
|
|
"NSUserNotificationAlertStyle": "alert"
|
|
}
|
|
},
|
|
"linux": {
|
|
"icon": "icon.icns",
|
|
"category": "Development"
|
|
},
|
|
"deb": {
|
|
"icon": "icon.icns"
|
|
},
|
|
"dmg": {
|
|
"background": "dmgBackground.png",
|
|
"icon": "icon.icns",
|
|
"iconSize": 155,
|
|
"window": {
|
|
"width": 660,
|
|
"height": 400
|
|
},
|
|
"contents": [
|
|
{
|
|
"x": 123,
|
|
"y": 172
|
|
},
|
|
{
|
|
"x": 539,
|
|
"y": 168,
|
|
"type": "link",
|
|
"path": "/Applications"
|
|
}
|
|
]
|
|
},
|
|
"win": {
|
|
"publisherName": "Facebook, Inc.",
|
|
"sign": null
|
|
},
|
|
"asar": false,
|
|
"fileAssociations": [
|
|
{
|
|
"ext": [
|
|
".flipper"
|
|
],
|
|
"name": "Flipper Data",
|
|
"role": "Viewer",
|
|
"icon": "document-icons/document.icns"
|
|
}
|
|
]
|
|
},
|
|
"resolutions": {
|
|
"@jest-runner/electron/electron": "9.0.2",
|
|
"adbkit-logcat": "2.0.1",
|
|
"@types/react": "16.9.17",
|
|
"@types/react-dom": "16.9.4",
|
|
"acorn": "7.1.1",
|
|
"minimist": "1.2.3",
|
|
"**/metro/**/temp": "0.9.0",
|
|
"**/metro/**/ws": "1.1.5",
|
|
"ws": "7.3.0",
|
|
"kind-of": "6.0.3",
|
|
"bl": "4.0.3"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/code-frame": "^7.10.4",
|
|
"@babel/eslint-parser": "^7.11.0",
|
|
"@jest-runner/electron": "^3.0.0",
|
|
"@testing-library/dom": "^7.20.2",
|
|
"@testing-library/react": "^10.4.3",
|
|
"@types/algoliasearch": "^3.30.19",
|
|
"@types/babel__code-frame": "^7.0.1",
|
|
"@types/babel__core": "^7.1.9",
|
|
"@types/babel__generator": "^7.6.1",
|
|
"@types/babel__traverse": "^7.0.13",
|
|
"@types/decompress": "4.2.3",
|
|
"@types/deep-equal": "^1.0.1",
|
|
"@types/detect-port": "^1.1.0",
|
|
"@types/electron-devtools-installer": "^2.2.0",
|
|
"@types/expand-tilde": "^2.0.0",
|
|
"@types/express": "^4.17.2",
|
|
"@types/fb-watchman": "^2.0.0",
|
|
"@types/form-data": "^2.2.1",
|
|
"@types/fs-extra": "^9.0.1",
|
|
"@types/glob": "^7.1.1",
|
|
"@types/invariant": "^2.2.31",
|
|
"@types/jest": "^26",
|
|
"@types/lodash": "^4.14.150",
|
|
"@types/lodash.debounce": "^4.0.6",
|
|
"@types/mkdirp": "^1.0.0",
|
|
"@types/mock-fs": "^4.10.0",
|
|
"@types/node": "^13.13.0",
|
|
"@types/npm-packlist": "^1.1.1",
|
|
"@types/promise-retry": "^1.1.3",
|
|
"@types/react": "^16.9.17",
|
|
"@types/react-color": "^3.0.1",
|
|
"@types/react-dom": "^16.9.4",
|
|
"@types/react-redux": "^7.1.5",
|
|
"@types/react-test-renderer": "^16.9.1",
|
|
"@types/react-transition-group": "^4.2.2",
|
|
"@types/react-virtualized": "^9.21.9",
|
|
"@types/react-virtualized-auto-sizer": "^1.0.0",
|
|
"@types/react-window": "^1.8.1",
|
|
"@types/recursive-readdir": "^2.2.0",
|
|
"@types/redux-devtools-extension": "^2.13.2",
|
|
"@types/redux-mock-store": "^1.0.1",
|
|
"@types/redux-persist": "^4.3.1",
|
|
"@types/requestidlecallback": "^0.3.1",
|
|
"@types/rsocket-core": "^0.0.5",
|
|
"@types/rsocket-tcp-server": "^0.0.2",
|
|
"@types/socket.io": "^2.1.4",
|
|
"@types/testing-library__react": "^10.2.0",
|
|
"@types/tmp": "^0.2.0",
|
|
"@types/uuid": "^8.0.0",
|
|
"@types/which": "^1.3.2",
|
|
"@types/ws": "^7.2.0",
|
|
"@types/yargs": "^15.0.4",
|
|
"@types/yazl": "^2.4.2",
|
|
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
|
"@typescript-eslint/parser": "^2.19.2",
|
|
"ansi-to-html": "^0.6.3",
|
|
"babel-eslint": "^10.1.0",
|
|
"chalk": "^4.0.0",
|
|
"cross-env": "^7.0.2",
|
|
"detect-port": "^1.1.1",
|
|
"electron": "9.0.2",
|
|
"electron-builder": "^22.7.0",
|
|
"eslint": "^7.4.0",
|
|
"eslint-config-fbjs": "^3.1.1",
|
|
"eslint-config-prettier": "^6.10.1",
|
|
"eslint-import-resolver-typescript": "^2.0.0",
|
|
"eslint-plugin-babel": "^5.3.1",
|
|
"eslint-plugin-flipper": "0.57.0",
|
|
"eslint-plugin-flowtype": "^4.7.0",
|
|
"eslint-plugin-header": "^3.0.0",
|
|
"eslint-plugin-import": "^2.22.0",
|
|
"eslint-plugin-jsx-a11y": "^6.3.1",
|
|
"eslint-plugin-node": "^11.1.0",
|
|
"eslint-plugin-prettier": "^3.1.2",
|
|
"eslint-plugin-react": "^7.20.0",
|
|
"eslint-plugin-react-hooks": "^4.0.4",
|
|
"expand-tilde": "^2.0.2",
|
|
"express": "^4.15.2",
|
|
"fb-watchman": "^2.0.1",
|
|
"flipper-babel-transformer": "0.57.0",
|
|
"flipper-pkg-lib": "0.57.0",
|
|
"flipper-plugin-lib": "0.57.0",
|
|
"flow-bin": "0.128.0",
|
|
"fs-extra": "^9.0.0",
|
|
"glob": "^7.1.2",
|
|
"ignore": "^5.1.4",
|
|
"invariant": "^2.2.4",
|
|
"jest": "^26",
|
|
"jest-environment-jsdom-sixteen": "^1.0.3",
|
|
"jest-fetch-mock": "^3.0.3",
|
|
"line-replace": "^2.0.1",
|
|
"metro": "^0.60.0",
|
|
"metro-minify-terser": "^0.60.0",
|
|
"metro-resolver": "^0.60.0",
|
|
"node-fetch": "^2.6.0",
|
|
"p-filter": "^2.1.0",
|
|
"p-map": "^4.0.0",
|
|
"pkg": "^4.4.1",
|
|
"prettier": "^2.0.0",
|
|
"pretty-format": "^26.1.0",
|
|
"promisify-child-process": "^4.1.0",
|
|
"react-async": "^10.0.0",
|
|
"react-refresh": "^0.8.1",
|
|
"recursive-readdir": "^2.2.2",
|
|
"redux": "^4.0.0",
|
|
"rimraf": "^3.0.2",
|
|
"socket.io": "^2.0.4",
|
|
"tmp": "^0.2.1",
|
|
"ts-jest": "^26.0.0",
|
|
"ts-node": "^8.8.1",
|
|
"typescript": "^3.9.5",
|
|
"uuid": "^8.3.0",
|
|
"yargs": "^15.4.1",
|
|
"yazl": "^2.5.1"
|
|
},
|
|
"scripts": {
|
|
"preinstall": "node scripts/prepare-watchman-config.js && yarn config set ignore-engines",
|
|
"postinstall": "patch-package && ./ts-node scripts/yarn-install-fb-plugins.ts && yarn build:pkg && yarn build:eslint && ./ts-node scripts/generate-plugin-entry-points.ts",
|
|
"rm-dist": "rimraf ../dist",
|
|
"rm-modules": "rimraf **/*/node_modules node_modules",
|
|
"rm-temp": "rimraf $TMPDIR/jest* $TMPDIR/react-native-packager*",
|
|
"rm-bundle": "rimraf static/main.bundle.* **/lib **/*.tsbuildinfo",
|
|
"rm-watches": "watchman watch-del-all",
|
|
"rm-metro-cache": "rimraf $TMPDIR/metro-cache*",
|
|
"reset": "yarn rm-dist && yarn rm-temp && yarn rm-metro-cache && yarn cache clean && yarn rm-bundle && yarn rm-modules",
|
|
"predev-server": "yarn build:pkg",
|
|
"dev-server": "cross-env NODE_ENV=development ./ts-node scripts/start-dev-server.ts",
|
|
"start": "yarn dev-server --inspect=9229",
|
|
"start:break": "yarn dev-server --inspect-brk=9229",
|
|
"start:no-embedded-plugins": "yarn start --no-embedded-plugins",
|
|
"build:babel-transformer": "cd babel-transformer && yarn build",
|
|
"build:pkg": "cd pkg && yarn build",
|
|
"build:eslint": "cd eslint-plugin-flipper && yarn build",
|
|
"prebuild": "yarn build:pkg && yarn rm-dist",
|
|
"build": "cross-env NODE_ENV=production ./ts-node scripts/build-release.ts $@",
|
|
"build:dev": "cross-env NODE_ENV=development ./ts-node scripts/build-release.ts $@",
|
|
"prebuild-headless": "yarn build:pkg",
|
|
"build-headless": "cross-env NODE_ENV=production ./ts-node scripts/build-headless.ts $@",
|
|
"build-plugin": "./ts-node scripts/build-plugin.ts",
|
|
"resolve-plugin-dir": "./ts-node scripts/resolve-plugin-dir.ts",
|
|
"list-plugins": "./ts-node scripts/list-plugins.ts",
|
|
"open-dist": "open ../dist/mac/Flipper.app --args --launcher=false --inspect=9229",
|
|
"fix": "eslint . --fix --ext .js,.ts,.tsx",
|
|
"pretest": "yarn build:pkg",
|
|
"test": "jest",
|
|
"watch": "jest --watch",
|
|
"test:debug": "yarn build:pkg && node --inspect node_modules/.bin/jest --runInBand",
|
|
"test-electron": "yarn build:pkg && jest --testMatch=\"**/**.electron\\.(js|jsx|ts|tsx)\" --testEnvironment=@jest-runner/electron/environment --runner=@jest-runner/electron",
|
|
"test-with-device": "yarn build:pkg && USE_ELECTRON_STUBS=1 jest --testMatch=\"**/**.device\\.(js|jsx|ts|tsx)\" --detectOpenHandles",
|
|
"test-e2e": "cd e2e && yarn test",
|
|
"lint:tsc": "tsc --noemit",
|
|
"prelint:eslint": "yarn build:eslint",
|
|
"lint:eslint": "eslint . --ext .js,.ts,.tsx",
|
|
"lint:flow": "flow check",
|
|
"lint": "yarn lint:eslint && yarn lint:flow && yarn lint:tsc",
|
|
"bump-versions": "./ts-node scripts/bump-versions.ts",
|
|
"publish-packages": "./ts-node scripts/publish-packages.ts",
|
|
"everything": "yarn reset && yarn install && yarn lint && yarn test && yarn test-electron && yarn build --mac --mac-dmg --win --linux --linux-deb && yarn build-headless --mac --linux && yarn start"
|
|
},
|
|
"optionalDependencies": {
|
|
"7zip-bin-mac": "^1.0.1"
|
|
}
|
|
}
|