Merge pull request #16524 from overleaf/em-fix-typescript-backend

Fix typescript config in the backend

GitOrigin-RevId: fb292968bc14da6d7c17bee1da00803a74901899
This commit is contained in:
Eric Mc Sween 2024-01-16 14:24:03 -05:00 committed by Copybot
parent c20e1b13c8
commit b92d1a0251
50 changed files with 324 additions and 180 deletions

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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": "*"

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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<TaggedError> | 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 <caption>An error in a callback</caption>
* function findUser(name, callback) {
* fs.readFile('/etc/passwd', (err, data) => {
* if (err) return callback(OError.tag(err, 'failed to read passwd'))
* // ...
* })
* }
*
* @example <caption>A possible error in a callback</caption>
* function cleanup(callback) {
* fs.unlink('/tmp/scratch', (err) => callback(err && OError.tag(err)))
* }
*
* @example <caption>An error with async/await</caption>
* 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;
}

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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": "*",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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",

View file

@ -1,5 +1,9 @@
{
"extends": "../../tsconfig.backend.json",
"compilerOptions": {
"declaration": true,
"outDir": "types"
},
"include": [
"**/*.js",
"**/*.cjs"

View file

@ -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 \

View file

@ -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": "*",

View file

@ -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 \

View file

@ -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": "*",

View file

@ -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 \

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 .",
"types:check": "tsc --noEmit"
},
"dependencies": {
"@overleaf/logger": "*",

View file

@ -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 \

View file

@ -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": "*",

View file

@ -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 \

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 .",
"types:check": "tsc --noEmit"
},
"dependencies": {
"@overleaf/logger": "*",

View file

@ -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 \

View file

@ -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": "*",

View file

@ -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 \

View file

@ -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"
}
}

View file

@ -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 \

View file

@ -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",

View file

@ -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 \

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 .",
"types:check": "tsc --noEmit"
},
"dependencies": {
"@overleaf/fetch-utils": "*",

View file

@ -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 \

View file

@ -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",

View file

@ -1 +1 @@
18.18.2-buster
18.18.2

View file

@ -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 \

View file

@ -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

View file

@ -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": {

View file

@ -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