Commit Graph

663 Commits

Author SHA1 Message Date
Andrew Rumble
e8c84a0c02 Add helpers and prepare for importing them
GitOrigin-RevId: 115c5ba3160a4cc3751ae26c232a85fed6b42baf
2025-09-24 08:05:33 +00:00
Jakob Ackermann
73cfd65f83 [web] switch storybook build to Jenkins (#28590)
* [web] add Jenkins pipeline for storybook

* [web] fix storybook build

* [terraform] dev-project: switch writer for storybook bucket to Jenkins

* [web] remove explicit dependency

* [terraform] dev-project: link service account

* [web] tweak storybook index.html

- explicitly sort entries
- remove index.html

* [packer] jenkins-worker: install m4

* [web] remove cloud build trigger for storybook

GitOrigin-RevId: a1aa70ee91644f876d95ae7bc6643b0a1ef59759
2025-09-22 08:05:28 +00:00
Jakob Ackermann
19b3ded887 [monorepo] run prettier on Jenkinsfiles (#28565)
* [monorepo] consolidate .editorconfig files at the root

* [monorepo] run prettier on Jenkinsfiles

* [saas-e2e] increase timeout for XeTeX compile

GitOrigin-RevId: 48aa82f7c81611899837753ae92c7732998d4ca5
2025-09-19 08:07:49 +00:00
Jakob Ackermann
b4277cdfc5 [monorepo] drop package-lock entry for the removed spelling service (#28566)
GitOrigin-RevId: fb12101366a726a3a630f095ebefcd208c3bc920
2025-09-19 08:07:07 +00:00
Andrew Rumble
9707e4ce0e Create new validation-tools library
GitOrigin-RevId: e3a19071d630022abe19b0cb67efb08149856019
2025-09-18 08:06:33 +00:00
Borja
4f53a19943 Writefull codebase migration (#27077)
GitOrigin-RevId: 48ff40d0b141d5bf7c70eaba8beacba7e64f237a
2025-09-18 08:05:57 +00:00
Miguel Serrano
3ef17cb1b6 Upgrade aws-sdk to v3 (re-attempt) (#28410)
* Upgrade `aws-sdk` to v3

Also vendored nodemailer-ses-transport

* Moved default region to CE settings

* Ensure timeout is added to `requestHandler` and `region` is populated

* fix unsigned header in signed URL request

The x-amz-acl header is not needed when using the signed request,
as ACL are already defined when creating the signed URL in
PutObjectCommand constructor.

* Add default AWS region for latexqc service

* remove unnecessary region in compose files

* Use AWS_REGION=us-west-2 for history-v1

* prevent retries uploading streams with PutObjectCommand

* Remove AWS SDK JS message suppression

GitOrigin-RevId: 6fda6f02160023ffed76143397bbd965f86a9509
2025-09-18 08:05:22 +00:00
Kristina
5d2e0651f0 Merge pull request #28270 from overleaf/kh-add-stripe-payment-context
[web] add stripe payment context

GitOrigin-RevId: 79dfbb1da0dd6b1d36c68c86debffc1edb169961
2025-09-16 08:05:45 +00:00
Antoine Clausse
cbffc68785 Update axios (#28490)
Used in contentful, slack webhook, tests:
```
$ npm ls axios

overleaf@ /overleaf
+-- @overleaf/saas-e2e@ -> ./tools/saas-e2e
| `-- mailtrap@3.4.0
|   `-- axios@1.12.2
`-- @overleaf/web@ -> ./services/web
  +-- @slack/webhook@7.0.2
  | `-- axios@1.12.2 deduped
  `-- contentful@10.8.5
    `-- axios@1.12.2 deduped
```

GitOrigin-RevId: d10cf9a5f7bc95ab61a578c383bde8181c7584f4
2025-09-16 08:04:55 +00:00
Andrew Rumble
08b0c869ab Convert to async/await
GitOrigin-RevId: 45c139a64c848650f1f51e64e8ebd233211241fb
2025-09-12 08:07:30 +00:00
Andrew Rumble
579483588a Switch to using vitest for tests
GitOrigin-RevId: 0e448010848011883f8843b6d3280e767cea932e
2025-09-12 08:07:25 +00:00
Antoine Clausse
9c3fcb42f7 Remove outdated overrides (sha.js, form-data) (#28258)
* Update `isomorphic-git` and remove `sha.js` overrides

It was fixed in https://github.com/isomorphic-git/isomorphic-git/pull/2190

* `bin/npm update @cypress/request` and remove override

Bumps `form-data` to `~4.0.4` which is safe per https://github.com/overleaf/internal/security/dependabot/1533

Now it has the safe versions (2.5.5 and 4.0.4):
```
$ npm ls form-data

overleaf@ /Users/aclausse/Code/internal
├─┬ @overleaf/analytics@ -> ./services/analytics
│ └─┬ request@2.88.2 overridden
│   └── form-data@2.5.5 overridden
├─┬ @overleaf/fetch-utils@0.1.0 -> ./libraries/fetch-utils
│ └─┬ @types/node-fetch@2.6.11
│   └── form-data@4.0.4 overridden
├─┬ @overleaf/metrics@4.2.0 -> ./libraries/metrics
│ └─┬ @google-cloud/profiler@6.0.3
│   └─┬ @google-cloud/common@5.0.2
│     └─┬ retry-request@7.0.2 overridden
│       └─┬ @types/request@2.48.12 overridden
│         └── form-data@2.5.5 overridden
├─┬ @overleaf/saas-e2e@ -> ./tools/saas-e2e
│ └─┬ mailtrap@3.4.0
│   └─┬ axios@1.8.4
│     └── form-data@4.0.4 deduped
├─┬ @overleaf/tpdsworker@ -> ./services/tpdsworker
│ └─┬ chai-http@4.4.0
│   └─┬ superagent@8.1.2
│     └── form-data@4.0.4 deduped
├─┬ @overleaf/web@ -> ./services/web
│ └─┬ jsdom@19.0.0
│   └── form-data@4.0.4 deduped
├─┬ latexqc@0.0.1 -> ./services/latexqc
│ └─┬ vitest@3.1.2
│   └─┬ jsdom@20.0.3
│     └── form-data@4.0.4 deduped
└─┬ overleaf-editor@1.0.0 -> ./services/history-v1
  └─┬ swagger-tools@0.10.4 overridden
    ├─┬ json-refs@3.0.15
    │ └─┬ path-loader@1.0.12
    │   └─┬ superagent@7.1.6 overridden
    │     └── form-data@4.0.4 deduped
    └─┬ superagent@3.8.3 overridden
      └── form-data@2.5.5 overridden
```

* `bin/npm update @types/request` and remove override

Bumps `form-data` to `2.5.5` which is safe per https://github.com/overleaf/internal/security/dependabot/1537

* Remove `form-data` overrides that aren't necessary

```
$ npm ls form-data

overleaf@ /Users/aclausse/Code/internal
├─┬ @overleaf/analytics@ -> ./services/analytics
│ └─┬ request@2.88.2 overridden
│   └── form-data@2.5.5 invalid: "~2.3.2" from node_modules/request
├─┬ @overleaf/fetch-utils@0.1.0 -> ./libraries/fetch-utils
│ └─┬ @types/node-fetch@2.6.11
│   └── form-data@4.0.4
├─┬ @overleaf/metrics@4.2.0 -> ./libraries/metrics
│ └─┬ @google-cloud/profiler@6.0.3
│   └─┬ @google-cloud/common@5.0.2
│     └─┬ retry-request@7.0.2
│       └─┬ @types/request@2.48.13
│         └── form-data@2.5.5
├─┬ @overleaf/saas-e2e@ -> ./tools/saas-e2e
│ ├─┬ cypress@13.13.2
│ │ └─┬ @cypress/request@3.0.9
│ │   └── form-data@4.0.4 deduped
│ └─┬ mailtrap@3.4.0
│   └─┬ axios@1.8.4
│     └── form-data@4.0.4 deduped
├─┬ @overleaf/tpdsworker@ -> ./services/tpdsworker
│ └─┬ chai-http@4.4.0
│   └─┬ superagent@8.1.2
│     └── form-data@4.0.4 deduped
├─┬ @overleaf/web@ -> ./services/web
│ └─┬ jsdom@19.0.0
│   └── form-data@4.0.4 deduped
├─┬ latexqc@0.0.1 -> ./services/latexqc
│ └─┬ vitest@3.1.2
│   └─┬ jsdom@20.0.3
│     └── form-data@4.0.4 deduped
└─┬ overleaf-editor@1.0.0 -> ./services/history-v1
  └─┬ swagger-tools@0.10.4 overridden
    ├─┬ json-refs@3.0.15
    │ └─┬ path-loader@1.0.12
    │   └─┬ superagent@7.1.6
    │     └── form-data@4.0.4 deduped
    └─┬ superagent@3.8.3
      └── form-data@2.5.5
```

* Remove 2025-08-07-form-data-cypress.json

* Reapply the form-data override in request@2.88.2

GitOrigin-RevId: 89143de1a53226dc43fc474db443fc7d7698908a
2025-09-05 08:05:17 +00:00
Andrew Rumble
9082c0691b Merge pull request #27050 from overleaf/renovate-definitelytyped
[Platform] Update definitelyTyped

GitOrigin-RevId: 8ef840733942a909af6e6b1fee3e3fc01e0dc61d
2025-09-04 08:04:53 +00:00
Eric Mc Sween
eab890748c Install zod and zod-validation-error in web
GitOrigin-RevId: a696409862acfe064ccf0a528ed8f83b7150a8e0
2025-08-29 08:05:29 +00:00
Miguel Serrano
208b7ccde9 Revert "Merge pull request #27679 from overleaf/msm-aws-sdk-upgrade" (#28151)
This reverts commit 4989ae920d8b7fd9e79623947b7c40bcc2e56d92.

GitOrigin-RevId: 541d95bfeaa7ce820e8af67f646f013fe4fe5d21
2025-08-28 08:05:52 +00:00
Miguel Serrano
0fa25c54dd Merge pull request #27679 from overleaf/msm-aws-sdk-upgrade
Upgrade `aws-sdk` to v3

GitOrigin-RevId: 4989ae920d8b7fd9e79623947b7c40bcc2e56d92
2025-08-28 08:05:36 +00:00
Eric Mc Sween
9d28da72a5 Merge pull request #28019 from overleaf/em-dsmp-comment-event
DS mobile notification for comment added/replied to

GitOrigin-RevId: 602983c679ed415bf8dd8fbf83b328e5ee832e2b
2025-08-26 08:05:20 +00:00
Eric Mc Sween
df1be93ec3 Merge pull request #27936 from overleaf/em-unit-tests-mongo
Make Mongo available to unit tests in all services

GitOrigin-RevId: b65bbb69883d5bba31d09802b89f35bdc523fe4d
2025-08-25 08:05:19 +00:00
renovate[bot]
d4149fc110 [Platform] Update dependency isomorphic-git to ^1.33.0 from ^1.25.10 (#28073)
* [Platform] Update dependency isomorphic-git to ^1.33.0 from ^1.25.10

* Override sha.js version

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Andrew Rumble <andrew.rumble@overleaf.com>
GitOrigin-RevId: 56bf1ef4b6fa7043ea3609e46a21c36a651905b0
2025-08-22 08:06:11 +00:00
roo hutton
2ba5af5cc1 Merge pull request #27895 from overleaf/rh-b2c-js-tsx-canceled
Migrate B2C jsx to tsx: algolia-search and subscriptions

GitOrigin-RevId: 917036ce6baf8130d2b10b46efa649f015b84576
2025-08-21 08:05:28 +00:00
Rebeka Dekany
8acb7af2b9 Create Storybook guideline and add addon-designs to embed Figma (#27310)
* Add foundations and migrations docs

* Add storybook/addon-designs version 8.2.1

* Test Figma link

* Refactor Modal stories

* Create figmaDesignUrl

* Create foundations

* Create feature flags docs

* Create Storybook builds docs

* Add storybook/addon-designs version 8.2.1

* Test Figma link

* Add an example of Story with split-tests within the Storybook guidelines (#27260)

* Add FormatCurrency demo in feature-flags.mdx

* Add syntax highlight to code samples

* Update stories with figmaDesignUrl

* Figma access token

* Use OLButton

* Hide control for children and footer

* Add primitive colors

* Use useSplitTest instead

* Update cloud builds docs with `storybook-push-trigger`

* Make Foundations the default story

---------

Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com>
GitOrigin-RevId: 0729759803f190d89cf543d087eea86265b725f1
2025-08-13 08:06:22 +00:00
Brian Gough
1f83fdc3cb Merge pull request #27702 from overleaf/bg-update-form-data-in-cypress
update form-data in cypress

GitOrigin-RevId: 90b48e5c77420e83ce1b0ff7dbe25b3e4a3a87ad
2025-08-08 08:07:42 +00:00
Rebeka Dekany
d51fb8a27c Remove Bootstrap version 3 (#27420)
* Remove bootstrap-3 entrypoint

* Rename bootstrap-5 entrypoint to bootstrap

* Restore entrypoints

* Remove `bootstrap-5` and `bootstrap-3` entrypoints and a single `bootstrap.ts` file is now the default entrypoint

* Update `bootstrap-5` component imports to `bootstrap`

* Update `bootstrap-5` CSS imports to `bootstrap`

* Remove the `isBootstrap5` utility

* Remove `bootstrapVersion`

* Remove `ol-bootstrapVersion`

* Remove getCssThemeModifier

* Update path and rename

* Source format

* Remove Bootstrap v3 and Bootstrap v5 alias npm packages

* Remove bootstrap argument

* Remove unused files

* Update with the latest split tests

* Remove remaining bootstrap5PageStatus

* Update path

GitOrigin-RevId: 7acda2f80114d2de8699e1f06729a2a29218e284
2025-08-08 08:06:00 +00:00
Rebeka Dekany
23fc3ff0fb Remove LESS stylesheets and dependencies (#27409)
* Remove components, core and modules LESS stylesheets

* Remove variables LESS stylesheets

* Remove app LESS stylesheets

* Remove github-sync, onboarding LESS stylesheets

* Remove main-light and IEEE LESS stylesheets

* Remove Less loader configuration

* Remove bootstrap-3 entrypoint

* Rename bootstrap-5 entrypoint to bootstrap

* Remove bootstrap-5 CSS folder and move stylesheets

* Update CSS variables

* Restore and update github-sync.scss path

* Fix try-premium.scss path and fix undefined mixin error

* Restore entrypoints

* Simplify buildCssPath to always use main-style.css

* Remove less from prettier formatting scripts

* Remove less from addHook extension

* Source format

* Remove nvd3 file reference from prettierignore (equivalent of nvd3.scss)

* Remove less and less-loader

* Add SCSS files to pirates require hook

GitOrigin-RevId: bd83c79f4d6ef7305d75993959a4dc5e7714ef9c
2025-08-06 08:05:38 +00:00
Jakob Ackermann
b1c876745f [saas-e2e] add jenkins integration (#27587)
GitOrigin-RevId: a07b33b748964487a066d308577cad9debaa92b2
2025-08-05 08:05:50 +00:00
Mathias Jakobsen
491b626b64 Merge pull request #27584 from overleaf/mj-reuse-indentation-marker-theme
[web] Update indentation markers extension

GitOrigin-RevId: 8ae6a877533423bbfa37a9bb2a1610cef7ed0e87
2025-08-05 08:05:24 +00:00
Brian Gough
13f45d23ee Merge pull request #27519 from overleaf/bg-upgrade-form-data-in-monorepo
security update for form-data

GitOrigin-RevId: f25f74b9ca51e978c0a1d0aba70ec7f09d8b1c66
2025-08-04 08:05:20 +00:00
M Fahru
6f2c026aac Merge pull request #27533 from overleaf/mf-change-billing-mode-to-flexible-stripe
[web] Use flexible billing_mode for every new Stripe subscription

GitOrigin-RevId: 827b6e4802ff1d1dd92519bc949717c7d42c59cb
2025-08-01 08:07:06 +00:00
Andrew Rumble
b69f6e752b Install regular version of multer instead of fork
GitOrigin-RevId: a763b595edf68d8c4ce80c00ed9d60259e4a93f0
2025-07-29 08:06:16 +00:00
Jakob Ackermann
65d9efddab Merge pull request #27428 from overleaf/jel-passport-saml-5-patch
[web] Upgrade to passport-saml 5.1.0

GitOrigin-RevId: 6073047a92da55a61fd2d409775d401aba13bb7e
2025-07-28 08:05:25 +00:00
Jakob Ackermann
e39e990844 Merge pull request #25479 from overleaf/msm-passport-saml-5
[web] Update `passport-saml` to `v5.0.1`

GitOrigin-RevId: 9e154d3f7ef78d37a151e863ce86bfc2f8d85956
2025-07-28 08:05:20 +00:00
Andrew Rumble
d830b39fba Make sure multer is installed
GitOrigin-RevId: 2a1eac69ead9a24680a08663c7f02eca1f395c80
2025-07-23 08:06:04 +00:00
renovate[bot]
af348ac63d Update dependency multer to v2.0.2 [SECURITY]
GitOrigin-RevId: d84b9493102b1b0753aa0002f1c7e29ba697f02b
2025-07-23 08:05:59 +00:00
Jakob Ackermann
35a9de2cac [monorepo] upgrade tough-cookie in request to latest version (#27249)
GitOrigin-RevId: 9096e05d2c337c3d3a9b4ca6efec8fd40c51a622
2025-07-22 08:07:08 +00:00
Andrew Rumble
c8c8928bd2 Run npm install with new npm version
Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 8d81e73f528c34ad8df8b09716198dbaeebee23f
2025-07-18 08:05:33 +00:00
Jakob Ackermann
812a2704fa [clsi-cache] meter ingress and egress bandwidth (#27143)
* [mics] fix "app" label in clsi-cache metrics in dev-env

* [clsi-cache] validate filePath when processing file

* [clsi-cache] meter ingress and egress bandwidth

Files are downloaded directly from nginx, hence we cannot meter egress
in clsi-cache easily.

GitOrigin-RevId: 24de8c41728f0e9c984113c1470dec6153e75f20
2025-07-16 08:05:59 +00:00
Andrew Rumble
bb0c31073c Update package-lock file
This step is required as renovate is not able to generate a lockfile
itself

GitOrigin-RevId: d5fcdc4a98b24c6fb5662ef77dac6a1cf47589c2
2025-07-09 08:05:31 +00:00
renovate[bot]
b64a5152dc Update linters
GitOrigin-RevId: e6ce5461881abe515f57b9b066bb81c194f80e53
2025-07-09 08:05:22 +00:00
Andrew Rumble
7de25354b8 Switch eslint-plugin-n for eslint-plugin-node
GitOrigin-RevId: eec3cf3836556a5c035b1339548c724ab3cd0c43
2025-07-04 08:04:56 +00:00
Andrew Rumble
0008eca842 Remove @types/workerpool
This is a stub

GitOrigin-RevId: de776c11044c42bb191424f1d614442da22c3197
2025-07-04 08:04:51 +00:00
Andrew Rumble
b150712a34 Remove @types/react-bootstrap
GitOrigin-RevId: 0a410b82540b2b11bc4930753dbd650937ebba1e
2025-07-04 08:04:46 +00:00
Alf Eaton
d542118906 Upgrade TypeScript to 5.8.3 (#24900)
GitOrigin-RevId: 80937de3dde14e21e02af2ecb93350b1fedafc82
2025-07-03 08:05:57 +00:00
Andrew Rumble
ee78112430 Upgrade cross-env
The breaking changes here are just for node version for the most part.
The one other breaking change has a workaround and shouldn't affect us
anyway.

GitOrigin-RevId: beb192a38cfc04f6b321e5ab44770a9a64110c30
2025-07-01 08:05:48 +00:00
Antoine Clausse
e6c64dfd77 [web] Add window. prefix to globals and add no-restricted-globals rule (#26422)
* Add `no-restricted-globals` eslint rule

Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>

* Change `self` to `window.self`

* Change `innerWidth` to `window.innerWidth`

* Change `confirm` to `window.confirm`

* Change `location` to `window.location`

* Use `location` from `useLocation` hook

* Use location from useLocation hook
Co-authored-by: Antoine <antoine.clausse@overleaf.com>

* Disable no-restricted-globals eslint rule for use of 'self'

* Use `confusing-browser-globals` from npm

* Prevent unexpected globals in workers, using `no-undef`

* Use `self` as a global in workers

* Use unexpected globals in workers, using `no-restricted-globals` in workers

---------

Co-authored-by: Rebeka <rebeka.dekany@overleaf.com>
Co-authored-by: Rebeka <o.dekany@gmail.com>
GitOrigin-RevId: 526986799f5f2edf53c7d978fa85c1e98189565f
2025-06-24 08:05:10 +00:00
Rebeka Dekany
c6f8f4bec6 Prettier for PUG templates (#26170)
* Setup prettier

* Ignore these pug templates by prettier

* Fix typo

* Fix prettier error

* Add prettier-ignore for quoting of event-segmentation attribute

* Manual tab indentation

* Interpolate

* Remove unbuffered if conditional

* Inline event-segmentation objects and remove prettier-ignore rule

* Fix spacing before interpolation

* Source format

* Source format

GitOrigin-RevId: c30e037f5caf8f91efc1bd9e75f81ae533b5a506
2025-06-24 08:05:06 +00:00
Eric Mc Sween
5dfa4d6a46 Merge pull request #26353 from overleaf/bg-history-redis-extend-persist-worker
extend persist worker to make parallel requests

GitOrigin-RevId: 8def7d5a8b5c9fcbe5fe45ac8f3ace503d31877a
2025-06-17 08:05:55 +00:00
Jakob Ackermann
34e948a12b [project-history] add metrics for compression of updates (#26307)
* [project-history] add metrics for compression of updates

* [project-history] sample compression metrics

GitOrigin-RevId: 1cd67dc4ec7b44285afb436c62392b464f007f97
2025-06-16 08:06:28 +00:00
Jakob Ackermann
a1ec4d8307 [docstore] finish async/await migration (#26295)
* [docstore] DocManager.getDocLines returns flat content

* [docstore] peekDoc throws NotFoundError, skip check in HttpController

* [docstore] getFullDoc throws NotFoundError, skip check in HttpController

* [docstore] migrate HealthChecker to async/await

* [docstore] migrate HttpController to async/await

* [docstore] remove .promises/callbackify wrapper from all the modules

GitOrigin-RevId: a9938b03cdd2b5e80c2c999039e8f63b20d59dc5
2025-06-11 08:07:20 +00:00
Miguel Serrano
71bf86a152 Merge pull request #26218 from overleaf/msm-bump-tar-fs-multer
[clsi/web/history-v1] Bump `tar-fs` and `multer`

GitOrigin-RevId: c76b964224c8367d68dc1190ff29627cc6919ade
2025-06-10 08:06:05 +00:00
Kristina
2f8749b7f0 [web] handle 3DS challenges for Stripe (#25918)
* handle 3DS challenges on the subscription dashboard
* add `/user/subscription/sync` endpoint
* upgrade `stripe-js` & rm `react-stripe-js`
* group related unit tests together
* add modules `SubscriptionController` unit tests and convert to async/await
* add `StripeClient` unit tests for 3DS failure

GitOrigin-RevId: 9da4758703f6ef4ec08248b328abddbbdd8e44ad
2025-06-02 08:05:16 +00:00