mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Run snap tester on a forked node process so runs can be interrupted. (Currently, `Ctrl+C` is not handled until after all test fixtures finish compiling). This *feels* a bit heavy-handed, but main.ts is pretty small and doesn't do much other than listen for input / signals. Would love feedback here since I haven't really worked with nodejs / JS cli tools before - main.ts new file that spawns forked runner - pipe stdin/out/err to and from the child runner process, details described in comments. - listens for exit event of child - runner.ts - added logic to listen for interrupts and clean up (not really familiar with how file and tsc watchers are implemented, so we try to call 'close' on them just in case they need to release locks / do other cleanup)
80 lines
2.5 KiB
JSON
80 lines
2.5 KiB
JSON
{
|
|
"name": "babel-plugin-react-forget",
|
|
"version": "0.0.1",
|
|
"description": "Babel plugin for React Forget.",
|
|
"main": "dist/index.js",
|
|
"license": "MIT",
|
|
"files": [
|
|
"src"
|
|
],
|
|
"scripts": {
|
|
"build": "rimraf dist && tsc",
|
|
"bundle:meta": "scripts/bundle-meta.sh",
|
|
"dev": "concurrently --kill-others \"tsc --watch\" \"yarn:playground\"",
|
|
"hash": "scripts/hash-dist.sh",
|
|
"playground": "cd packages/playground && yarn && yarn dev",
|
|
"test": "tsc && jest",
|
|
"snap": "node packages/snap/dist/main.js",
|
|
"snap:build": "cd packages/snap && yarn build",
|
|
"ts:analyze-trace": "scripts/ts-analyze-trace.sh",
|
|
"test262": "yarn run --silent test262-harness --preprocessor=scripts/test262-preprocessor.js",
|
|
"test262:all": "yarn run --silent test262 'test262/test/**/*.js'",
|
|
"test262:ci": "scripts/test262.sh",
|
|
"prettier": "node ./scripts/prettier.js write-changed",
|
|
"prettier:all": "node ./scripts/prettier.js write",
|
|
"prettier:ci": "prettier --check .",
|
|
"lint": "yarn eslint src"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/facebook/react-forget.git"
|
|
},
|
|
"dependencies": {
|
|
"@babel/generator": "7.2.0",
|
|
"@babel/plugin-syntax-jsx": "^7.18.6",
|
|
"@babel/types": "^7.19.0",
|
|
"chalk": "4",
|
|
"invariant": "^2.2.4",
|
|
"prettier": "2.7.1",
|
|
"pretty-format": "^24"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.19.1",
|
|
"@babel/parser": "^7.19.1",
|
|
"@babel/plugin-syntax-typescript": "^7.18.6",
|
|
"@babel/plugin-transform-block-scoping": "^7.18.9",
|
|
"@babel/plugin-transform-modules-commonjs": "^7.18.6",
|
|
"@babel/preset-react": "^7.18.6",
|
|
"@babel/preset-typescript": "^7.18.6",
|
|
"@babel/traverse": "^7.19.1",
|
|
"@testing-library/react": "^13.4.0",
|
|
"@tsconfig/node16-strictest": "^1.0.3",
|
|
"@types/invariant": "^2.2.35",
|
|
"@types/jest": "^29.0.3",
|
|
"@types/node": "^18.7.18",
|
|
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
"@typescript-eslint/parser": "^5.51.0",
|
|
"babel-jest": "^29.0.3",
|
|
"babel-plugin-fbt": "^1.0.0",
|
|
"babel-plugin-fbt-runtime": "^1.0.0",
|
|
"concurrently": "^7.4.0",
|
|
"eslint": "^8.33.0",
|
|
"glob": "^7.1.6",
|
|
"jest": "^29.0.3",
|
|
"jest-environment-jsdom": "^29.0.3",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"rimraf": "^3.0.2",
|
|
"test262-harness": "^8.0.0",
|
|
"ts-jest": "^29.0.1",
|
|
"ts-node": "^10.9.1",
|
|
"typescript": "^4.8.3"
|
|
},
|
|
"resolutions": {
|
|
"./**/@babel/parser": "7.7.4",
|
|
"./**/@babel/types": "7.7.4",
|
|
"@babel/core": "7.2.0",
|
|
"@babel/traverse": "7.1.6"
|
|
}
|
|
}
|