Commit graph

611 commits

Author SHA1 Message Date
Miguel Serrano
88d3186dc1 Merge pull request #25792 from overleaf/msm-bump-multer
Bump `multer` to v2.0.0

GitOrigin-RevId: 688bfd3e6546b18f22ebaef82e4d9dd57b6d40bd
2025-05-22 08:45:16 +00:00
Jessica Lawshe
6bc4e40773 Merge pull request #24624 from overleaf/jel-latexqc-updates
[LaTeXQC] Footer and other minor style updates

GitOrigin-RevId: 67a43f715857a3bd1e97f24278d8e4586815688c
2025-05-21 08:05:50 +00:00
Alf Eaton
f7d37a49d6 Upgrade CodeMirror dependencies (#25620)
* Upgrade CodeMirror dependencies
* Upgrade Lezer dependencies

GitOrigin-RevId: fcbf9b4bbf2577d85f44b48d3b745a56e49e24c9
2025-05-19 12:27:19 +00:00
Miguel Serrano
a8b443fe5f [web] Update base-x dependency to 4.0.1 (#25581)
GitOrigin-RevId: 746f06a3abe75dbc7deb6ea181a15dfc24cd9d22
2025-05-19 12:26:43 +00:00
Andrew Rumble
586820c34d Fix package version for socket.io
GitOrigin-RevId: 07a436ce0db5a0cd320964e3e9e7a5646877561b
2025-05-19 08:05:29 +00:00
Andrew Rumble
daa52d62fa Allow an empty origin request in real-time
This will only happen with a same-origin request (or if someone has
tampered with the request - in which case they could set anything).

Co-authored-by: Tim Down <158919+timdown@users.noreply.github.com>
GitOrigin-RevId: 9dfe49f974a476bfe215768d3984dd60a381d37a
2025-05-19 08:05:16 +00:00
Tim Down
5c4cb50628 Merge pull request #24988 from overleaf/td-bs5-upgrade-and-rename
Apply minor upgrades to Bootstrap 5 and react-bootstrap

GitOrigin-RevId: eb013f38515ebd4b9572d139f00841aca344e3c6
2025-05-16 08:05:28 +00:00
Alf Eaton
b70e0166bd Remove zlib dependency from freegeoip (#25474)
GitOrigin-RevId: 9f61a0630ff6c4b7fd92f180fb58f91178567ede
2025-05-14 08:06:26 +00:00
Jakob Ackermann
e8b5ee2ff9 [history-ot] initial implementation of using doc-level history-ot (#25054)
* [history-v1-ot] initial implementation of using doc-level history-v1-ot

* [web] fix advancing of the otMigrationStage

Use 'nextStage' for the user provided, desired stage when advancing.

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [document-updater] document size check in editor-core

* [history-ot] rename history-v1-ot to history-ot and add types

* [history-ot] apply review feedback

- remove extra !!
- merge variable assignment when processing diff-match-match output
- add helper function for getting docstore lines view of StringFileData

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>

* Revert "[document-updater] add safe rollback point for history-ot (#25283)"

This reverts commit d7230dd14a379a27d2c6ab03a006463a18979d06

Signed-off-by: Jakob Ackermann <jakob.ackermann@overleaf.com>

---------

Signed-off-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
Co-authored-by: Brian Gough <brian.gough@overleaf.com>
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
GitOrigin-RevId: 89c497782adb0427635d50d02263d6f535b12481
2025-05-08 08:05:44 +00:00
Antoine Clausse
eddeca2942 [history-v1] Update config from 1.31.0 to 3.3.12 (#25077)
This removes some DeprecationWarnings in history-v1

The update should be safe:
```
  3.0.0 / 2018-11-20
  Ensure config array items and objects are sealed @fgheorghe
  This required a major version bump in case someone
  relied on the ability to mutate non-sealed data.

  2.0.0 / 2018-07-26
  Potential for backward incompatibility requiring a major version bump.

  Safe to upgrade to major version 2 if you're using a recent NodeJS version and you're not trying to mutate config arrays.

  Added array immutability - jacobemerick
  Removed Node V.4 support
```

https://github.com/node-config/node-config/blob/master/History.md

GitOrigin-RevId: 8384247d1ad2cd659703b4ba50edf7212076dcf3
2025-05-07 08:07:56 +00:00
Antoine Clausse
81941ff335 Update some dependencies so they're compatible with Node 22 (#25317)
* `"@google-cloud/profiler": "^6.0.3"`

* `bin/npm update pprof`

* `bin/npm update nan`

* `bin/npm update @google-cloud/profiler`

* Ignore false positive of `@typescript-eslint/return-await`

> Returning an awaited value that is not a promise is not allowed
Though the function was promisified

GitOrigin-RevId: 24dbe3e8df2b55c0b9583ac79a61e0956ac3fac0
2025-05-07 08:06:57 +00:00
M Fahru
c8a410d358 Merge pull request #25155 from overleaf/mf-use-stripe-v18
[web] Upgrade stripe to v18

GitOrigin-RevId: df522f73132e99e38f1716bf33e8ff4881bd5430
2025-05-06 08:05:19 +00:00
Tim Down
7abafb01ea Merge pull request #23940 from overleaf/td-react-18
Upgrade to React 18

GitOrigin-RevId: 9b81936e6eea2bccd97fe5c2c5841f0b946371b8
2025-05-02 08:05:29 +00:00
Jakob Ackermann
7256c99e29 [clsi-cache] scale writes (#25198)
* [k8s] clsi-cache: increase the number of workers

* [clsi-cache] add a global limit on concurrent writes

* [k8s] clsi-cache: increase timeouts for health checks

* [k8s] clsi-cache: align resource requests with current usage

GitOrigin-RevId: 2aba881ac0e581aa8db78a30d2c58afee6702318
2025-05-01 08:05:55 +00:00
Tim Down
5d78229e1e Merge pull request #25093 from overleaf/td-upgrade-react-error-boundary-second-attempt
Upgrade react-error-boundary to version 5, second attempt

GitOrigin-RevId: 2b88334b66f0ace383211c147279ff88e9f956bb
2025-04-29 08:06:23 +00:00
Alf Eaton
247b4e274d Upgrade PDF.js to v5 (#24948)
* Reapply "Upgrade PDF.js to v5 (#24646)" (#24946)
* Upgrade core-js, caniuse-lite and babel

GitOrigin-RevId: 63398189301b5f5adc8a17b332d92dccfc26d612
2025-04-28 08:05:09 +00:00
Tim Down
cf36767f03 Merge pull request #25080 from overleaf/revert-25073-td-upgrade-react-error-boundary
Revert "Upgrade react-error-boundary to version 5"

GitOrigin-RevId: 3301adb508eed26e4429c6aa912abf9e81c1d9f8
2025-04-25 08:05:25 +00:00
Tim Down
247f04557c Merge pull request #25073 from overleaf/td-upgrade-react-error-boundary
Upgrade react-error-boundary to version 5

GitOrigin-RevId: ebccd35e10084aa221c437c09ddfdb86f6272cf3
2025-04-25 08:05:20 +00:00
Tim Down
fb50d429b4 Merge pull request #24965 from overleaf/td-downshift-9-upgrade
Upgrade Downshift to version 9

GitOrigin-RevId: b36904ab0c82c09a633a25cd6fed651d7c8b19f7
2025-04-24 08:06:24 +00:00
Antoine Clausse
8ec9cd21b4 [latexqc] Update vite version (#25056)
Fixes https://github.com/overleaf/internal/security/dependabot/1398

GitOrigin-RevId: e759d529609df79c63e0c6c45cda941d45fe7ec8
2025-04-24 08:06:19 +00:00
Antoine Clausse
5861e4160c [latexqc] Continue the ESM migration (#24743)
* Set `"type": "module"` in package.json

* Update imports to include file extensions

* Update imports to include file extensions in test files

* Convert webpack files to ESM

* Update configureStore.js for ESM

* Make static-assets CJS, and rename with .cjs

* Misc: update imports to `node:path`

* Add vitest; Remove chai, mocha, sinon, expect, jsdom

* Return promises in conversion-controller, to make testing easier

* Update tests to vitest syntax

* Fix JSON import syntax and babel config

* Import combobo from NPM

* Rename `app.js` to `app.cjs`

This should prevent errors in the production app (https://console.cloud.google.com/cloud-build/builds;region=us-east1/8b42465c-0d07-4a08-b856-aa18c13fae46?project=overleaf-ops)

### Before

```
node@ea395ce612a8:/overleaf/services/latexqc$ node app.js
[...]
ReferenceError: require is not defined in ES module scope, you can use import instead
This file is being treated as an ES module because it has a '.js' file extension and '/overleaf/services/latexqc/package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
    at file:///overleaf/services/latexqc/app.js:2:1
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:122:5)
```

### After

```
node@ea395ce612a8:/overleaf/services/latexqc$ node app.cjs
--------------------------
===>  😊 Starting Server . . .
===>  Environment: production
===>  Listening on port: 8082
--------------------------
```

* Rename `app.js` to `app.cjs` (Fixup forgotten one)

* Rename `app.js` to `app.cjs` (Fixup 2)

* Rename asset files to `.js`

Fixes:
```
Refused to execute script from 'https://staging-latexqc.ieee.org/assets/9d6cc24692a7f912ff06.cjs' because its MIME type ('application/octet-stream') is not executable, and strict MIME type checking is enabled.
```
GitOrigin-RevId: f0b618f7fc4062fb6bdc3779dfc5defc5f72d614
2025-04-24 08:06:14 +00:00
Andrew Rumble
1c672e55f5 Minor bump of webpack and @pmmmwh/react-refresh-webpack-plugin
GitOrigin-RevId: 55421a1cd66e0ec7177470f38fe9f575837b6bac
2025-04-23 08:05:11 +00:00
Antoine Clausse
b901bb6c75 [web] Update fetch-mock to version 12 (#24837)
* Update fetch-mock to version 12

* Replace `fetchMock.done` by `fetchMock.callHistory.done`

* Replace `…Mock.called` by `…Mock.callHistory.called`

* Replace `fetchMock.reset` by `fetchMock.hardReset`

* Replace `fetchMock.restore` by `fetchMock.hardReset`

* Replace `fetchMock.resetHistory` by `fetchMock.clearHistory`

* Replace `fetchMock.calls` by `fetchMock.callHistory.calls`

* Replace `fetchMock.flush` by `fetchMock.callHistory.flush`

* Update tests for fetch-mock version 12

See https://www.wheresrhys.co.uk/fetch-mock/docs/Usage/upgrade-guide

* Update stories for fetch-mock version 12

* Remove `overwriteRoutes` option

* Add `fetchMock.spyGlobal()` to storybook

* Remove deprecated `sendAsJson` param

* Replace `fetchMock.hardReset()` by `fetchMock.removeRoutes().clearHistory()`

* Fixup fetch-mock in storybook:

Call `mockGlobal` inside the hook, call `removeRoutes` and `unmockGlobal` on cleanup

Behaviour can be tested by navigating between

https://storybook.dev-overleaf.com/main/?path=/story/editor-ai-error-assistant-compile-log-entries--first-log-entry
https://storybook.dev-overleaf.com/main/?path=/story/editor-ai-error-assistant-compile-log-entries--rate-limited

https://storybook.dev-overleaf.com/main/?path=/story/project-list-notifications--project-invite
https://storybook.dev-overleaf.com/main/?path=/story/project-list-notifications--project-invite-network-error

And clicking the buttons

GitOrigin-RevId: 35611b4430259e4c21c3d819ad18b2e6dab66242
2025-04-17 08:06:24 +00:00
Antoine Clausse
fa62529d82 [clsi] Replace diskusage by fs (#24789)
* Replace `diskusage` by `fs` in clsi

* Replace `diskusage` by `fs` in clsi-cache

* Update disk space calculations to include block size in bytes

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>

* Add warning comments about Docker-for-Mac fs stats being off by a factor

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 02ea07e531b89bb3d10ddfe780348b19cbddad1f
2025-04-17 08:06:16 +00:00
Alf Eaton
34d5564abc Revert "Upgrade PDF.js to v5 (#24646)" (#24946)
This reverts commit 3ef46af6363aab5b5b007b6c9d72decae65a36ab.

GitOrigin-RevId: 9c3671b3ff196bb62ff547210a1138cb603d6791
2025-04-17 08:05:15 +00:00
Alf Eaton
a1098a921c Upgrade PDF.js to v5 (#24646)
GitOrigin-RevId: 3ef46af6363aab5b5b007b6c9d72decae65a36ab
2025-04-17 08:04:59 +00:00
Tim Down
773cbc92eb Merge pull request #24592 from overleaf/td-socket-io-origins
Use updated socket.io with CORS origin check in real-time

GitOrigin-RevId: a1a874ba298e145aa4c9dd55ef723d79843f8145
2025-04-15 08:05:25 +00:00
Jakob Ackermann
b538d56591 [clsi-cache] backend (#24388)
* [clsi-cache] initial revision of the clsi-cache service

* [clsi] send output files to clsi-cache and import from clsi-cache

* [web] pass editorId to clsi

* [web] clear clsi-cache when clearing clsi cache

* [web] add split-tests for controlling clsi-cache rollout

* [web] populate clsi-cache when cloning/creating project from template

* [clsi-cache] produce less noise when populating cache hits 404

* [clsi-cache] push docker image to AR

* [clsi-cache] push docker image to AR

* [clsi-cache] allow compileGroup in job payload

* [clsi-cache] set X-Zone header from latest endpoint

* [clsi-cache] use method POST for /enqueue endpoint

* [web] populate clsi-cache in zone b with template data

* [clsi-cache] limit number of editors per project/user folder to 10

* [web] clone: populate the clsi-cache unless the TeXLive release changed

* [clsi-cache] keep user folder when clearing cache as anonymous user

* [clsi] download old output.tar.gz when synctex finds empty compile dir

* [web] fix lint

* [clsi-cache] multi-zonal lookup of single build output

* [clsi-cache] add more validation and limits

Co-authored-by: Brian Gough <brian.gough@overleaf.com>

* [clsi] do not include clsi-cache tar-ball in output.zip

* [clsi-cache] fix reference after remaining constant

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>

* [web] consolidate validation of filename into ClsiCacheHandler

* [clsi-cache] extend metrics and event tracking

- break down most of the clsi metrics by label
  - compile=initial - new compile dir without previous output files
  - compile=recompile - recompile in existing compile dir
  - compile=from-cache - compile using previous clsi-cache
- extend segmentation on compile-result-backend event
  - isInitialCompile=true - found new compile dir at start of request
  - restoredClsiCache=true - restored compile dir from clsi-cache

* [clsi] rename metrics labels for download of clsi-cache

This is in preparation for synctex changes.

* [clsi] use constant for limit of entries in output.tar.gz

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>

* [clsi-cache] fix cloning of project cache

---------

Co-authored-by: Brian Gough <brian.gough@overleaf.com>
Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: 4901a65497af13be1549af7f38ceee3188fcf881
2025-04-10 08:05:17 +00:00
Tim Down
28468e134c Merge pull request #24660 from overleaf/td-bs5-remove-react-bootstrap-0
Remove react-bootstrap 0.33.1

GitOrigin-RevId: c320a6b18c576afdc0fd49559915d3d2f3a7a1ef
2025-04-10 08:04:50 +00:00
Jakob Ackermann
cdf04d695c [clsi] upgrade dockerode to bump tar-fs (#24693)
Diff: https://github.com/apocas/dockerode/compare/v3.3.1...v4.0.5
GitOrigin-RevId: 73ba2610d0c2e766a52e638754af410aaad94ec1
2025-04-08 08:06:23 +00:00
Brian Gough
6969a12fae Merge pull request #24616 from overleaf/bg-npm-audit-fix
update axios to version 1.8.4

GitOrigin-RevId: 0e7deb1b55b08ad1c1d81fdd2fa96925b514caf7
2025-04-02 08:04:59 +00:00
M Fahru
57f389646c Merge pull request #24360 from overleaf/mf-initialize-stripe-package-and-keys
[web] Init Stripe packages and keys

GitOrigin-RevId: e707704db6d758a0309f398bfde8900376b5cc67
2025-03-24 10:47:20 +00:00
Jessica Lawshe
f3a19f48d8 Merge pull request #24377 from overleaf/jel-xml-crypto-update
[web] Upgrade dependencies of dependencies for `xml-crypto`

GitOrigin-RevId: 004302f7b5a780e3a43c427182e21fb162df8dd1
2025-03-24 10:47:16 +00:00
Brian Gough
31b57e2991 Merge pull request #24367 from overleaf/bg-add-new-project-history-flush-script
add new project history flush script

GitOrigin-RevId: 4d6f3be1ada7191334b934e34e1c9eac59a816d0
2025-03-24 10:46:34 +00:00
Jessica Lawshe
6cb5360c88 Merge pull request #24339 from overleaf/jel-xml-crypto
[web] Upgrade `xml-crypto` in web

GitOrigin-RevId: 0fa810d227da9c65031b843958f8b5e796e3adc8
2025-03-24 10:46:24 +00:00
Jakob Ackermann
7b69d61540 [saas-e2e] initial revision of SaaS E2E tests running in the dev-env (#24311)
* [saas-e2e] initial revision of SaaS E2E tests running in the dev-env

* [v1] make rubocop happy

* [v1] make rubocop happy

* [saas-e2e] more retries for webpack startup check

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>

* [web] restrict e2e_test_setup.mjs to running in the dev-env

Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com>

* [saas-e2e] import latest split-tests from production

---------

Co-authored-by: Alf Eaton <alf.eaton@overleaf.com>
Co-authored-by: Mathias Jakobsen <mathias.jakobsen@overleaf.com>
GitOrigin-RevId: 034343ee56b8d059090d8a5de74eaac24429b527
2025-03-24 10:46:15 +00:00
Miguel Serrano
89b4eaf391 Merge pull request #24130 from overleaf/msm-proxy-agent-learn
[web] Add `https-proxy-agent` for learn wiki

GitOrigin-RevId: 215f0f3ad5254b0620692c1cc4c90b50bdf1d4ef
2025-03-13 09:05:31 +00:00
Jessica Lawshe
f9515f10cd Merge pull request #24191 from overleaf/jel-latexqc-bootstrap
[latexqc] Remove `react-bootstrap` and upgrade to `bootstrap` 5

GitOrigin-RevId: 39d9a12121d34e3844a8e80a50bc6d3bc73c1808
2025-03-12 09:05:59 +00:00
Alf Eaton
a11266471c Merge pull request #22661 from overleaf/ae-remove-client-opentelemetry
Remove OpenTelemetry from the web frontend

GitOrigin-RevId: fc81052724afd7f62c44e17de3adffbb7c1a62c2
2025-03-12 09:05:13 +00:00
Rebeka Dekany
5974eed4aa Upgrade Storybook to 8.4.7 (#24144)
GitOrigin-RevId: df469e5d4123f0a4704a8670896ad29797f0f92b
2025-03-10 09:05:19 +00:00
Mathias Jakobsen
3a67124f90 Merge pull request #24026 from overleaf/ae-webpack-version
Ensure single webpack version

GitOrigin-RevId: 1a3c3af2d77967ad010a858404a9c6a87fe22bf3
2025-03-05 09:05:42 +00:00
Eric Mc Sween
1534731cdf Merge pull request #23902 from overleaf/em-upgrade-octokit
Upgrade octokit/request to 9.2.2 in github-sync

GitOrigin-RevId: de44a80b5aad50a982f706ab148e9a76f3004b00
2025-03-03 09:05:13 +00:00
Andrew Rumble
767591973c Merge pull request #23905 from overleaf/ar-mocha-11
[all] Bump mocha everywhere

GitOrigin-RevId: bf5587047f9ceb88872cbd356c2029717bb8ca9d
2025-02-28 09:05:40 +00:00
Brian Gough
763e5ba82c Merge pull request #23920 from overleaf/bg-backup-queue
initial history backup queue worker app

GitOrigin-RevId: e9647a2ec3caeb1fff843cead12164ba89fdb1f8
2025-02-28 09:04:46 +00:00
Antoine Clausse
08ee37afc1 Update to lockfile-version 3 (#23839)
`npm i --lockfile-version 3`

GitOrigin-RevId: ee5b547b2d7ddd3395f55825123af8a68bfbecd6
2025-02-26 09:05:11 +00:00
Eric Mc Sween
59fb97d874 Merge pull request #23819 from overleaf/em-find-projects
Rename find_dangling_comments script to check_docs and make improvements

GitOrigin-RevId: 3c81c734f4259c5939c190a886b5b90239d03017
2025-02-26 09:04:54 +00:00
Alf Eaton
a0eb8baf72 Upgrade dompurify (#23748)
GitOrigin-RevId: a2aa1c40a454f8ff487b5de15da39de577c6ff16
2025-02-24 09:05:44 +00:00
Alf Eaton
dd2c213ac5 Upgrade PDF.js to 4.10.38 (#23745)
GitOrigin-RevId: d7264acd7c1a8e64042be799efa4c7ca133e64f8
2025-02-24 09:05:23 +00:00
Miguel Serrano
2e72aa8a47 Merge pull request #23652 from overleaf/msm-update-path-to-regexp
[monorepo] Update express to 4.1.2

GitOrigin-RevId: b3db75257e1edc1a25a1a657def352ecca926920
2025-02-21 09:05:26 +00:00
Miguel Serrano
9a2a14f588 Merge pull request #23642 from overleaf/msm-update-cross-spawin
[monorepo] Updated cross-spawn to 7.0.6

GitOrigin-RevId: 42ca1ca19957a2cddd4968ceea276bc05f659071
2025-02-21 09:05:22 +00:00