Commit Graph

593 Commits

Author SHA1 Message Date
Domagoj Kriskovic
6e2f999a11 Fix import from CollaboratorsHandler.js to CollaboratorsHandler.mjs (#29863)
GitOrigin-RevId: 35f7fd558a127c094b65104e0775c67dca4f96f6
2025-11-25 09:05:18 +00:00
David
dd8451d51d Create script to update track changes stored format for all users (#26876)
* Create script to update track changes stored format for all users

* Create script to update track changes stored format for all users

* Dont remove guests

* Fix typo

* fix updateOne

---------

Co-authored-by: Domagoj Kriskovic <dom.kriskovic@overleaf.com>
GitOrigin-RevId: c2fddc46b78e84807243a752facdf0215d3ff082
2025-11-25 09:05:14 +00:00
Andrew Rumble
beb6f6d484 Merge pull request #29597 from overleaf/ar-last-features-esm-conversion
[web] last features esm conversion

GitOrigin-RevId: a35ab995bf654f1cdfe0e0062d8806761ecccf2d
2025-11-21 09:05:36 +00:00
Andrew Rumble
cc1eb9b6e5 Cleanup direct usages of docHistoryIndex
GitOrigin-RevId: 9de5cffae3e7be053af73013ea5ac0ee8202fc54
2025-11-18 09:05:45 +00:00
Antoine Clausse
1447842fbd Remove scripts about unconfirmed emails removal (#29683)
* Remove unconfirmed email deletion scripts

* Remove tests

GitOrigin-RevId: a0ef84207fced135a13074265fe5d3b38400d76f
2025-11-18 09:05:29 +00:00
Andrew Rumble
394c60f2cf Merge pull request #29659 from overleaf/revert-29656-revert-29521-ar-models-es-conversion
Revert "Revert "[web] Convert models and self-referential test files to ESM ""

GitOrigin-RevId: f64000ae31d298b075a8722dfc51f294c71bc021
2025-11-18 09:04:56 +00:00
Andrew Rumble
ae6dec9dcb Merge pull request #29656 from overleaf/revert-29521-ar-models-es-conversion
Revert "[web] Convert models and self-referential test files to ESM "

GitOrigin-RevId: 5455cccbb513bd9ca36ce526ff1553065f83d233
2025-11-13 09:06:36 +00:00
Andrew Rumble
7c9fea64ac [web] Convert models and self-referential test files to ESM (#29521)
from overleaf/ar-models-es-conversion

GitOrigin-RevId: a92ab8342c0f3e23155eacc0570458fc910c3d71
2025-11-13 09:06:13 +00:00
Antoine Clausse
f2788868ac [web] Create script to re-add wrongly deleted emails (#29550)
* Allow passing auditLog extra info in addEmailAddress

* Create script re_add_deleted_emails.mjs

* Check email validity when parsing the CSV

* Allow no IP and initiator for the log events

* Add an acceptance test on re_add_deleted_emails

* Fix remove_unconfirmed_emails.mjs

We're not planning to run this again, but this could help if some code from here ever gets copy-pasted

* Fix remove_unconfirmed_emails.mjs

Rename `emailsToRemove` to `emailsToRemoveCandidates`

* Remove console.logs of event logs:

That's unnecessary complexity and we already have the data from the previous script

* Copy `addEmailAddress` into the script

* Handle primary emails correctly

* Ignore a TS error

* Fix async function in createUsers (tests)

* Add assertion for already in use emails in ReAddDeletedEmailsTests

* Add information in admin-panel for add-email audit logs

GitOrigin-RevId: f8480426d7b323f88a268874488d9ae641bc6045
2025-11-07 09:05:17 +00:00
Andrew Rumble
f5eb8e9ba4 Update paths
GitOrigin-RevId: 5bc9bccf2cd10631cb88412f426a8e3c73c9f689
2025-11-06 09:07:09 +00:00
Antoine Clausse
25993cb858 [web] Add script to check for wrongly removed confirmed emails (#29532)
* [web] Add script to check for wrongly removed confirmed emails

* List emails that were added again

* Use `trackProgress`

* Prettier logs

* Add `READ_PREFERENCE_SECONDARY`

* Check `change-primary-email`

* Add check with `confirm-email` should be always empty, but let's check

* Update services/web/scripts/check_removed_emails.mjs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
GitOrigin-RevId: 4f83d69cffd0aec2c5d1201f1f6130eacdbb2e39
2025-11-06 09:06:42 +00:00
Andrew Rumble
4f02a85aa4 Update paths
GitOrigin-RevId: 399c594dd1bbf739d91874df6be3b70e57fe01e3
2025-11-06 09:05:57 +00:00
Andrew Rumble
e8c829deab Clean up direct usages of db.docHistory
Co-authored-by: Ilkin Ismailov <ilkin.ismailov@overleaf.com>
GitOrigin-RevId: 63bc36f15d85f68770bbbff5a7f64d5bc167c7f0
2025-10-30 09:07:18 +00:00
Andrew Rumble
ddb037680b Switch to using Zod instead of Joi
GitOrigin-RevId: d725d5bd573402f48b176733bcea2d8ba4fa7c2d
2025-10-30 09:06:54 +00:00
Andrew Rumble
f02f6475ac Update paths
GitOrigin-RevId: a9474c8f36e8b287de4dd8fda29bc082001444ac
2025-10-23 08:06:10 +00:00
Antoine Clausse
678cef1fa6 Remove migration folder from APP_CODE_PATH in esm-check-migration.mjs
See https://github.com/overleaf/internal/pull/28306

GitOrigin-RevId: db5f7a9362151b55c5c409ebe896534ad8e73cc6
2025-10-21 08:06:01 +00:00
Andrew Rumble
43f6f10d85 Handle files that can't be converted and files with unexpected extension
GitOrigin-RevId: 48a71b5a5fcfd6747692df02178e6aced5882b7a
2025-10-21 08:05:56 +00:00
Andrew Rumble
e909995ce0 Rename features files
GitOrigin-RevId: fc4ce037343b02d002fa07b7cdc283f2d7d4f89b
2025-10-21 08:05:47 +00:00
Andrew Rumble
7de4133d08 Convert to ES modules
GitOrigin-RevId: ec8d55634306caa6a013daa4dc0ce0a3ffbcc3f0
2025-10-21 08:05:42 +00:00
Andrew Rumble
bdf47f7a78 Rename files
GitOrigin-RevId: 5308845fa2a76342dc395ee4d4fcc94cdf03cb3b
2025-10-21 08:05:37 +00:00
Domagoj Kriskovic
48a3d6a10a Function for processing notification queue (#29072)
* Function for processing notification queue

* update collection name

GitOrigin-RevId: 5de5d1d056acee4257fcdc930ad995345f5e0367
2025-10-20 08:05:25 +00:00
Antoine Clausse
d7e1ad5588 Merge pull request #28981 from overleaf/ac-some-web-esm-migration-6
[web] Convert some Features/User files to ES modules

GitOrigin-RevId: c0d487082fa4822c68130e1e98c043297d4bedeb
2025-10-17 08:05:53 +00:00
Brian Gough
729e0f5ac9 move migrations to shared location (#28306)
* fix: correct typedef for Document in helpers.mjs

* add move-migrations codemod

* update migration paths to use shared migrations directory

* move migrations to shared location

* fix: update Dockerfile and docker-compose.ci.yml to include migrations directory

* feat: add migrations tool to workspaces in package.json

* [monorepo] Fix order of docker ignore rules

* [web] remove unused docker ignore file

* [monorepo] replace old references to migrations folder

* [server-ce] copy migrations from new place

* [migrations] Inline web scripts

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

* [migrations] move three web scripts over

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

* [migrations] add missing collection

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

* [migrations] remove lodash dependency

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

* [migrations] avoid mongodb-legacy dependency

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

* [monorepo] run migrations from tools/migrations

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

* [migrations] simplify migration for adding gitBridge feature to users

* [monorepo] run migrations from tests in all the services

* [migrations] add Jenkins pipeline for linting/formatting

* [monorepo] fixup running web migrations everywhere

* [monorepo] trigger Jenkins builds on changes to mongo migrations

* [migrations] add Jenkins pipeline for linting/formatting

* [monorepo] build scripts: update devDependencies before deps scanning

* [monorepo] build scripts: formerly depend on tools/migrations

* [monorepo] run eslint on .mjs files

* [migrations] enable more eslint rules and fix all the errors

* [rake] fix migrations:list task

---------

Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com>
GitOrigin-RevId: 14cf69cc1b9405bbc75adbb9a000e555500e0614
2025-10-16 08:07:37 +00:00
Jimmy Domagala-Tang
fc24f36089 adding script to remove the stale wf oauth tokens (#28786)
GitOrigin-RevId: a4bd36a23867bf8d2273fa397426830c87ab47a2
2025-10-15 08:07:29 +00:00
Liangjun Song
b03b1e3bfc Fetch all the subscriptions when backfilling user ids (#29005)
GitOrigin-RevId: 07c091176e50cad250e6bb4dea94fa3424643fd2
2025-10-14 08:05:33 +00:00
Andrew Rumble
3211c7c37a Make test admin users engineers
GitOrigin-RevId: 627b5b05eefdfa675937764b7c798e99ab6ef37e
2025-10-09 08:07:48 +00:00
Liangjun Song
f582a77de0 Merge pull request #28470 from overleaf/ls-script-to-migration-user-id-metadata
Add scripts to migrate userId metadata

GitOrigin-RevId: 2365afd7a6772f147d2a3eb2f3e033cab3a4e7dd
2025-09-29 08:05:52 +00:00
Jimmy Domagala-Tang
07166bff73 feat: add in-editor notification when rolling image has updated (#28529)
GitOrigin-RevId: 771773ba1914ef609b6ac84799bdda2d7ae4affa
2025-09-25 08:05:39 +00:00
Eric Mc Sween
72436948eb Migrate recurly backfill to zod
GitOrigin-RevId: 2241177c7ca614487f7735235c132d4d8fc759cc
2025-09-23 08:06:44 +00:00
Antoine Clausse
71f0b28a84 [web] Convert some Features files to ES modules (part 3) (#28494)
* Rename files to mjs

* Rename test files to mjs

* Update CODEOWNERS

* Update files to ESM

* Update test files to ESM

* Update RestoreManager.test.mjs

* Remove unused `AdminAuthorizationHelper` mock and stub

* Remove unnecessary return

GitOrigin-RevId: 2b9ef126de1d8964afbc6e5641cca36712655866
2025-09-17 08:05:02 +00:00
Antoine Clausse
723954ccc2 [web] Convert some Features files to ES modules (part 2) (#28275)
* Rename files

* Rename test files

* Convert to ESM

GitOrigin-RevId: b0ee442ac8edd4ef3695f93a91ffd9521e6bf259
2025-09-16 08:04:59 +00:00
Olzhas Askar
8710225ba5 Merge pull request #28481 from overleaf/oa-access-secondary-mongo
[web] Prefer secondary Mongo for get emails script

GitOrigin-RevId: 84cf1d23b056a4d4a738f1783059d2309997d912
2025-09-15 08:05:51 +00:00
Olzhas Askar
4712a2d541 [web] Back to school user extraction script (#28416)
* fix: the script was not exiting when no users were found

* feat: scaffold a new script

* fix: make the script actually runnable

* refactor: exit at the same place

* feat: filter out subscriptions and without subscriptions

* fix: filter out groupies

* feat: from IDs to emails

docs: fix wording

refactor: will not need this script anymore

fix: don't use concurrency

feat: add id files

fix: remove the data files

fix: this indeed works!

* fix: review comments

* fix: prettier complaints

GitOrigin-RevId: 839ca850ff0df6972afafbfc25d4b89c10284dc6
2025-09-15 08:05:47 +00:00
Andrew Rumble
27ac8ba70e Rename files
GitOrigin-RevId: cd89001ff0a7768c5b547a27d57861e5ba3aac0d
2025-09-09 08:06:36 +00:00
Tim Down
5375d3967b Merge pull request #28199 from overleaf/td-ar-script-runner-lint
Add ESLint rule to require Script Runner for scripts in web

GitOrigin-RevId: 94d5dac806e4c5480b7ed95cf8484a2d13ac8294
2025-09-05 08:05:25 +00:00
Andrew Rumble
ca4a515ce5 Run hashed emails backfill in analytics
This allows us to insert direct to BigQuery

GitOrigin-RevId: 6584c80aeadea64e6626777367e140ed2459fd50
2025-09-03 08:05:59 +00:00
Andrew Rumble
9c8033fd34 Add script for backfilling hashed emails
GitOrigin-RevId: a4eb25ed4db8519bfab8360e9dd50bbfcf4313ae
2025-09-03 08:05:50 +00:00
Jakob Ackermann
bd4130c147 [filestore] remove user files endpoints (#28125)
* [filestore] remove user files endpoints

* [web] remove user files integration for filestore

GitOrigin-RevId: 565fa68a659c07420ee6141d0f276b4e4d2972e0
2025-09-02 08:04:52 +00:00
Liangjun Song
3adf77994b Merge pull request #28071 from overleaf/ls-add-logic-to-sync-ol-to-stripe-subscription-mapping
Add logic to sync INT_account_mapping and backfill script

GitOrigin-RevId: 585a3945e6f238ca345c639218ef8bd3d588a31f
2025-08-28 08:06:37 +00:00
Brian Gough
f3671586e7 Merge pull request #28124 from overleaf/bg-fix-form-data-dependabot-alert
fix form-data dependabot alert

GitOrigin-RevId: a68aebb88fbabdaf1983f067c70c7459e1ddb2a6
2025-08-28 08:05:17 +00:00
roo hutton
31bfb82d72 Merge pull request #27849 from overleaf/rh-day-one-churn-extract
Extract users who churned after first day

GitOrigin-RevId: 2bcbee177926c262e8c0d71f1861945842b35db6
2025-08-25 08:05:33 +00:00
Andrew Rumble
6190005f9b [monorepo] Upgrade to node 22.18.0 (#27977)
* Upgrade to node 22.18.0

* Switch projects-data fixture to strip-types compatible form

GitOrigin-RevId: 4a7ec56f4a82395d2be8870526df0c679de38ab5
2025-08-22 08:05:17 +00:00
Jakob Ackermann
d697f00525 [web] reduce log noise in CI (#27961)
* [web] reduce noise from CollectPayPalPastDueInvoiceTest

* [web] reduce noise for frontend tests that use Range.getClientRects

* [web] avoid nesting <li> elements in ProjectToolsMoreDropdownButton

RenameProjectMenuItem/CopyProjectMenuItem will return <li> elements.

* [web] avoid clicking on links that navigate away in JSDom

* [web] add mock for location change in JSDom

* [web] add fallback stripe subscription data for test

3.8k lines of log noise!

GitOrigin-RevId: 7adab182487a6c07ac9809c60802e498a0edb0ec
2025-08-19 08:05:50 +00:00
Antoine Clausse
0e6d5dc368 Add utility for converting CIDR ranges to IP ranges (#26904)
* Add utility for converting CIDR ranges to IP ranges

* Add CLI support for IP matcher ranges script

GitOrigin-RevId: 1432bf3efa269c0e8e9d58fce1575bb01d694b2f
2025-08-19 08:05:22 +00:00
Antoine Clausse
ec98e68cab [saas-e2e] Delete user subscriptions in e2e tests setup (#27867)
Address errors caused by https://github.com/overleaf/internal/pull/27746

GitOrigin-RevId: 461ea586622999f8680f3f5eddcae71ffb6642c7
2025-08-14 08:05:51 +00:00
Brian Gough
9e7e011427 Merge pull request #27727 from overleaf/bg-convert-translation-packages-to-dev-dependencies
move dependencies to devDependencies in translations package.json

GitOrigin-RevId: 4c7b058d3dc9028e72eeec531b615bee9adc6ab7
2025-08-12 08:05:57 +00:00
Jimmy Domagala-Tang
d7b282c176 removing split test and enforcing WF account creation as winning variant (#26920)
GitOrigin-RevId: 49d801004a6fced936214e5c08b82284ab771e72
2025-08-06 08:05:30 +00:00
Jakob Ackermann
eed93af1fd Merge pull request #27579 from overleaf/jpa-saas-e2e-split
[saas-e2e] prepare for running in Jenkins

GitOrigin-RevId: 4d87d8a548849c193c5263a3b4f01202876f43a3
2025-08-04 08:05:08 +00:00
Liangjun Song
4d0f14898d Merge pull request #27518 from overleaf/tm-revert-scriptrunner-ensured-secondary
Remove ScriptRunner usage in institution user checks and SSO ID migration scripts

GitOrigin-RevId: 69bf575f879516e8daeb068f6911856c9d6f226c
2025-07-31 08:05:37 +00:00
Jakob Ackermann
1fd4445a34 [history-v1] extend --report with number of files to check/missing (#27397)
* [history-v1] put logs of back_fill_file_hash script in /var/log/overleaf

* [history-v1] do not leave tmp dir behind when using --report

* [history-v1] extend --report with number of files to check/missing

* [history-v1] move all the options into command line flags

Change default values:
- concurrency to 10
- concurrent batches to 1
- stream high water mark to 1MiB

* [web] find_malformed_filetrees: log progress on stderr

* [history-v1] fix percentage of projects that need back-filling

GitOrigin-RevId: ebd7889840f97b24eda43774ffe7524998fb634b
2025-07-30 08:07:12 +00:00