chore: Move to Typescript (#2783)
This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously. closes #1282
This commit is contained in:
85
package.json
85
package.json
@@ -5,13 +5,13 @@
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"clean": "rimraf build",
|
||||
"build:i18n": "i18next --silent 'app/**/*.js' 'server/**/*.js' && mkdir -p ./build/shared/i18n && cp -R ./shared/i18n/locales ./build/shared/i18n",
|
||||
"build:server": "babel --quiet -d ./build/server ./server && babel --quiet -d./build/shared ./shared && cp ./server/collaboration/Procfile ./build/server/collaboration/Procfile && cp package.json ./build && ln -sf \"$(pwd)/webpack.config.dev.js\" ./build",
|
||||
"build:i18n": "i18next --silent 'app/**/*.tsx' 'app/**/*.ts' 'server/**/*.ts' 'server/**/*.tsx' && mkdir -p ./build/shared/i18n && cp -R ./shared/i18n/locales ./build/shared/i18n",
|
||||
"build:server": "babel --extensions .ts,.tsx --quiet -d ./build/server ./server && babel --quiet --extensions .ts,.tsx -d./build/shared ./shared && cp ./server/collaboration/Procfile ./build/server/collaboration/Procfile && cp package.json ./build && ln -sf \"$(pwd)/webpack.config.dev.js\" ./build",
|
||||
"build:webpack": "webpack --config webpack.config.prod.js",
|
||||
"build": "yarn clean && yarn build:webpack && yarn build:i18n && yarn build:server",
|
||||
"start": "node ./build/server/index.js",
|
||||
"dev": "NODE_ENV=development yarn concurrently -n api,collaboration -c \"blue,magenta\" \"node --inspect=0.0.0.0 build/server/index.js --services=collaboration,websockets,admin,web,worker\"",
|
||||
"dev:watch": "nodemon --exec \"yarn build:server && yarn build:i18n && yarn dev\" -e js --ignore build/ --ignore app/ --ignore flow-typed/",
|
||||
"dev:watch": "nodemon --exec \"yarn build:server && yarn build:i18n && yarn dev\" -e js --ignore build/ --ignore app/",
|
||||
"lint": "eslint app server shared",
|
||||
"deploy": "git push heroku master",
|
||||
"prepare": "yarn yarn-deduplicate yarn.lock",
|
||||
@@ -39,13 +39,12 @@
|
||||
},
|
||||
"browserslist": "> 0.25%, not dead",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.11.1",
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/plugin-proposal-decorators": "^7.10.5",
|
||||
"@babel/plugin-transform-destructuring": "^7.10.4",
|
||||
"@babel/plugin-transform-regenerator": "^7.10.4",
|
||||
"@babel/preset-env": "^7.11.0",
|
||||
"@babel/preset-flow": "^7.10.4",
|
||||
"@babel/preset-react": "^7.10.4",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@babel/preset-react": "^7.16.0",
|
||||
"@bull-board/api": "^3.5.0",
|
||||
"@bull-board/koa": "^3.5.0",
|
||||
"@hocuspocus/provider": "^1.0.0-alpha.21",
|
||||
@@ -80,7 +79,6 @@
|
||||
"fetch-retry": "^4.1.1",
|
||||
"fetch-with-proxy": "^3.0.1",
|
||||
"file-loader": "^1.1.6",
|
||||
"flow-typed": "^3.3.1",
|
||||
"focus-visible": "^5.2.0",
|
||||
"fractional-index": "^1.0.0",
|
||||
"framer-motion": "^4.1.17",
|
||||
@@ -149,7 +147,7 @@
|
||||
"react-window": "^1.8.6",
|
||||
"reakit": "^1.3.10",
|
||||
"regenerator-runtime": "^0.13.7",
|
||||
"rich-markdown-editor": "^11.19.3",
|
||||
"rich-markdown-editor": "^11.19.4",
|
||||
"semver": "^7.3.2",
|
||||
"sequelize": "^6.9.0",
|
||||
"sequelize-cli": "^6.3.0",
|
||||
@@ -171,6 +169,7 @@
|
||||
"tmp": "^0.2.1",
|
||||
"turndown": "^7.1.1",
|
||||
"utf8": "^3.0.0",
|
||||
"utility-types": "^3.10.0",
|
||||
"uuid": "^8.3.2",
|
||||
"validator": "13.7.0",
|
||||
"winston": "^3.3.3",
|
||||
@@ -181,25 +180,84 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.10.5",
|
||||
"@babel/preset-typescript": "^7.16.0",
|
||||
"@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",
|
||||
"@relative-ci/agent": "^3.0.0",
|
||||
"@types/bull": "^3.15.5",
|
||||
"@types/datadog-metrics": "^0.6.2",
|
||||
"@types/emoji-regex": "^9.2.0",
|
||||
"@types/enzyme": "^3.10.10",
|
||||
"@types/enzyme-adapter-react-16": "^1.0.6",
|
||||
"@types/formidable": "^2.0.0",
|
||||
"@types/fs-extra": "^9.0.13",
|
||||
"@types/google.analytics": "^0.0.42",
|
||||
"@types/invariant": "^2.2.35",
|
||||
"@types/ioredis": "^4.28.1",
|
||||
"@types/jest": "^27.0.2",
|
||||
"@types/js-search": "^1.4.0",
|
||||
"@types/jsonwebtoken": "^8.5.5",
|
||||
"@types/koa": "^2.13.4",
|
||||
"@types/koa-compress": "^4.0.3",
|
||||
"@types/koa-helmet": "^6.0.4",
|
||||
"@types/koa-logger": "^3.1.2",
|
||||
"@types/koa-mount": "^4.0.1",
|
||||
"@types/koa-router": "^7.4.4",
|
||||
"@types/koa-sslify": "^4.0.2",
|
||||
"@types/koa-static": "^4.0.2",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/natural-sort": "^0.0.21",
|
||||
"@types/node": "^15.12.0",
|
||||
"@types/nodemailer": "^6.4.4",
|
||||
"@types/passport-oauth2": "^1.4.11",
|
||||
"@types/prosemirror-inputrules": "^1.0.4",
|
||||
"@types/prosemirror-keymap": "^1.0.4",
|
||||
"@types/prosemirror-markdown": "^1.5.3",
|
||||
"@types/prosemirror-model": "^1.13.2",
|
||||
"@types/prosemirror-state": "^1.2.8",
|
||||
"@types/prosemirror-view": "^1.19.1",
|
||||
"@types/quoted-printable": "^1.0.0",
|
||||
"@types/randomstring": "^1.1.8",
|
||||
"@types/react": "^17.0.34",
|
||||
"@types/react-avatar-editor": "^10.3.6",
|
||||
"@types/react-color": "^3.0.6",
|
||||
"@types/react-dom": "^17.0.11",
|
||||
"@types/react-helmet": "^6.1.4",
|
||||
"@types/react-medium-image-zoom": "^3.0.1",
|
||||
"@types/react-portal": "^4.0.4",
|
||||
"@types/react-router-dom": "^5.3.2",
|
||||
"@types/react-table": "^7.7.8",
|
||||
"@types/react-virtualized-auto-sizer": "^1.0.1",
|
||||
"@types/react-window": "^1.8.5",
|
||||
"@types/sequelize": "^4.28.10",
|
||||
"@types/slug": "^5.0.2",
|
||||
"@types/socket.io": "2.1.13",
|
||||
"@types/socket.io-client": "^3.0.0",
|
||||
"@types/stoppable": "^1.1.1",
|
||||
"@types/styled-components": "^5.1.15",
|
||||
"@types/throng": "^5.0.3",
|
||||
"@types/tmp": "^0.2.2",
|
||||
"@types/turndown": "^5.0.1",
|
||||
"@types/utf8": "^3.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
||||
"@typescript-eslint/parser": "^5.3.1",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-jest": "^26.2.2",
|
||||
"babel-loader": "^8.1.0",
|
||||
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
|
||||
"babel-plugin-tsconfig-paths-module-resolver": "^1.0.3",
|
||||
"concurrently": "^6.2.1",
|
||||
"enzyme": "^3.11.0",
|
||||
"enzyme-adapter-react-16": "^1.15.6",
|
||||
"eslint": "^7.6.0",
|
||||
"eslint-config-react-app": "3.0.6",
|
||||
"eslint-plugin-flowtype": "^5.2.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-import-resolver-typescript": "^2.5.0",
|
||||
"eslint-plugin-import": "^2.25.3",
|
||||
"eslint-plugin-jsx-a11y": "^6.1.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^3.1.0",
|
||||
"eslint-plugin-react": "^7.20.0",
|
||||
"eslint-plugin-react-hooks": "^4.1.0",
|
||||
"fetch-test-server": "^1.1.0",
|
||||
"flow-bin": "^0.124.0",
|
||||
"html-webpack-plugin": "4.5.1",
|
||||
"i18next-parser": "^4.7.0",
|
||||
"jest-cli": "^26.0.0",
|
||||
@@ -211,6 +269,7 @@
|
||||
"react-refresh": "^0.9.0",
|
||||
"rimraf": "^2.5.4",
|
||||
"terser-webpack-plugin": "^4.1.0",
|
||||
"typescript": "^4.4.4",
|
||||
"url-loader": "^0.6.2",
|
||||
"webpack": "4.44.1",
|
||||
"webpack-cli": "^3.3.12",
|
||||
|
||||
Reference in New Issue
Block a user