Merge pull request #16385 from overleaf/em-typescript-other-services

Add type checking to all services

GitOrigin-RevId: f328a811fca7a783e9aff7d015ea73756acededd
This commit is contained in:
Eric Mc Sween 2024-01-11 08:25:25 -05:00 committed by Copybot
parent a2da947a1f
commit f1b460ecea
37 changed files with 246 additions and 65 deletions

111
package-lock.json generated
View file

@ -47,7 +47,8 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"prettier": "2.5.1"
"prettier": "2.5.1",
"typescript": "^5.0.4"
}
},
"jobs/mirror-documentation": {
@ -43315,7 +43316,8 @@
"sandboxed-module": "^2.0.4",
"sequelize-cli": "^6.6.0",
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
}
},
"services/analytics/node_modules/bson": {
@ -43422,7 +43424,8 @@
"request": "^2.88.2",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"timekeeper": "^2.2.0"
"timekeeper": "^2.2.0",
"typescript": "^5.0.4"
}
},
"services/chat/node_modules/async": {
@ -43527,7 +43530,8 @@
"sandboxed-module": "^2.0.4",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"timekeeper": "2.2.0"
"timekeeper": "2.2.0",
"typescript": "^5.0.4"
}
},
"services/clsi-perf": {
@ -43547,7 +43551,8 @@
"devDependencies": {
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0"
"mocha": "^10.2.0",
"typescript": "^5.0.4"
}
},
"services/clsi-perf/node_modules/cookie": {
@ -43618,7 +43623,8 @@
"esmock": "^2.1.0",
"mocha": "^10.2.0",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
}
},
"services/contacts/node_modules/bson": {
@ -43757,7 +43763,8 @@
"mocha": "^10.2.0",
"sandboxed-module": "~2.0.4",
"sinon": "~9.0.2",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
}
},
"services/docstore/node_modules/celebrate": {
@ -43905,7 +43912,8 @@
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0",
"timekeeper": "^2.0.0"
"timekeeper": "^2.0.0",
"typescript": "^5.0.4"
}
},
"services/document-updater/node_modules/bson": {
@ -44005,7 +44013,8 @@
"sinon": "9.0.2",
"sinon-chai": "^3.7.0",
"streamifier": "^0.1.1",
"timekeeper": "^2.2.0"
"timekeeper": "^2.2.0",
"typescript": "^5.0.4"
}
},
"services/filestore/node_modules/bson": {
@ -44134,7 +44143,8 @@
"devDependencies": {
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0"
"mocha": "^10.2.0",
"typescript": "^5.0.4"
}
},
"services/github-sync": {
@ -44165,7 +44175,8 @@
"mocha": "^10.2.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"timekeeper": "2.2.0"
"timekeeper": "2.2.0",
"typescript": "^5.0.4"
}
},
"services/github-sync/node_modules/bson": {
@ -44294,6 +44305,7 @@
"node-fetch": "^2.6.7",
"sinon": "^9.0.2",
"swagger-client": "^3.10.0",
"typescript": "^5.0.4",
"yauzl": "^2.9.1"
}
},
@ -44441,7 +44453,8 @@
"devDependencies": {
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0"
"mocha": "^10.2.0",
"typescript": "^5.0.4"
}
},
"services/latexqc": {
@ -45662,7 +45675,8 @@
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
},
"services/notifications/node_modules/bson": {
@ -45769,7 +45783,8 @@
"nock": "^12.0.3",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"timekeeper": "2.2.0"
"timekeeper": "2.2.0",
"typescript": "^5.0.4"
}
},
"services/project-history/node_modules/@hapi/address": {
@ -45929,6 +45944,7 @@
"sandboxed-module": "~0.3.0",
"sinon": "^9.2.4",
"timekeeper": "0.0.4",
"typescript": "^5.0.4",
"uid-safe": "^2.1.5"
}
},
@ -45979,7 +45995,8 @@
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
},
"services/spelling": {
@ -46003,7 +46020,8 @@
"chai-as-promised": "^7.1.1",
"esmock": "^2.1.0",
"mocha": "^10.2.0",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
},
"services/spelling/node_modules/underscore": {
@ -46034,7 +46052,8 @@
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
},
"services/third-party-datastore": {
@ -46068,7 +46087,8 @@
"sandboxed-module": "^2.0.4",
"sinon": "9.0.1",
"sinon-chai": "^3.7.0",
"sinon-stub-promise": "^4.0.0"
"sinon-stub-promise": "^4.0.0",
"typescript": "^5.0.4"
}
},
"services/third-party-datastore/node_modules/brace-expansion": {
@ -46188,7 +46208,8 @@
"esmock": "^2.1.0",
"mocha": "^10.2.0",
"sinon": "9.0.2",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
}
},
"services/third-party-references/node_modules/bson": {
@ -46322,7 +46343,8 @@
"chai": "^4.3.6",
"chai-as-promised": "^7.1.1",
"chai-http": "^4.4.0",
"mocha": "^10.2.0"
"mocha": "^10.2.0",
"typescript": "^5.0.4"
}
},
"services/track-changes": {
@ -53702,6 +53724,7 @@
"sequelize-cli": "^6.6.0",
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4",
"yargs": "^17.0.0"
},
"dependencies": {
@ -53760,7 +53783,8 @@
"request": "^2.88.2",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"timekeeper": "^2.2.0"
"timekeeper": "^2.2.0",
"typescript": "^5.0.4"
},
"dependencies": {
"async": {
@ -53824,6 +53848,7 @@
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"timekeeper": "2.2.0",
"typescript": "^5.0.4",
"workerpool": "^6.1.5"
},
"dependencies": {
@ -53874,7 +53899,8 @@
"express": "^4.18.2",
"glob": "^7.2.0",
"mocha": "^10.2.0",
"p-limit": "^3.1.0"
"p-limit": "^3.1.0",
"typescript": "^5.0.4"
},
"dependencies": {
"cookie": {
@ -53909,6 +53935,7 @@
"request": "~2.88.2",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4",
"underscore": "~1.13.1"
},
"dependencies": {
@ -53997,7 +54024,8 @@
"request": "^2.88.2",
"sandboxed-module": "~2.0.4",
"sinon": "~9.0.2",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
},
"dependencies": {
"celebrate": {
@ -54096,7 +54124,8 @@
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0",
"timekeeper": "^2.0.0"
"timekeeper": "^2.0.0",
"typescript": "^5.0.4"
},
"dependencies": {
"bson": {
@ -54291,7 +54320,8 @@
"sinon-chai": "^3.7.0",
"streamifier": "^0.1.1",
"timekeeper": "^2.2.0",
"tiny-async-pool": "^1.1.0"
"tiny-async-pool": "^1.1.0",
"typescript": "^5.0.4"
},
"dependencies": {
"bson": {
@ -54381,7 +54411,8 @@
"request": "^2.88.2",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"timekeeper": "2.2.0"
"timekeeper": "2.2.0",
"typescript": "^5.0.4"
},
"dependencies": {
"bson": {
@ -54427,7 +54458,8 @@
"chai-as-promised": "^7.1.1",
"express": "^4.18.2",
"mocha": "^10.2.0",
"samlp": "^7.0.2"
"samlp": "^7.0.2",
"typescript": "^5.0.4"
}
},
"@overleaf/logger": {
@ -54491,7 +54523,8 @@
"mongodb-legacy": "^6.0.1",
"request": "^2.88.2",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
},
"dependencies": {
"bson": {
@ -54626,7 +54659,8 @@
"requestretry": "^7.1.0",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"timekeeper": "2.2.0"
"timekeeper": "2.2.0",
"typescript": "^5.0.4"
},
"dependencies": {
"@hapi/address": {
@ -54807,6 +54841,7 @@
"socket.io": "github:overleaf/socket.io#0.9.19-overleaf-10",
"socket.io-client": "github:overleaf/socket.io-client#0.9.17-overleaf-5",
"timekeeper": "0.0.4",
"typescript": "^5.0.4",
"uid-safe": "^2.1.5"
},
"dependencies": {
@ -54867,7 +54902,8 @@
"mocha": "^10.2.0",
"request": "^2.88.2",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
},
"@overleaf/settings": {
@ -54891,6 +54927,7 @@
"mocha": "^10.2.0",
"request": "^2.88.2",
"sinon": "^9.2.4",
"typescript": "^5.0.4",
"underscore": "1.13.1"
},
"dependencies": {
@ -54930,7 +54967,8 @@
"mongoose": "^5.13.20",
"request": "^2.88.2",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
},
"@overleaf/third-party-datastore": {
@ -54962,7 +55000,8 @@
"sandboxed-module": "^2.0.4",
"sinon": "9.0.1",
"sinon-chai": "^3.7.0",
"sinon-stub-promise": "^4.0.0"
"sinon-stub-promise": "^4.0.0",
"typescript": "^5.0.4"
},
"dependencies": {
"brace-expansion": {
@ -55059,7 +55098,8 @@
"request": "^2.88.2",
"simple-oauth2": "^5.0.0",
"sinon": "9.0.2",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
},
"dependencies": {
"bson": {
@ -55142,7 +55182,8 @@
"lodash": "^4.17.15",
"mocha": "^10.2.0",
"redlock": "^4.1.0",
"request": "^2.88.2"
"request": "^2.88.2",
"typescript": "^5.0.4"
}
},
"@overleaf/web": {
@ -69102,6 +69143,7 @@
"is-valid-hostname": "^1.0.2",
"mocha": "^10.2.0",
"tar-stream": "^2.2.0",
"typescript": "^5.0.4",
"zlib": "^1.0.5"
}
},
@ -75907,6 +75949,7 @@
"temp": "^0.8.3",
"throng": "^4.0.0",
"tsscmp": "^1.0.6",
"typescript": "^5.0.4",
"utf-8-validate": "^5.0.4",
"yauzl": "^2.9.1"
},

View file

@ -15,7 +15,8 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"prettier": "2.5.1"
"prettier": "2.5.1",
"typescript": "^5.0.4"
},
"scripts": {
"format": "prettier --list-different $PWD/'**/*.js'",

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -14,7 +14,8 @@
"lint": "eslint --max-warnings 0 --format unix .",
"format": "prettier --list-different $PWD/'**/*.js'",
"format:fix": "prettier --write $PWD/'**/*.js'",
"lint:fix": "eslint --fix ."
"lint:fix": "eslint --fix .",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@overleaf/logger": "*",
@ -35,7 +36,8 @@
"request": "^2.88.2",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"timekeeper": "^2.2.0"
"timekeeper": "^2.2.0",
"typescript": "^5.0.4"
},
"version": "1.0.0",
"directories": {

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -43,6 +43,7 @@
"sandboxed-module": "^2.0.4",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"timekeeper": "2.2.0"
"timekeeper": "2.2.0",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -34,6 +34,7 @@
"esmock": "^2.1.0",
"mocha": "^10.2.0",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -42,6 +42,7 @@
"mocha": "^10.2.0",
"sandboxed-module": "~2.0.4",
"sinon": "~9.0.2",
"sinon-chai": "^3.7.0"
"sinon-chai": "^3.7.0",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -42,6 +42,7 @@
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4",
"sinon-chai": "^3.7.0",
"timekeeper": "^2.0.0"
"timekeeper": "^2.0.0",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -45,6 +45,7 @@
"sinon": "9.0.2",
"sinon-chai": "^3.7.0",
"streamifier": "^0.1.1",
"timekeeper": "^2.2.0"
"timekeeper": "^2.2.0",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -46,6 +46,7 @@
"node-fetch": "^2.6.7",
"sinon": "^9.0.2",
"swagger-client": "^3.10.0",
"typescript": "^5.0.4",
"yauzl": "^2.9.1"
},
"scripts": {

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -35,6 +35,7 @@
"chai-as-promised": "^7.1.1",
"mocha": "^10.2.0",
"sandboxed-module": "^2.0.4",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -51,6 +51,7 @@
"nock": "^12.0.3",
"sinon": "~9.0.1",
"sinon-chai": "^3.7.0",
"timekeeper": "2.2.0"
"timekeeper": "2.2.0",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -43,6 +43,7 @@
"sandboxed-module": "~0.3.0",
"sinon": "^9.2.4",
"timekeeper": "0.0.4",
"typescript": "^5.0.4",
"uid-safe": "^2.1.5"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -45,7 +45,10 @@ lint:
lint_fix:
$(RUN_LINTING) lint:fix
test: format lint test_unit test_acceptance
typecheck:
$(RUN_LINTING) typecheck
test: format lint typecheck test_unit test_acceptance
test_unit:
ifneq (,$(wildcard test/unit))

View file

@ -40,6 +40,7 @@
"chai-as-promised": "^7.1.1",
"esmock": "^2.1.0",
"mocha": "^10.2.0",
"sinon": "^9.2.4"
"sinon": "^9.2.4",
"typescript": "^5.0.4"
}
}

View file

@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"include": [
"app.js",
"app/src/**/*",
"scripts/**/*",
"test/**/*"
]
}

View file

@ -49,6 +49,7 @@ FROM deps as dev
ARG SENTRY_RELEASE
ENV SENTRY_RELEASE=$SENTRY_RELEASE
COPY tsconfig.backend.json /overleaf/
COPY services/web /overleaf/services/web
# Build the latex parser

View file

@ -1,13 +1,5 @@
{
"compilerOptions": {
"allowJs": true,
"esModuleInterop": true,
"moduleResolution": "node",
"noEmit": true,
"noImplicitAny": false,
"skipLibCheck": true,
"strict": true
},
"extends": "../../tsconfig.backend.json",
"include": [
"app/src/**/*",
"modules/*/app/src/**/*",