Files
flipper/desktop/package.json
Anton Nikolaev c1bb656a0d Re-use babel transformations
Summary:
SORRY FOR BIG DIFF, but it's really hard to split it as all these changes are cross-dependent and should be made at once:
1. Moved transformations to separate package "flipper-babel-transformer" and linked it using yarn workspaces to "static" and "pkg" packages where they are re-used. Removed double copies of transformations we had before int these two packages.
2. Converted transformations to typescript
3. Refactored transformations to avoid relying on file system paths for customisation (FB stubs and Electron stubs for headless build)
4. As babel transformations must be built before other builds - enabled incremental build for them and changed scripts to invoke the transformations build before other build scripts
5. As we need to deploy all the dependencies including the fresh "flipper-babel-transformer" as a part of "static" - implemented script which copies package with all the dependencies taking in account yarn workspaces (hoisting and symlinks)

Reviewed By: passy, mweststrate

Differential Revision: D20690662

fbshipit-source-id: 38a275b60d3c91e01ec21d1dbd72d03c05cfac0b
2020-03-27 03:26:51 -07:00

209 lines
7.3 KiB
JSON

{
"name": "flipper-project",
"version": "0.35.0",
"private": true,
"workspaces": {
"packages": [
"app",
"babel-transformer",
"doctor",
"headless-tests",
"pkg",
"static"
]
},
"build": {
"appId": "flipper",
"productName": "Flipper",
"artifactName": "Flipper-${os}.${ext}",
"protocols": {
"name": "flipper",
"schemes": [
"flipper"
]
},
"mac": {
"category": "public.app-category.developer-tools",
"extendInfo": {
"NSUserNotificationAlertStyle": "alert"
}
},
"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": "8.0.1",
"adbkit-logcat": "2.0.1",
"@types/react": "16.9.17",
"@types/react-dom": "16.9.4",
"acorn": "7.1.1",
"minimist": "1.2.2",
"metro/temp": "0.9.0",
"ws": "7.2.0"
},
"jest": {
"transform": {
"^.*__tests__/.*\\.tsx?$": "ts-jest",
"\\.(js|tsx?)$": "<rootDir>/scripts/jest-transform.js"
},
"setupFiles": [
"<rootDir>/scripts/jest-setup.js"
],
"moduleNameMapper": {
"^flipper$": "<rootDir>/app/src",
"^flipper-doctor$": "<rootDir>/doctor/src",
"^flipper-pkg$": "<rootDir>/pkg/src"
},
"clearMocks": true
},
"devDependencies": {
"@babel/code-frame": "^7.8.3",
"@jest-runner/electron": "^2.0.2",
"@testing-library/react": "^9.3.0",
"@types/algoliasearch": "^3.30.19",
"@types/babel__code-frame": "^7.0.0",
"@types/babel__core": "^7.1.6",
"@types/babel__generator": "^7.6.1",
"@types/babel__traverse": "^7.0.9",
"@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/fs-extra": "^8.0.0",
"@types/glob": "^7.1.1",
"@types/invariant": "^2.2.31",
"@types/jest": "^25.1.0",
"@types/lodash.debounce": "^4.0.6",
"@types/lodash.isequal": "^4.5.5",
"@types/mkdirp": "^1.0.0",
"@types/node": "^13.9.3",
"@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.7",
"@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": "^9.1.2",
"@types/tmp": "^0.1.0",
"@types/uuid": "^7.0.0",
"@types/which": "^1.3.2",
"@types/ws": "^7.2.0",
"@types/yazl": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/parser": "^2.19.2",
"babel-eslint": "^10.0.1",
"electron": "8.0.1",
"electron-builder": "^22.3.2",
"eslint": "^6.7.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.0",
"eslint-plugin-flowtype": "^4.3.0",
"eslint-plugin-header": "^3.0.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-relay": "^1.4.1",
"flow-bin": "^0.121.0",
"fs-extra": "^8.1.0",
"glob": "^7.1.2",
"jest": "^25.1.0",
"jest-fetch-mock": "^3.0.0",
"metro": "^0.58.0",
"metro-resolver": "^0.58.0",
"prettier": "^2.0.0",
"react-async": "^10.0.0",
"recursive-readdir": "^2.2.2",
"redux-mock-store": "^1.5.3",
"rimraf": "^3.0.2",
"ts-jest": "^25.1.0",
"ts-node": "^8.8.1",
"typescript": "^3.7.2"
},
"scripts": {
"preinstall": "node scripts/prepare-watchman-config.js && yarn config set ignore-engines",
"postinstall": "cross-env TS_NODE_FILES=true node --require ts-node/register scripts/yarn-install.ts && patch-package",
"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",
"reset": "yarn rm-dist && yarn rm-temp && yarn cache clean && yarn rm-bundle && yarn rm-modules",
"dev-server": "yarn build:babel-transformer && cross-env NODE_ENV=development TS_NODE_FILES=true node --require ts-node/register 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",
"prebuild": "yarn build:babel-transformer && yarn rm-dist",
"build": "cross-env NODE_ENV=production TS_NODE_FILES=true node --require ts-node/register scripts/build-release.ts $@",
"prebuild-headless": "yarn build:babel-transformer",
"build-headless": "cross-env NODE_ENV=production TS_NODE_FILES=true node --require ts-node/register scripts/build-headless.ts $@",
"open-dist": "open ../dist/mac/Flipper.app --args --launcher=false",
"test-dist": "yarn build --mac && yarn open-dist --inspect=9229",
"test-dist:no-embedded-plugins": "yarn build --mac --no-embedded-plugins && yarn open-dist --inspect=9229",
"fix": "eslint . --fix --ext .js,.ts,.tsx",
"test": "yarn build:babel-transformer && jest --testPathPattern=\"node\\.(js|ts|tsx)$\" --no-cache",
"test:debug": "yarn build:babel-transformer && node --inspect node_modules/.bin/jest --runInBand",
"test-electron": "yarn build:babel-transformer && jest --testPathPattern=\"electron\\.(js|ts|tsx)$\" --testEnvironment=@jest-runner/electron/environment --runner=@jest-runner/electron --no-cache",
"test-with-device": "yarn build:babel-transformer && USE_ELECTRON_STUBS=1 jest --testPathPattern=\"device\\.(js|ts|tsx)$\" --detectOpenHandles --no-cache",
"lint:tsc": "tsc --noemit",
"lint:eslint": "eslint . --ext .js,.ts,.tsx",
"lint:flow": "flow check",
"lint": "yarn lint:eslint && yarn lint:flow && yarn lint:tsc",
"everything": "yarn reset && yarn install && yarn lint && yarn test && yarn test-electron && yarn build --mac --mac-dmg --win --linux && yarn build-headless --mac --linux && yarn start"
},
"optionalDependencies": {
"7zip-bin-mac": "^1.0.1"
}
}