diff --git a/libraries/access-token-encryptor/package.json b/libraries/access-token-encryptor/package.json index 9b09bb76ae..1be19fb9be 100644 --- a/libraries/access-token-encryptor/package.json +++ b/libraries/access-token-encryptor/package.json @@ -3,17 +3,18 @@ "version": "3.0.0", "description": "", "main": "index.js", - "types": "./types/index.js", + "types": "./types/index.d.ts", "scripts": { - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "author": "", "license": "AGPL-3.0-only", diff --git a/libraries/access-token-encryptor/tsconfig.json b/libraries/access-token-encryptor/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/access-token-encryptor/tsconfig.json +++ b/libraries/access-token-encryptor/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/fetch-utils/package.json b/libraries/fetch-utils/package.json index 2dddd54fc1..dfd2a5df6b 100644 --- a/libraries/fetch-utils/package.json +++ b/libraries/fetch-utils/package.json @@ -3,17 +3,18 @@ "version": "0.1.0", "description": "utilities for node-fetch", "main": "index.js", - "types": "types/index.js", + "types": "types/index.d.ts", "scripts": { - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "author": "Overleaf (https://www.overleaf.com)", "license": "AGPL-3.0-only", diff --git a/libraries/fetch-utils/tsconfig.json b/libraries/fetch-utils/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/fetch-utils/tsconfig.json +++ b/libraries/fetch-utils/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/logger/package.json b/libraries/logger/package.json index 02f443adb6..6dbc4ed4dd 100644 --- a/libraries/logger/package.json +++ b/libraries/logger/package.json @@ -7,19 +7,20 @@ "url": "https://github.com/overleaf/overleaf" }, "main": "index.js", - "types": "types/index.js", + "types": "types/index.d.ts", "license": "AGPL-3.0-only", "version": "3.1.1", "scripts": { - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "dependencies": { "@google-cloud/logging-bunyan": "^5.0.0", diff --git a/libraries/logger/tsconfig.json b/libraries/logger/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/logger/tsconfig.json +++ b/libraries/logger/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/metrics/package.json b/libraries/metrics/package.json index cc38518ba4..cc1a927d17 100644 --- a/libraries/metrics/package.json +++ b/libraries/metrics/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/overleaf/metrics-module.git" }, "main": "index.js", - "types": "types/index.js", + "types": "types/index.d.ts", "dependencies": { "@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0", "@google-cloud/profiler": "^6.0.0", @@ -34,12 +34,13 @@ "lint:fix": "eslint --fix --ext .js --ext .cjs .", "test:unit": "mocha --exit test/**/*.{js,cjs}", "test:acceptance": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/acceptance", - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "peerDependencies": { "@overleaf/logger": "*" diff --git a/libraries/metrics/tsconfig.json b/libraries/metrics/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/metrics/tsconfig.json +++ b/libraries/metrics/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/o-error/index.d.ts b/libraries/o-error/index.d.ts deleted file mode 100644 index 005be4e078..0000000000 --- a/libraries/o-error/index.d.ts +++ /dev/null @@ -1,83 +0,0 @@ -export = OError; -/** - * Light-weight helpers for handling JavaScript Errors in node.js and the - * browser. - */ -declare class OError extends Error { - /** - * @param {string} message as for built-in Error - * @param {Object} [info] extra data to attach to the error - * @param {Error} [cause] the internal error that caused this error - */ - constructor(message: string, info?: any, cause?: Error); - info: any; - cause: Error; - /** @private @type {Array | undefined} */ - private _oErrorTags; - /** - * Set the extra info object for this error. - * - * @param {Object} info extra data to attach to the error - * @return {this} - */ - withInfo(info: any): OError; - /** - * Wrap the given error, which caused this error. - * - * @param {Error} cause the internal error that caused this error - * @return {this} - */ - withCause(cause: Error): OError; -} -declare namespace OError { - /** - * Tag debugging information onto any error (whether an OError or not) and - * return it. - * - * @example An error in a callback - * function findUser(name, callback) { - * fs.readFile('/etc/passwd', (err, data) => { - * if (err) return callback(OError.tag(err, 'failed to read passwd')) - * // ... - * }) - * } - * - * @example A possible error in a callback - * function cleanup(callback) { - * fs.unlink('/tmp/scratch', (err) => callback(err && OError.tag(err))) - * } - * - * @example An error with async/await - * async function cleanup() { - * try { - * await fs.promises.unlink('/tmp/scratch') - * } catch (err) { - * throw OError.tag(err, 'failed to remove scratch file') - * } - * } - * - * @param {Error} error the error to tag - * @param {string} [message] message with which to tag `error` - * @param {Object} [info] extra data with wich to tag `error` - * @return {Error} the modified `error` argument - */ - export function tag(error: Error, message?: string, info?: any): Error; - /** - * The merged info from any `tag`s and causes on the given error. - * - * If an info property is repeated, the last one wins. - * - * @param {Error | null | undefined} error any error (may or may not be an `OError`) - * @return {Object} - */ - export function getFullInfo(error: Error): any; - /** - * Return the `stack` property from `error`, including the `stack`s for any - * tagged errors added with `OError.tag` and for any `cause`s. - * - * @param {Error | null | undefined} error any error (may or may not be an `OError`) - * @return {string} - */ - export function getFullStack(error: Error): string; - export const maxTags: Number; -} diff --git a/libraries/o-error/package.json b/libraries/o-error/package.json index 6d20b2bd59..54ed49af1d 100644 --- a/libraries/o-error/package.json +++ b/libraries/o-error/package.json @@ -13,26 +13,24 @@ "verror" ], "main": "index.cjs", - "types": "types/index.cjs", + "types": "types/index.d.cts", "files": [ "index.cjs", "index.d.ts" ], "scripts": { - "build": "npm run --silent typecheck && npm run --silent test && npm run --silent declaration:build && npm run --silent update-readme", - "declaration:build": "rm -f index.d.ts && tsc --allowJs --declaration --emitDeclarationOnly --moduleResolution node --target ES6 index.js", - "declaration:check": "git diff --exit-code -- index.d.ts", + "build": "npm run --silent test && npm run --silent update-readme", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", - "prepublishOnly": "npm run --silent declaration:build && npm run --silent declaration:check", - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", - "typecheck": "tsc --noEmit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "update-readme": "doc/update-readme.js", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "test:ci": "npm run test:unit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "author": "Overleaf (https://www.overleaf.com)", "license": "MIT", diff --git a/libraries/o-error/tsconfig.json b/libraries/o-error/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/o-error/tsconfig.json +++ b/libraries/o-error/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/object-persistor/package.json b/libraries/object-persistor/package.json index 67e48597e7..70d8e5d5cd 100644 --- a/libraries/object-persistor/package.json +++ b/libraries/object-persistor/package.json @@ -3,17 +3,18 @@ "version": "1.0.2", "description": "Module for storing objects in multiple backends, with fallback on 404 to assist migration between them", "main": "index.js", - "types": "types/index.js", + "types": "types/index.d.ts", "scripts": { - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "test:unit": "mocha --exit test/**/*.{js,cjs}", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "repository": { "type": "git", diff --git a/libraries/object-persistor/tsconfig.json b/libraries/object-persistor/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/object-persistor/tsconfig.json +++ b/libraries/object-persistor/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/overleaf-editor-core/package.json b/libraries/overleaf-editor-core/package.json index 78bf8bc5e1..684b56d9da 100644 --- a/libraries/overleaf-editor-core/package.json +++ b/libraries/overleaf-editor-core/package.json @@ -3,17 +3,18 @@ "version": "1.0.0", "description": "Library shared between the editor server and clients.", "main": "index.js", - "types": "types/index.js", + "types": "types/index.d.ts", "scripts": { - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "author": "team@overleaf.com", "license": "Proprietary", diff --git a/libraries/overleaf-editor-core/tsconfig.json b/libraries/overleaf-editor-core/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/overleaf-editor-core/tsconfig.json +++ b/libraries/overleaf-editor-core/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/promise-utils/package.json b/libraries/promise-utils/package.json index f84d1c712e..8839cf05a9 100644 --- a/libraries/promise-utils/package.json +++ b/libraries/promise-utils/package.json @@ -3,16 +3,18 @@ "version": "0.1.0", "description": "utilities to help working with promises", "main": "index.js", + "types": "types/index.d.ts", "scripts": { - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "test:unit": "mocha --exit test/**/*.{js,cjs}", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "author": "Overleaf (https://www.overleaf.com)", "license": "AGPL-3.0-only", diff --git a/libraries/promise-utils/tsconfig.json b/libraries/promise-utils/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/promise-utils/tsconfig.json +++ b/libraries/promise-utils/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/ranges-tracker/package.json b/libraries/ranges-tracker/package.json index 1733bd0359..4477ae315d 100644 --- a/libraries/ranges-tracker/package.json +++ b/libraries/ranges-tracker/package.json @@ -12,11 +12,12 @@ "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "devDependencies": { "mocha": "^10.2.0", diff --git a/libraries/ranges-tracker/tsconfig.json b/libraries/ranges-tracker/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/ranges-tracker/tsconfig.json +++ b/libraries/ranges-tracker/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/redis-wrapper/package.json b/libraries/redis-wrapper/package.json index f491cdcdfc..b0726340f7 100644 --- a/libraries/redis-wrapper/package.json +++ b/libraries/redis-wrapper/package.json @@ -3,6 +3,7 @@ "version": "2.1.0", "description": "Redis wrapper for node which will either use cluster or single instance redis", "main": "index.js", + "types": "types/index.d.ts", "files": [ "index.js", "Errors.js", @@ -17,11 +18,12 @@ "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "peerDependencies": { "@overleaf/logger": "*", diff --git a/libraries/redis-wrapper/tsconfig.json b/libraries/redis-wrapper/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/redis-wrapper/tsconfig.json +++ b/libraries/redis-wrapper/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/settings/package.json b/libraries/settings/package.json index 07788d9776..c887fcca60 100644 --- a/libraries/settings/package.json +++ b/libraries/settings/package.json @@ -3,16 +3,19 @@ "description": "A centralised settings system for Overleaf", "version": "3.0.0", "repository": "overleaf/settings-module", + "main": "index.js", + "types": "types/index.d.ts", "scripts": { "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", "test:unit": "mocha --exit test/**/*.{js,cjs}", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "devDependencies": { "mocha": "^10.2.0", diff --git a/libraries/settings/tsconfig.json b/libraries/settings/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/settings/tsconfig.json +++ b/libraries/settings/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/libraries/stream-utils/package.json b/libraries/stream-utils/package.json index 33198fbb13..665f51a155 100644 --- a/libraries/stream-utils/package.json +++ b/libraries/stream-utils/package.json @@ -3,17 +3,18 @@ "version": "0.1.0", "description": "stream handling utilities", "main": "index.js", - "types": "types/index.js", + "types": "types/index.d.ts", "scripts": { - "test": "npm run lint && npm run format && npm run typecheck && npm run test:unit", + "test": "npm run lint && npm run format && npm run types:check && npm run test:unit", "test:unit": "mocha --exit test/**/*.{js,cjs}", "lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint:fix": "eslint --fix --ext .js --ext .cjs .", "format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "test:ci": "npm run test:unit", - "typecheck": "tsc --noEmit", - "update-types": "rm -rf types && tsc --emitDeclarationOnly" + "types:build": "[ -d types ] || tsc --emitDeclarationOnly", + "types:check": "tsc --noEmit", + "types:rebuild": "rm -rf types && npm run types:build" }, "author": "Overleaf (https://www.overleaf.com)", "license": "AGPL-3.0-only", diff --git a/libraries/stream-utils/tsconfig.json b/libraries/stream-utils/tsconfig.json index d43bb2470a..adf05e5a36 100644 --- a/libraries/stream-utils/tsconfig.json +++ b/libraries/stream-utils/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.backend.json", + "compilerOptions": { + "declaration": true, + "outDir": "types" + }, "include": [ "**/*.js", "**/*.cjs" diff --git a/services/chat/Makefile b/services/chat/Makefile index 4e138c8fbf..895605aa1f 100644 --- a/services/chat/Makefile +++ b/services/chat/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -112,4 +118,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/chat/package.json b/services/chat/package.json index 6e211fa18d..b68d0fa2ad 100644 --- a/services/chat/package.json +++ b/services/chat/package.json @@ -15,7 +15,7 @@ "format": "prettier --list-different $PWD/'**/*.js'", "format:fix": "prettier --write $PWD/'**/*.js'", "lint:fix": "eslint --fix .", - "typecheck": "tsc --noEmit" + "types:check": "tsc --noEmit" }, "dependencies": { "@overleaf/logger": "*", diff --git a/services/clsi/Makefile b/services/clsi/Makefile index 8ec23e218a..12138ecb2f 100644 --- a/services/clsi/Makefile +++ b/services/clsi/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -126,4 +132,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/clsi/package.json b/services/clsi/package.json index 5858b087d8..341be3cca8 100644 --- a/services/clsi/package.json +++ b/services/clsi/package.json @@ -13,7 +13,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 .", + "types:check": "tsc --noEmit" }, "dependencies": { "@overleaf/fetch-utils": "*", diff --git a/services/contacts/Makefile b/services/contacts/Makefile index 527b9e4d8e..ac6d9e2b80 100644 --- a/services/contacts/Makefile +++ b/services/contacts/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -112,4 +118,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/contacts/package.json b/services/contacts/package.json index d4d32340bf..5b336978b8 100644 --- a/services/contacts/package.json +++ b/services/contacts/package.json @@ -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 .", + "types:check": "tsc --noEmit" }, "dependencies": { "@overleaf/logger": "*", diff --git a/services/docstore/Makefile b/services/docstore/Makefile index 4b4ce85b69..55f1c869e5 100644 --- a/services/docstore/Makefile +++ b/services/docstore/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -112,4 +118,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/docstore/package.json b/services/docstore/package.json index a5523aa90e..1d77a99c06 100644 --- a/services/docstore/package.json +++ b/services/docstore/package.json @@ -13,7 +13,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 .", + "types:check": "tsc --noEmit" }, "dependencies": { "@overleaf/logger": "*", diff --git a/services/document-updater/Makefile b/services/document-updater/Makefile index 926745de83..8d0404cb8f 100644 --- a/services/document-updater/Makefile +++ b/services/document-updater/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -112,4 +118,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/document-updater/package.json b/services/document-updater/package.json index 1f785b2d90..34c312ddba 100644 --- a/services/document-updater/package.json +++ b/services/document-updater/package.json @@ -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 .", + "types:check": "tsc --noEmit" }, "dependencies": { "@overleaf/logger": "*", diff --git a/services/filestore/Makefile b/services/filestore/Makefile index e72a3b1088..10a2681486 100644 --- a/services/filestore/Makefile +++ b/services/filestore/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -126,4 +132,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/filestore/package.json b/services/filestore/package.json index da29037dd3..b946047c7a 100644 --- a/services/filestore/package.json +++ b/services/filestore/package.json @@ -15,7 +15,8 @@ "format:fix": "prettier --write $PWD/'**/*.js'", "test:acceptance:_run": "mocha --recursive --reporter spec --timeout 15000 --exit $@ test/acceptance/js", "test:unit:_run": "mocha --recursive --reporter spec $@ test/unit/js", - "lint:fix": "eslint --fix ." + "lint:fix": "eslint --fix .", + "types:check": "tsc --noEmit" }, "dependencies": { "@overleaf/logger": "*", diff --git a/services/history-v1/Makefile b/services/history-v1/Makefile index af2120c58a..f31de99977 100644 --- a/services/history-v1/Makefile +++ b/services/history-v1/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -112,4 +118,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/history-v1/package.json b/services/history-v1/package.json index 78e569abcf..0373162cbf 100644 --- a/services/history-v1/package.json +++ b/services/history-v1/package.json @@ -63,6 +63,7 @@ "migrate": "knex migrate:latest", "delete_old_chunks": "node storage/tasks/delete_old_chunks.js", "fix_duplicate_versions": "node storage/tasks/fix_duplicate_versions.js", - "benchmarks": "node benchmarks/index.js" + "benchmarks": "node benchmarks/index.js", + "types:check": "tsc --noEmit" } } diff --git a/services/notifications/Makefile b/services/notifications/Makefile index 332af4db72..55db1be393 100644 --- a/services/notifications/Makefile +++ b/services/notifications/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -112,4 +118,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/notifications/package.json b/services/notifications/package.json index 220933ac1b..0b862ed3bf 100644 --- a/services/notifications/package.json +++ b/services/notifications/package.json @@ -13,7 +13,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 .", + "types:check": "tsc --noEmit" }, "author": "", "license": "ISC", diff --git a/services/project-history/Makefile b/services/project-history/Makefile index adfd6a80fd..b279101921 100644 --- a/services/project-history/Makefile +++ b/services/project-history/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -112,4 +118,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/project-history/package.json b/services/project-history/package.json index 8b0b155017..ae1fe5da57 100644 --- a/services/project-history/package.json +++ b/services/project-history/package.json @@ -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 .", + "types:check": "tsc --noEmit" }, "dependencies": { "@overleaf/fetch-utils": "*", diff --git a/services/real-time/Makefile b/services/real-time/Makefile index f8c1d2ca4b..3141cb258d 100644 --- a/services/real-time/Makefile +++ b/services/real-time/Makefile @@ -33,6 +33,9 @@ MONOREPO=$(shell cd ../../ && pwd) # Eslint and prettier (plus some configs) are on the root. RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent + format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -105,4 +111,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/real-time/package.json b/services/real-time/package.json index 6dc5f57f7b..0ea99e1188 100644 --- a/services/real-time/package.json +++ b/services/real-time/package.json @@ -13,7 +13,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 .", + "types:check": "tsc --noEmit" }, "dependencies": { "@hapi/joi": "^17.1.1", diff --git a/services/spelling/.nvmrc b/services/spelling/.nvmrc index 4d22a208e1..87ec8842b1 100644 --- a/services/spelling/.nvmrc +++ b/services/spelling/.nvmrc @@ -1 +1 @@ -18.18.2-buster +18.18.2 diff --git a/services/spelling/Makefile b/services/spelling/Makefile index 7df64b2183..61d353dfc2 100644 --- a/services/spelling/Makefile +++ b/services/spelling/Makefile @@ -31,7 +31,10 @@ HERE=$(shell pwd) MONOREPO=$(shell cd ../../ && pwd) # Run the linting commands in the scope of the monorepo. # Eslint and prettier (plus some configs) are on the root. -RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2-buster npm run --silent +RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.18.2 npm run --silent + +# Same but from the top of the monorepo +RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.18.2 npm run --silent format: $(RUN_LINTING) format @@ -45,8 +48,11 @@ lint: lint_fix: $(RUN_LINTING) lint:fix -typecheck: - $(RUN_LINTING) typecheck +build_types: + $(RUN_LINTING_MONOREPO) --workspaces --if-present types:build + +typecheck: build_types + $(RUN_LINTING) types:check test: format lint typecheck test_unit test_acceptance @@ -126,4 +132,12 @@ publish: docker push $(DOCKER_REPO)/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) -.PHONY: clean test test_unit test_acceptance test_clean benchmarks build publish +.PHONY: clean \ + format format_fix \ + lint lint_fix \ + build_types typecheck \ + test test_clean test_unit test_unit_clean \ + test_acceptance test_acceptance_debug test_acceptance_pre_run \ + test_acceptance_run test_acceptance_run_debug test_acceptance_clean \ + benchmarks \ + build tar publish \ diff --git a/services/spelling/buildscript.txt b/services/spelling/buildscript.txt index 0d1f048af8..b23bbb81cb 100644 --- a/services/spelling/buildscript.txt +++ b/services/spelling/buildscript.txt @@ -5,6 +5,6 @@ spelling --env-add= --env-pass-through= --esmock-loader=True ---node-version=18.18.2-buster +--node-version=18.18.2 --public-repo=False --script-version=4.5.0 diff --git a/services/spelling/package.json b/services/spelling/package.json index edb4280dc0..82ae8ae708 100644 --- a/services/spelling/package.json +++ b/services/spelling/package.json @@ -19,7 +19,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 .", + "types:check": "tsc --noEmit" }, "version": "0.1.4", "dependencies": { diff --git a/services/web/Dockerfile b/services/web/Dockerfile index c86fc3dea1..4bebe1e6f5 100644 --- a/services/web/Dockerfile +++ b/services/web/Dockerfile @@ -34,7 +34,10 @@ FROM deps-prod as deps ENV CYPRESS_INSTALL_BINARY=0 -RUN cd /overleaf && npm install +COPY tsconfig.backend.json /overleaf/ +RUN cd /overleaf \ + && npm install \ + && npm run --workspaces --if-present types:build # the web image with only production dependencies but no webpack production build, for development FROM deps-prod as app-only @@ -49,7 +52,6 @@ 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