Merge pull request #20331 from overleaf/jpa-build-scripts-sync

[misc] sync build scripts

GitOrigin-RevId: 343fd861b6c7b3d81b21babbd41bbb968f0fd448
This commit is contained in:
Jakob Ackermann 2024-09-09 11:23:59 +02:00 committed by Copybot
parent 7469aac0eb
commit 84be385550
25 changed files with 79 additions and 65 deletions

View file

@ -5,10 +5,10 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "npm run lint && npm run format && npm run types:check && 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": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"

View file

@ -5,10 +5,10 @@
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "npm run lint && npm run format && npm run types:check && 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": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"

View file

@ -11,10 +11,10 @@
"version": "3.1.1", "version": "3.1.1",
"scripts": { "scripts": {
"test": "npm run lint && npm run format && npm run types:check && 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": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"

View file

@ -29,13 +29,13 @@
"typescript": "^5.0.4" "typescript": "^5.0.4"
}, },
"scripts": { "scripts": {
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"test:acceptance": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/acceptance", "test:acceptance": "mocha --reporter spec --recursive --exit --grep=$MOCHA_GREP test/acceptance",
"test": "npm run lint && npm run format && npm run types:check && 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": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"
}, },

View file

@ -18,11 +18,11 @@
], ],
"scripts": { "scripts": {
"build": "npm run --silent test", "build": "npm run --silent test",
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"test": "npm run lint && npm run format && npm run types:check && 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": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"

View file

@ -6,10 +6,10 @@
"scripts": { "scripts": {
"test": "npm run lint && npm run format && npm run types:check && 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}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"
}, },

View file

@ -6,10 +6,10 @@
"scripts": { "scripts": {
"test": "npm run lint && npm run format && npm run types:check && 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}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"
}, },

View file

@ -9,10 +9,10 @@
"author": "Overleaf (https://www.overleaf.com)", "author": "Overleaf (https://www.overleaf.com)",
"private": true, "private": true,
"scripts": { "scripts": {
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test": "npm run lint && npm run format && npm run types:check && 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", "test:ci": "npm run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",

View file

@ -13,10 +13,10 @@
"repository": "github:overleaf/redis-wrapper", "repository": "github:overleaf/redis-wrapper",
"license": "ISC", "license": "ISC",
"scripts": { "scripts": {
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test": "npm run lint && npm run format && npm run types:check && 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", "test:ci": "npm run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",

View file

@ -5,10 +5,10 @@
"repository": "overleaf/settings-module", "repository": "overleaf/settings-module",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test": "npm run lint && npm run format && npm run types:check && 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", "test:ci": "npm run test:unit",
"test:unit": "mocha --exit test/**/*.{js,cjs}", "test:unit": "mocha --exit test/**/*.{js,cjs}",

View file

@ -6,10 +6,10 @@
"scripts": { "scripts": {
"test": "npm run lint && npm run format && npm run types:check && 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}", "test:unit": "mocha --exit test/**/*.{js,cjs}",
"lint": "eslint --ext .js --ext .cjs --max-warnings 0 --format unix .", "lint": "eslint --ext .js --ext .cjs --ext .ts --max-warnings 0 --format unix .",
"lint:fix": "eslint --fix --ext .js --ext .cjs .", "lint:fix": "eslint --fix --ext .js --ext .cjs --ext .ts .",
"format": "prettier --list-different $PWD/'**/*.{js,cjs}'", "format": "prettier --list-different $PWD/'**/*.{js,cjs,ts}'",
"format:fix": "prettier --write $PWD/'**/*.{js,cjs}'", "format:fix": "prettier --write $PWD/'**/*.{js,cjs,ts}'",
"test:ci": "npm run test:unit", "test:ci": "npm run test:unit",
"types:check": "tsc --noEmit" "types:check": "tsc --noEmit"
}, },

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -4,7 +4,7 @@ const rclient = require('@overleaf/redis-wrapper').createClient(
) )
let keys = Settings.redis.documentupdater.key_schema let keys = Settings.redis.documentupdater.key_schema
const async = require('async') const async = require('async')
const RedisManager = require('./app/js/RedisManager') const RedisManager = require('../app/js/RedisManager')
const getKeysFromNode = function (node, pattern, callback) { const getKeysFromNode = function (node, pattern, callback) {
let cursor = 0 // redis iterator let cursor = 0 // redis iterator

View file

@ -2,11 +2,11 @@
"extends": "../../tsconfig.backend.json", "extends": "../../tsconfig.backend.json",
"include": [ "include": [
"app.js", "app.js",
"expire_docops.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*", "benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -50,12 +50,6 @@ lint:
lint_fix: lint_fix:
$(RUN_LINTING) lint:fix $(RUN_LINTING) lint:fix
lint_styles:
$(RUN_LINTING) lint:styles
lint_styles_fix:
$(RUN_LINTING) lint:styles:fix
typecheck: typecheck:
$(RUN_LINTING) types:check $(RUN_LINTING) types:check

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -7,3 +7,4 @@ history-v1
--node-version=18.20.2 --node-version=18.20.2
--public-repo=False --public-repo=False
--script-version=4.5.0 --script-version=4.5.0
--tsconfig-extra-includes=api/**/*,migrations/**/*,storage/**/*

View file

@ -1,14 +1,15 @@
{ {
"extends": "../../tsconfig.backend.json", "extends": "../../tsconfig.backend.json",
"include": [ "include": [
"app.js",
"api/**/*", "api/**/*",
"app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*", "benchmarks/**/*",
"config/**/*", "config/**/*",
"migrations/**/*", "migrations/**/*",
"storage/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "storage/**/*",
"test/**/*",
"types"
] ]
} }

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }

View file

@ -3,8 +3,10 @@
"include": [ "include": [
"app.js", "app.js",
"app/js/**/*", "app/js/**/*",
"benchmarks/**/*",
"config/**/*", "config/**/*",
"scripts/**/*", "scripts/**/*",
"test/**/*" "test/**/*",
"types"
] ]
} }