package.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. {
  2. "name": "@overleaf/web",
  3. "description": "The HTTP front end for Overleaf",
  4. "private": true,
  5. "main": "app.mjs",
  6. "directories": {
  7. "public": "./public"
  8. },
  9. "scripts": {
  10. "test:acceptance:run_dir": "mocha --recursive --timeout 25000 --grep=$MOCHA_GREP --require test/acceptance/bootstrap.js",
  11. "test:acceptance:app": "npm run test:acceptance:run_dir -- test/acceptance/src",
  12. "test:unit:run_dir": "bin/test_unit_run_dir",
  13. "test:unit:all": "npm run test:unit:run_dir -- test/unit/src modules/*/test/unit/src",
  14. "test:unit:all:silent": "npm run test:unit:all -- --reporter dot",
  15. "test:unit:app": "npm run test:unit:run_dir -- test/unit/src",
  16. "test:unit:mocha": "npm run test:unit:mocha:run_dir -- test/unit/src modules/*/test/unit/src",
  17. "test:unit:mocha:run_dir": "mocha --recursive --timeout 25000 --exit --grep=$MOCHA_GREP --require test/unit/bootstrap.js --extension=js",
  18. "test:unit:esm": "vitest run",
  19. "test:unit:esm:watch": "vitest",
  20. "test:frontend": "NODE_ENV=test TZ=GMT mocha --recursive --timeout 5000 --exit --extension js,jsx,mjs,ts,tsx --grep=$MOCHA_GREP --require test/frontend/bootstrap.js --ignore '**/*.spec.{js,jsx,ts,tsx}' --ignore '**/helpers/**/*.{js,jsx,ts,tsx}' test/frontend modules/*/test/frontend",
  21. "test:frontend:coverage": "c8 --all --include 'frontend/js' --include 'modules/*/frontend/js' --exclude 'frontend/js/vendor' --reporter=lcov --reporter=text-summary npm run test:frontend",
  22. "start": "node app.mjs",
  23. "nodemon": "node --watch app.mjs --watch-locales",
  24. "webpack": "webpack serve --config webpack.config.dev.js",
  25. "webpack:production": "webpack --config webpack.config.prod.js",
  26. "webpack:profile": "webpack --config webpack.config.prod.js --profile --json > stats.json",
  27. "format": "prettier --list-different $PWD/'**/*.{js,jsx,mjs,ts,tsx,json}'",
  28. "format:fix": "prettier --write $PWD/'**/*.{js,jsx,mjs,ts,tsx,json}'",
  29. "format:styles": "prettier --list-different $PWD/'**/*.{css,less,scss}'",
  30. "format:styles:fix": "prettier --write $PWD/'**/*.{css,less,scss}'",
  31. "format:pug": "prettier --list-different $PWD/'**/*.pug'",
  32. "format:pug:fix": "prettier --write $PWD/'**/*.pug'",
  33. "lint": "eslint --max-warnings 0 --format unix --ext .js,.jsx,.mjs,.ts,.tsx .",
  34. "lint:fix": "eslint --fix --ext .js,.jsx,.mjs,.ts,.tsx .",
  35. "lint:styles": "stylelint '**/*.scss'",
  36. "lint:styles:fix": "stylelint '**/*.scss' --fix",
  37. "type-check": "tsc --noEmit",
  38. "type-check:backend": "tsc -p tsconfig.backend.json --noEmit",
  39. "extract-translations": "i18next-scanner",
  40. "migrations": "MONGO_SOCKET_TIMEOUT=0 east --es-modules",
  41. "convert-themes": "node frontend/js/features/source-editor/themes/scripts/convert.js",
  42. "cypress:open-ct": "OVERLEAF_CONFIG=$PWD/config/settings.webpack.js cypress open --component",
  43. "cypress:run-ct": "OVERLEAF_CONFIG=$PWD/config/settings.webpack.js cypress run --component --browser chrome",
  44. "cypress:docker:open-ct": "DOCKER_USER=\"$(id -u):$(id -g)\" docker compose -f docker-compose.cypress.yml run --rm cypress run cypress:open-ct",
  45. "cypress:docker:run-ct": "DOCKER_USER=\"$(id -u):$(id -g)\" docker compose -f docker-compose.cypress.yml run --rm cypress run cypress:run-ct --browser chrome",
  46. "lezer-latex:generate": "node scripts/lezer-latex/generate.js",
  47. "lezer-latex:run": "node scripts/lezer-latex/run.mjs",
  48. "lezer-latex:benchmark": "node scripts/lezer-latex/benchmark.mjs",
  49. "lezer-latex:benchmark-incremental": "node scripts/lezer-latex/test-incremental-parser.mjs",
  50. "routes": "bin/routes",
  51. "storybook": "storybook dev -p 6006 --no-open",
  52. "build-storybook": "storybook build",
  53. "precompile-pug": "node app/src/infrastructure/Views",
  54. "local:nodemon": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env; set +a; echo $OVERLEAF_CONFIG; WEB_PORT=13000 LISTEN_ADDRESS=0.0.0.0 npm run nodemon",
  55. "local:webpack": "set -a;. ../../config/dev-environment.env;. ./docker-compose.common.env;. ../../config/local-dev.env;. ./local-dev.env;. ../../config/local.env; set +a; PORT=13808 OVERLEAF_CONFIG=$(pwd)/config/settings.webpack.js npm run webpack",
  56. "local:test:acceptance:run_dir": "set -a;. $(pwd)/docker-compose.common.env;. $(pwd)/local-test.env; set +a; npm run test:acceptance:run_dir",
  57. "local:test:acceptance:run_app": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/test/acceptance/src",
  58. "local:test:acceptance:run_module": "if [ ! -d $(pwd)/modules/${MODULE}/test/acceptance ]; then echo \"Module '${MODULE}' does not have acceptance tests\"; exit 0; fi; OVERLEAF_CONFIG=$(pwd)/modules/${MODULE}/test/acceptance/config/settings.test.js BASE_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js npm run local:test:acceptance:run_dir -- $(pwd)/modules/${MODULE}/test/acceptance",
  59. "local:test:acceptance:run_modules": "OVERLEAF_CONFIG=$(pwd)/test/acceptance/config/settings.test.${OVERLEAF_APP}.js node $(pwd)/test/acceptance/getModuleTargets --name-only | xargs -n1 sh -c 'MODULE=$0 npm run local:test:acceptance:run_module || exit 255' $1",
  60. "local:test:acceptance:app:saas": "OVERLEAF_APP=saas npm run local:test:acceptance:run_app",
  61. "local:test:acceptance:app:server-pro": "OVERLEAF_APP=server-pro npm run local:test:acceptance:run_app",
  62. "local:test:acceptance:app:server-ce": "OVERLEAF_APP=server-ce npm run local:test:acceptance:run_app",
  63. "local:test:acceptance:app": "echo saas server-pro server-ce | xargs -n1 sh -c 'npm run local:test:acceptance:app:${0} || exit 255'",
  64. "local:test:acceptance:modules:saas": "OVERLEAF_APP=saas npm run local:test:acceptance:run_modules",
  65. "local:test:acceptance:modules:server-pro": "OVERLEAF_APP=server-pro npm run local:test:acceptance:run_modules",
  66. "local:test:acceptance:modules:server-ce": "OVERLEAF_APP=server-ce npm run local:test:acceptance:run_modules",
  67. "local:test:acceptance:modules": "echo saas server-ce server-pro | xargs -n1 sh -c 'npm run local:test:acceptance:modules:${0} || exit 255'",
  68. "local:test:acceptance": "npm run local:test:acceptance:app && npm run local:test:acceptance:modules",
  69. "local:test:unit": "npm run test:unit:all",
  70. "local:test:frontend": "npm run test:frontend",
  71. "local:test": "npm run local:test:unit && npm run local:test:frontend && npm run local:test:acceptance"
  72. },
  73. "browserslist": [
  74. "defaults and supports woff2",
  75. "last 1 year",
  76. "safari > 14"
  77. ],
  78. "dependencies": {
  79. "@contentful/rich-text-html-renderer": "^16.0.2",
  80. "@contentful/rich-text-types": "^16.0.2",
  81. "@google-cloud/bigquery": "^6.0.1",
  82. "@node-oauth/oauth2-server": "^5.1.0",
  83. "@node-saml/passport-saml": "^4.0.4",
  84. "@overleaf/access-token-encryptor": "*",
  85. "@overleaf/fetch-utils": "*",
  86. "@overleaf/logger": "*",
  87. "@overleaf/metrics": "*",
  88. "@overleaf/mongo-utils": "*",
  89. "@overleaf/o-error": "*",
  90. "@overleaf/object-persistor": "*",
  91. "@overleaf/promise-utils": "*",
  92. "@overleaf/redis-wrapper": "*",
  93. "@overleaf/settings": "*",
  94. "@phosphor-icons/react": "^2.1.7",
  95. "@slack/webhook": "^7.0.2",
  96. "@stripe/stripe-js": "^7.3.0",
  97. "@xmldom/xmldom": "^0.7.13",
  98. "accepts": "^1.3.7",
  99. "ajv": "^8.12.0",
  100. "archiver": "^5.3.0",
  101. "async": "^3.2.5",
  102. "base-x": "^4.0.1",
  103. "basic-auth": "^2.0.1",
  104. "bcrypt": "^5.0.0",
  105. "body-parser": "^1.20.3",
  106. "bowser": "^2.11.0",
  107. "bull": "^3.18.0",
  108. "bunyan": "^1.8.15",
  109. "cache-flow": "^1.9.0",
  110. "celebrate": "^15.0.3",
  111. "connect-redis": "^6.1.3",
  112. "content-disposition": "^0.5.0",
  113. "contentful": "^10.8.5",
  114. "cookie": "^0.2.3",
  115. "cookie-parser": "1.4.6",
  116. "crc-32": "^1.2.2",
  117. "csurf": "^1.11.0",
  118. "csv": "^6.2.5",
  119. "dateformat": "1.0.4-1.2.3",
  120. "east": "^2.0.2",
  121. "ejs": "^3.1.10",
  122. "email-addresses": "^5.0.0",
  123. "eventsource-parser": "^1.1.2",
  124. "express": "^4.21.2",
  125. "express-bearer-token": "^2.4.0",
  126. "express-http-proxy": "^1.6.0",
  127. "express-session": "^1.17.1",
  128. "globby": "^5.0.0",
  129. "helmet": "^6.0.1",
  130. "https-proxy-agent": "^7.0.6",
  131. "i18next": "^23.10.0",
  132. "i18next-fs-backend": "^2.3.1",
  133. "i18next-http-middleware": "^3.5.0",
  134. "joi": "^17.12.0",
  135. "jose": "^4.3.8",
  136. "json2csv": "^4.3.3",
  137. "jsonwebtoken": "^9.0.0",
  138. "lodash": "^4.17.19",
  139. "lru-cache": "^7.10.1",
  140. "marked": "^4.1.0",
  141. "method-override": "^2.3.3",
  142. "minimatch": "^7.4.2",
  143. "minimist": "^1.2.7",
  144. "mmmagic": "^0.5.3",
  145. "moment": "^2.29.4",
  146. "mongodb-legacy": "6.1.3",
  147. "mongoose": "8.9.5",
  148. "multer": "overleaf/multer#4dbceda355efc3fc8ac3cf5c66c3778c8a6fdb23",
  149. "nocache": "^2.1.0",
  150. "node-fetch": "^2.7.0",
  151. "nodemailer": "^6.7.0",
  152. "nodemailer-ses-transport": "^1.5.1",
  153. "on-headers": "^1.0.2",
  154. "otplib": "^12.0.1",
  155. "p-limit": "^2.3.0",
  156. "p-props": "4.0.0",
  157. "p-queue": "^8.1.0",
  158. "parse-data-url": "^2.0.0",
  159. "passport": "^0.6.0",
  160. "passport-google-oauth20": "^2.0.0",
  161. "passport-ldapauth": "^2.1.4",
  162. "passport-local": "^1.0.0",
  163. "passport-oauth2": "^1.5.0",
  164. "passport-orcid": "0.0.4",
  165. "pug": "^3.0.3",
  166. "pug-runtime": "^3.0.1",
  167. "rate-limiter-flexible": "^2.4.1",
  168. "recurly": "^4.0.0",
  169. "referer-parser": "github:overleaf/nodejs-referer-parser#8b8b103762d05b7be4cfa2f810e1d408be67d7bb",
  170. "request": "^2.88.2",
  171. "requestretry": "^7.1.0",
  172. "sanitize-html": "^2.8.1",
  173. "stripe": "^18.1.0",
  174. "tough-cookie": "^4.0.0",
  175. "tsscmp": "^1.0.6",
  176. "uid-safe": "^2.1.5",
  177. "utf-8-validate": "^5.0.2",
  178. "valid-data-url": "^2.0.0",
  179. "valid-url": "^1.0.9",
  180. "xml-crypto": "^2.1.6",
  181. "xml2js": "^0.6.2",
  182. "xregexp": "^4.3.0",
  183. "yauzl": "^2.10.0"
  184. },
  185. "devDependencies": {
  186. "@babel/cli": "^7.27.0",
  187. "@babel/core": "^7.26.10",
  188. "@babel/preset-env": "^7.26.9",
  189. "@babel/preset-react": "^7.26.3",
  190. "@babel/preset-typescript": "^7.27.0",
  191. "@babel/register": "^7.25.9",
  192. "@codemirror/autocomplete": "github:overleaf/codemirror-autocomplete#6445cd056671c98d12d1c597ba705e11327ec4c5",
  193. "@codemirror/commands": "^6.8.1",
  194. "@codemirror/lang-markdown": "^6.3.2",
  195. "@codemirror/language": "^6.11.0",
  196. "@codemirror/lint": "^6.8.5",
  197. "@codemirror/search": "github:overleaf/codemirror-search#04380a528c339cd4b78fb10b3ef017f657ec17bd",
  198. "@codemirror/state": "^6.5.2",
  199. "@codemirror/view": "^6.36.8",
  200. "@juggle/resize-observer": "^3.3.1",
  201. "@lezer/common": "^1.2.3",
  202. "@lezer/generator": "^1.7.3",
  203. "@lezer/highlight": "^1.2.1",
  204. "@lezer/lr": "^1.4.2",
  205. "@lezer/markdown": "^1.4.3",
  206. "@overleaf/codemirror-tree-view": "^0.1.3",
  207. "@overleaf/dictionaries": "https://github.com/overleaf/dictionaries/archive/refs/tags/v0.0.3.tar.gz",
  208. "@overleaf/ranges-tracker": "*",
  209. "@overleaf/stream-utils": "*",
  210. "@pmmmwh/react-refresh-webpack-plugin": "^0.5.16",
  211. "@pollyjs/adapter-node-http": "^6.0.6",
  212. "@pollyjs/core": "^6.0.6",
  213. "@pollyjs/persister-fs": "^6.0.6",
  214. "@prettier/plugin-pug": "^3.4.0",
  215. "@replit/codemirror-emacs": "overleaf/codemirror-emacs#4394c03858f27053f8768258e9493866e06e938e",
  216. "@replit/codemirror-indentation-markers": "overleaf/codemirror-indentation-markers#78264032eb286bc47871569ae87bff5ca1c6c161",
  217. "@replit/codemirror-vim": "overleaf/codemirror-vim#1bef138382d948018f3f9b8a4d7a70ab61774e4b",
  218. "@sentry/browser": "7.46.0",
  219. "@storybook/addon-a11y": "^8.6.12",
  220. "@storybook/addon-essentials": "^8.6.12",
  221. "@storybook/addon-interactions": "^8.6.12",
  222. "@storybook/addon-links": "^8.6.12",
  223. "@storybook/addon-styling-webpack": "^1.0.1",
  224. "@storybook/addon-webpack5-compiler-babel": "^3.0.6",
  225. "@storybook/cli": "^8.6.12",
  226. "@storybook/react": "^8.6.12",
  227. "@storybook/react-webpack5": "^8.6.12",
  228. "@storybook/theming": "^8.6.12",
  229. "@testing-library/cypress": "^10.0.1",
  230. "@testing-library/dom": "^10.4.0",
  231. "@testing-library/react": "^16.3.0",
  232. "@testing-library/user-event": "^14.4.3",
  233. "@types/bootstrap": "^5.2.10",
  234. "@types/bootstrap-5": "npm:@types/bootstrap@^5.2.10",
  235. "@types/chai": "^4.3.0",
  236. "@types/dateformat": "^5.0.2",
  237. "@types/diff": "^5.0.9",
  238. "@types/events": "^3.0.0",
  239. "@types/express": "^4.17.13",
  240. "@types/mocha": "^9.1.0",
  241. "@types/mocha-each": "^2.0.0",
  242. "@types/react": "^18.3.20",
  243. "@types/react-color": "^3.0.13",
  244. "@types/react-dom": "^18.3.6",
  245. "@types/react-google-recaptcha": "^2.1.9",
  246. "@types/react-linkify": "^1.0.4",
  247. "@types/recurly__recurly-js": "^4.22.0",
  248. "@types/sinon-chai": "^3.2.8",
  249. "@types/uuid": "^9.0.8",
  250. "@uppy/core": "^3.8.0",
  251. "@uppy/dashboard": "^3.7.1",
  252. "@uppy/drag-drop": "^3.0.3",
  253. "@uppy/file-input": "^3.0.4",
  254. "@uppy/progress-bar": "^3.0.4",
  255. "@uppy/react": "^3.2.1",
  256. "@uppy/utils": "^5.7.0",
  257. "@uppy/xhr-upload": "^3.6.0",
  258. "@vitest/eslint-plugin": "1.1.44",
  259. "5to6-codemod": "^1.8.0",
  260. "abort-controller": "^3.0.0",
  261. "acorn": "^7.1.1",
  262. "acorn-walk": "^7.1.1",
  263. "algoliasearch": "^3.35.1",
  264. "autoprefixer": "^10.4.16",
  265. "babel-loader": "^9.1.3",
  266. "babel-plugin-macros": "^3.1.0",
  267. "babel-plugin-module-resolver": "^5.0.2",
  268. "backbone": "^1.6.0",
  269. "bootstrap": "^3.4.1",
  270. "bootstrap-5": "npm:bootstrap@^5.3.6",
  271. "c8": "^7.2.0",
  272. "chai": "^4.3.6",
  273. "chai-as-promised": "^7.1.1",
  274. "chai-exclude": "^2.0.3",
  275. "chart.js": "^4.0.1",
  276. "chartjs-adapter-moment": "^1.0.1",
  277. "chartjs-plugin-datalabels": "^2.2.0",
  278. "cheerio": "^1.0.0-rc.3",
  279. "classnames": "^2.2.6",
  280. "confusing-browser-globals": "^1.0.11",
  281. "cookie-signature": "^1.2.1",
  282. "copy-webpack-plugin": "^11.0.0",
  283. "core-js": "^3.41.0",
  284. "css-loader": "^6.8.1",
  285. "css-minimizer-webpack-plugin": "^5.0.1",
  286. "cypress": "13.13.2",
  287. "cypress-plugin-tab": "^1.0.5",
  288. "d3": "^3.5.16",
  289. "daterangepicker": "2.1.27",
  290. "diff": "^5.1.0",
  291. "dompurify": "^3.2.4",
  292. "downshift": "^9.0.9",
  293. "es6-promise": "^4.2.8",
  294. "escodegen": "^2.0.0",
  295. "eslint-config-standard-jsx": "^11.0.0",
  296. "eslint-plugin-jsx-a11y": "^6.7.1",
  297. "eslint-plugin-react": "^7.32.2",
  298. "eslint-plugin-react-hooks": "^4.6.0",
  299. "eslint-plugin-testing-library": "^7.1.1",
  300. "eslint-plugin-unicorn": "^56.0.0",
  301. "events": "^3.3.0",
  302. "fake-indexeddb": "^6.0.0",
  303. "fetch-mock": "^12.5.2",
  304. "formik": "^2.2.9",
  305. "fuse.js": "^3.0.0",
  306. "glob": "^7.1.6",
  307. "globals": "^16.2.0",
  308. "handlebars": "^4.7.8",
  309. "handlebars-loader": "^1.7.3",
  310. "html-webpack-plugin": "^5.5.3",
  311. "i18next-scanner": "^4.4.0",
  312. "jquery": "^3.7.1",
  313. "jscodeshift": "^17.0.0",
  314. "jsdom": "^19.0.0",
  315. "jsdom-global": "^3.0.2",
  316. "less": "^3.13.1",
  317. "less-loader": "^11.1.3",
  318. "match-sorter": "^6.2.0",
  319. "mathjax": "^3.2.2",
  320. "mensch": "^0.3.4",
  321. "micromark": "^4.0.0",
  322. "mini-css-extract-plugin": "^2.7.6",
  323. "mocha": "^11.1.0",
  324. "mocha-each": "^2.0.1",
  325. "mock-fs": "^5.1.2",
  326. "nock": "^13.5.6",
  327. "nvd3": "^1.8.6",
  328. "overleaf-editor-core": "*",
  329. "pdfjs-dist": "5.1.91",
  330. "pirates": "^4.0.1",
  331. "postcss": "^8.4.31",
  332. "postcss-loader": "^7.3.3",
  333. "prop-types": "^15.7.2",
  334. "qrcode": "^1.4.4",
  335. "react": "^18.3.1",
  336. "react-bootstrap": "^2.10.10",
  337. "react-chartjs-2": "^5.0.1",
  338. "react-color": "^2.19.3",
  339. "react-dnd": "^16.0.1",
  340. "react-dnd-html5-backend": "^16.0.1",
  341. "react-dom": "^18.3.1",
  342. "react-error-boundary": "^5.0.0",
  343. "react-google-recaptcha": "^3.1.0",
  344. "react-i18next": "^13.3.1",
  345. "react-linkify": "^1.0.0-alpha",
  346. "react-refresh": "^0.14.0",
  347. "react-resizable-panels": "^2.1.1",
  348. "resolve-url-loader": "^5.0.0",
  349. "samlp": "^7.0.2",
  350. "sandboxed-module": "overleaf/node-sandboxed-module#cafa2d60f17ce75cc023e6f296eb8de79d92d35d",
  351. "sass": "^1.77.1",
  352. "sass-loader": "^14.2.1",
  353. "scroll-into-view-if-needed": "^2.2.25",
  354. "sinon": "^7.5.0",
  355. "sinon-chai": "^3.7.0",
  356. "sinon-mongoose": "^2.3.0",
  357. "storybook": "^8.6.12",
  358. "stylelint-config-standard-scss": "^13.1.0",
  359. "terser-webpack-plugin": "^5.3.9",
  360. "thread-loader": "^4.0.2",
  361. "timekeeper": "^2.2.0",
  362. "to-string-loader": "^1.2.0",
  363. "tty-browserify": "^0.0.1",
  364. "typescript": "^5.8.3",
  365. "uuid": "^9.0.1",
  366. "vitest": "^3.1.2",
  367. "w3c-keyname": "^2.2.8",
  368. "webpack": "^5.98.0",
  369. "webpack-assets-manifest": "^5.2.1",
  370. "webpack-cli": "^5.1.4",
  371. "webpack-dev-server": "^5.2.1",
  372. "webpack-merge": "^5.10.0",
  373. "yup": "^0.32.11"
  374. },
  375. "overrides": {
  376. "ejs": "$ejs"
  377. }
  378. }