Summary: This diff adds `types` fields on the compiler config for every project. This way we can make sure that for example node types and packages are not available in flipper-ui-core. Without an explicit types field, all types would be shared between all packages, and implicitly included into the compilation of everything. For the same reason `types/index.d.ts` has been removed, we want to be intentional on which types are being used in which package. This diff does most of the work, the next diff will fine tune the globals, and do some further cleanup. As an alternative solution I first tried a `nohoist: **/node_modules/types/**` and make sure every package list explicitly the types used in package json, which works but is much more error prone, as for example two different react types versions in two packages will cause the most unreadable compiler error due to the types not being shared and not literally the same. Reviewed By: lawrencelomax Differential Revision: D33124441 fbshipit-source-id: c2b9d768f845ac28005d8331ef5fa1066c7e4cd7
203 lines
6.7 KiB
JSON
203 lines
6.7 KiB
JSON
{
|
|
"author": {
|
|
"email": "n/a",
|
|
"name": "Facebook Inc",
|
|
"url": "https://github.com/facebook"
|
|
},
|
|
"build": {
|
|
"appId": "flipper",
|
|
"artifactName": "Flipper-${os}.${ext}",
|
|
"asar": true,
|
|
"asarUnpack": [
|
|
"PortForwardingMacApp.app/**/*",
|
|
"defaultPlugins/**/*"
|
|
],
|
|
"dmg": {
|
|
"background": "dmgBackground.png",
|
|
"contents": [
|
|
{
|
|
"x": 123,
|
|
"y": 172
|
|
},
|
|
{
|
|
"path": "/Applications",
|
|
"type": "link",
|
|
"x": 539,
|
|
"y": 168
|
|
}
|
|
],
|
|
"icon": "icon.icns",
|
|
"iconSize": 155,
|
|
"window": {
|
|
"height": 400,
|
|
"width": 660
|
|
}
|
|
},
|
|
"fileAssociations": [
|
|
{
|
|
"ext": [
|
|
".flipper"
|
|
],
|
|
"icon": "document-icons/document.icns",
|
|
"name": "Flipper Data",
|
|
"role": "Viewer"
|
|
}
|
|
],
|
|
"linux": {
|
|
"category": "Development"
|
|
},
|
|
"mac": {
|
|
"category": "public.app-category.developer-tools",
|
|
"extendInfo": {
|
|
"NSUserNotificationAlertStyle": "alert"
|
|
}
|
|
},
|
|
"productName": "Flipper",
|
|
"protocols": {
|
|
"name": "flipper",
|
|
"schemes": [
|
|
"flipper"
|
|
]
|
|
},
|
|
"win": {
|
|
"publisherName": "Facebook, Inc.",
|
|
"sign": null
|
|
}
|
|
},
|
|
"category": "facebook-intern",
|
|
"description": "Mobile development tool",
|
|
"devDependencies": {
|
|
"@babel/eslint-parser": "^7.16.3",
|
|
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
"@typescript-eslint/parser": "^4.33.0",
|
|
"@types/jest": "^26.0.24",
|
|
"babel-eslint": "^10.1.0",
|
|
"cross-env": "^7.0.3",
|
|
"electron": "11.2.3",
|
|
"eslint": "^7.32.0",
|
|
"eslint-config-fbjs": "^3.1.1",
|
|
"eslint-config-prettier": "^8.3.0",
|
|
"eslint-import-resolver-typescript": "^2.5.0",
|
|
"eslint-plugin-babel": "^5.3.1",
|
|
"eslint-plugin-communist-spelling": "^1.0.0",
|
|
"eslint-plugin-flipper": "0.0.0",
|
|
"eslint-plugin-flowtype": "^5.10.0",
|
|
"eslint-plugin-header": "^3.1.1",
|
|
"eslint-plugin-import": "^2.25.2",
|
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
"eslint-plugin-node": "^11.1.0",
|
|
"eslint-plugin-prettier": "^4.0.0",
|
|
"eslint-plugin-promise": "^5.1.1",
|
|
"eslint-plugin-react": "^7.27.1",
|
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
"eslint-plugin-rulesdir": "^0.2.1",
|
|
"jest": "^26.6.3",
|
|
"jest-environment-jsdom-sixteen": "^2.0.0",
|
|
"jest-fetch-mock": "^3.0.3",
|
|
"less": "^4.1.2",
|
|
"patch-package": "^6.4.7",
|
|
"prettier": "^2.4.1",
|
|
"pretty-format": "^27.3.1",
|
|
"rimraf": "^3.0.2",
|
|
"ts-jest": "^26.5.6",
|
|
"ts-node": "^9.1.1",
|
|
"typescript": "^4.4.4"
|
|
},
|
|
"homepage": "https://fbflipper.com/",
|
|
"icon": "icon.png",
|
|
"name": "flipper-project",
|
|
"optionalDependencies": {
|
|
"7zip-bin-mac": "^1.0.1"
|
|
},
|
|
"private": true,
|
|
"privileged": true,
|
|
"productName": "Flipper",
|
|
"resolutions": {
|
|
"**/metro/**/temp": "0.9.0",
|
|
"**/metro/**/ws": "1.1.5",
|
|
"@jest-runner/electron/electron": "11.2.3",
|
|
"bl": "^5.0.0",
|
|
"csstype": "^3.0.5",
|
|
"jsdom": "16.6.0",
|
|
"kind-of": "^6.0.3",
|
|
"node-fetch": "^2.6.1",
|
|
"node-forge": "^0.10.0",
|
|
"node-notifier": "^10.0.0",
|
|
"ws": "^7.4.6",
|
|
"xmldom": "github:xmldom/xmldom#0.7.0",
|
|
"browserslist": "^4.16.5",
|
|
"axios": "^0.21.1",
|
|
"glob-parent": "^5.1.2",
|
|
"normalize-url": "^4.5.1",
|
|
"d3-array": "2.3.3",
|
|
"tar": "^6.1.2"
|
|
},
|
|
"scripts": {
|
|
"build": "cross-env NODE_ENV=production ./ts-node scripts/build-release.ts $@",
|
|
"build-plugin": "./ts-node scripts/build-plugin.ts",
|
|
"build:dev": "cross-env NODE_ENV=development ./ts-node scripts/build-release.ts $@",
|
|
"build:eslint": "cd eslint-plugin-flipper && yarn build",
|
|
"build:themes": "lessc --js themes/light.less static/themes/light.css && lessc --js themes/dark.less static/themes/dark.css",
|
|
"build:tsc": "tsc -b tsc-root/tsconfig.json && ./ts-node ./scripts/compute-package-checksum.ts -d ./babel-transformer -o ./lib/checksum.txt",
|
|
"bump-versions": "./ts-node scripts/bump-versions.ts",
|
|
"bundle-all-plugins": "./ts-node scripts/bundle-all-plugins.ts",
|
|
"predev-server": "yarn build:tsc",
|
|
"dev-server": "cross-env NODE_ENV=development ./ts-node scripts/start-dev-server.ts",
|
|
"preflipper-server": "yarn build:tsc",
|
|
"flipper-server": "cross-env NODE_ENV=development ./ts-node scripts/start-flipper-server.ts",
|
|
"fix": "eslint . --fix --ext .js,.ts,.tsx",
|
|
"lint": "yarn lint:eslint && yarn lint:tsc && yarn tsc-plugins",
|
|
"lint:eslint": "eslint . --ext .js,.ts,.tsx",
|
|
"lint:tsc": "tsc -p tsc-root/tsconfig.json --noemit",
|
|
"list-plugins": "./ts-node scripts/list-plugins.ts",
|
|
"open-dist": "open ../dist/mac/Flipper.app --args --launcher=false --inspect=9229",
|
|
"postinstall": "patch-package && yarn --cwd plugins install --mutex network:30331 && yarn build:tsc && ./ts-node scripts/generate-plugin-entry-points.ts && yarn build:themes",
|
|
"prebuild": "yarn build:tsc && yarn rm-dist && yarn build:themes",
|
|
"preinstall": "node scripts/prepare-watchman-config.js && yarn config set ignore-engines",
|
|
"prelint:eslint": "yarn build:eslint",
|
|
"pretest": "yarn build:tsc",
|
|
"publish-packages": "./ts-node scripts/publish-packages.ts",
|
|
"reset": "yarn rm-dist && yarn rm-temp && yarn rm-metro-cache && yarn cache clean && yarn rm-bundle && yarn rm-modules",
|
|
"resolve-plugin-dir": "./ts-node scripts/resolve-plugin-dir.ts",
|
|
"rm-bundle": "rimraf static/main.bundle.* **/dist/bundle.* **/lib **/*.tsbuildinfo",
|
|
"rm-dist": "rimraf ../dist",
|
|
"rm-metro-cache": "rimraf $TMPDIR/metro-cache*",
|
|
"rm-modules": "rimraf **/*/node_modules node_modules",
|
|
"rm-temp": "rimraf $TMPDIR/jest* $TMPDIR/react-native-packager*",
|
|
"rm-watches": "watchman watch-del-all",
|
|
"start": "yarn dev-server --inspect=9229",
|
|
"start:break": "yarn dev-server --inspect-brk=9229",
|
|
"start:no-embedded-plugins": "yarn start --no-embedded-plugins",
|
|
"docs": "cd ../website && yarn start",
|
|
"test": "cross-env TZ=Pacific/Pohnpei jest",
|
|
"test:debug": "yarn build:tsc && cross-env TZ=Pacific/Pohnpei node --inspect node_modules/.bin/jest --runInBand",
|
|
"tsc-plugins": "./ts-node scripts/tsc-plugins.ts",
|
|
"watch": "cross-env TZ=Pacific/Pohnpei node --expose-gc --stack-trace-limit=40 ./node_modules/.bin/jest --watch"
|
|
},
|
|
"version": "0.126.0",
|
|
"workspaces": {
|
|
"packages": [
|
|
"scripts",
|
|
"app",
|
|
"app/src/fb/*",
|
|
"babel-transformer",
|
|
"doctor",
|
|
"pkg",
|
|
"pkg-lib",
|
|
"flipper-common",
|
|
"flipper-plugin",
|
|
"flipper-server-core",
|
|
"flipper-ui-core",
|
|
"flipper-ui-browser",
|
|
"flipper-server",
|
|
"flipper-dump",
|
|
"static",
|
|
"e2e",
|
|
"plugin-lib",
|
|
"test-utils",
|
|
"eslint-plugin-flipper",
|
|
"types"
|
|
]
|
|
}
|
|
}
|