Commit graph

63 commits

Author SHA1 Message Date
Mathias Jakobsen
654d96ace6 Merge pull request #19743 from overleaf/mj-restore-project
[web+project-history] Add project version reverting

GitOrigin-RevId: 0f77cec730393187d531c0c6561faaa652bebf29
2024-08-21 08:05:08 +00:00
Eric Mc Sween
97b62e01f8 Merge pull request #19851 from overleaf/em-user-content-logging
Avoid logging user content when errors occur in history

GitOrigin-RevId: 0326065a15dfc30155847100bb5a077efea771b5
2024-08-12 08:04:59 +00:00
Jakob Ackermann
3836323724 Merge pull request #19817 from overleaf/jpa-types
[overleaf-editor-core] stronger type checking via web

GitOrigin-RevId: 427019f40e2905f2e0ec11dc09f5fccdbb1f905b
2024-08-08 08:05:01 +00:00
Jakob Ackermann
e26b6de51b Merge pull request #19740 from overleaf/jpa-linked-file-metadata
[misc] persist linkedFileData in full project history as file metadata

GitOrigin-RevId: f3e8ba947ea34b6796e210a076a248c57188d148
2024-08-06 08:04:44 +00:00
Jakob Ackermann
8cba7935b7 Merge pull request #19689 from overleaf/jpa-editor-core-cjs
[overleaf-editor-core] remove Node.js stdlib import and tweak babel config

GitOrigin-RevId: 2ac13cc17651a3b522606f8df23c7e6915be19a6
2024-08-02 08:05:01 +00:00
Jakob Ackermann
e43491a04f Merge pull request #19547 from overleaf/jpa-move-v2-doc-versions
[overleaf-editor-core] keep v2DocVersions in-sync with fileMap

GitOrigin-RevId: 23491dfe51b71561837c96b8c550f75b0835a176
2024-08-02 08:04:57 +00:00
Domagoj Kriskovic
7e8e2b0585 Send origin metadata through docupdater and project-history when restoring files (#18721)
* add RestoreFileOrigin in overleaf-editor-core

* support source to be an object

* use sourceOrOrigin as param

* rename to originOrSource so the priority is more clear

* get timestamp from version

* fix test

* include version and min_count in getUpdatesFromHistory

* extractOriginOrSource util function

* fix RestoreManagerTests

GitOrigin-RevId: 0ace05a6ade2794c753a9d0bffb4f858ecc6899a
2024-06-18 08:04:34 +00:00
Eric Mc Sween
55c342134c Merge pull request #18659 from overleaf/em-crop-comments-tracked-deletes
Crop comments when processing tracked deletes

GitOrigin-RevId: 662c9ed86a8ed4959d1671ce466548487f334f45
2024-06-05 08:03:53 +00:00
Mathias Jakobsen
f14fdc7b7c Merge pull request #17958 from overleaf/mj-web-revert-file
[web] Initial version of file reverting

GitOrigin-RevId: ef500b2c3ddf21b0acb6650c2526edd10ab2cc18
2024-05-29 08:04:16 +00:00
Andrew Rumble
71187a51ba Merge pull request #18289 from overleaf/ac-ar-eslint-return-await
Add ESLint rule @typescript-eslint/return-await to backend services

GitOrigin-RevId: 75e3e32597827fcc852e69d479515fc72e8f45e4
2024-05-27 10:22:49 +00:00
Eric Mc Sween
5d0190da0f Merge pull request #18342 from overleaf/em-tracking-props-none
Separate handling of "none" tracking type in operations

GitOrigin-RevId: b07ee5320ac1a9c63e3b0059aade1a1564819943
2024-05-17 08:04:46 +00:00
Mathias Jakobsen
655f9b50ae Merge pull request #18309 from overleaf/mj-add-comment-resolved
[overleaf-editor-core] Omit resolved: false for comments serialisation

GitOrigin-RevId: 909f20efd8f3c3e50d40e09366951d317a4c31bf
2024-05-16 08:04:46 +00:00
Mathias Jakobsen
478a6157cc Merge pull request #18305 from overleaf/mj-add-comment-invert
[overleaf-editor-core] Make AddCommentOperation inversion restore state

GitOrigin-RevId: 5a47a2463e3650ba7a6b0a0f53c895fa6ec1b54c
2024-05-16 08:04:37 +00:00
Eric Mc Sween
e87df4a791 Merge pull request #18167 from overleaf/em-simpler-typescript-backend
Simpler Typescript setup in the backend

GitOrigin-RevId: 3a90f26a5ac8029d14203faa98008375ce933e7d
2024-05-07 08:04:00 +00:00
Eric Mc Sween
b75ba32774 Merge pull request #18114 from overleaf/em-resync-comments
Handle comments when resyncing history

GitOrigin-RevId: cd848fbd91f017a0a66e46df5c009bd16498d154
2024-05-06 08:04:25 +00:00
Eric Mc Sween
0e54a1078f Merge pull request #17931 from overleaf/em-invalid-ranges
Throw error when constructing invalid ranges

GitOrigin-RevId: 9451e0f8d35372610d08530048e7ee2ca1ff2052
2024-04-25 08:04:54 +00:00
roo hutton
2469c93da4 Merge pull request #17870 from overleaf/bg-node-upgrade-18-20-2
upgrade node to 18.20.2

GitOrigin-RevId: e4ac30c740ced3885353f1472cf690eb5ec0ece1
2024-04-24 08:05:16 +00:00
Mathias Jakobsen
36ad15c405 Merge pull request #17859 from overleaf/mj-project-history-ranges-at-version
[overleaf-editor-core+project-history] Add endpoint to fetch ranges from version

GitOrigin-RevId: fbe8e8ef3636b344006375a92057cfc580a74616
2024-04-22 08:04:11 +00:00
Eric Mc Sween
88fe3e2942 Merge pull request #17910 from overleaf/em-comment-ids
Include id in history Comment instances

GitOrigin-RevId: 25b897e8e9e8d7b19dfe2d90d7f0cafeb5e6e97f
2024-04-17 08:04:41 +00:00
Mathias Jakobsen
1116f9ea9a [overleaf-editor-core+project-history] Clean up TrackedChangeList api (#17740)
* [overleaf-editor-core+project-history] Mark TC list backing array as private

* [overleaf-editor-core] Add invariant for overlapping comment ranges

* [overleaf-editor-core] Assert that ranges are non-empty

GitOrigin-RevId: e60a3712eba2326e0767a75a3ffc75333311c057
2024-04-17 08:04:13 +00:00
Brian Gough
a9d1ddcb22 Merge pull request #17748 from overleaf/bg-node-security-upgrade-2024-04-05
upgrade node version to 18.20.1

GitOrigin-RevId: 28f8f7c7f63285f7b7355e65713d9ed2dbda8a0e
2024-04-08 08:04:41 +00:00
Mathias Jakobsen
815c29cf82 Merge pull request #17396 from overleaf/mj-version-filtering
[overleaf-editor-core+project-history] Filter tracked changes when fetching files

GitOrigin-RevId: 935e4c4712f31b77070aec545a849fc6fefedcd9
2024-04-08 08:04:17 +00:00
Mathias Jakobsen
178485715f Merge pull request #17642 from overleaf/mj-optimize-range-fetch
[overleaf-editor-core] Load ranges and content in parallel

GitOrigin-RevId: aa949ae7532965c5476c58bacf4bf068620791c0
2024-04-08 08:04:12 +00:00
Alf Eaton
6cc2db3cdd Merge pull request #17525 from overleaf/ae-upgrade-prettier
Upgrade Prettier to v3

GitOrigin-RevId: 6f1338f196408f3edb4892d5220ad3665ff1a5bc
2024-03-26 09:04:05 +00:00
Mathias Jakobsen
ce19b5f568 Merge pull request #17359 from overleaf/mj-download-filtering
[overleaf-editor-core+history-v1] Filter tracked deletes when creating zip files

GitOrigin-RevId: 1c19d3cb849150d33e750772399ea81c280fdd57
2024-03-13 09:03:23 +00:00
Mathias Jakobsen
4ef7bc617b Merge pull request #17196 from overleaf/mj-tracked-deletes-filtering
[project-history] Filter tracked deletes from diff views

GitOrigin-RevId: 32c49a740932ef28534b82d390fe00e6500864ca
2024-03-13 09:03:19 +00:00
ilkin-overleaf
bdc6b417e2 Merge pull request #17252 from overleaf/ii-catch-missing-dependency
Fix services to catch missing dependencies

GitOrigin-RevId: 4c466ad328449b32cddbc5751cd840931ff44c6c
2024-03-04 09:04:13 +00:00
Mathias Jakobsen
b80d0e8634 Merge pull request #17047 from overleaf/mj-ranges-in-blobstore
[overleaf-editor-core] Store tracked changes and comments in blob-store

GitOrigin-RevId: 05cc69044bf26808b64b2687d81f2c40ef4cc972
2024-02-27 09:03:10 +00:00
Domagoj Kriskovic
5cb27f69d7 [overleaf-editor-core] SetCommentStateOperation (#17056)
GitOrigin-RevId: 6efb6e3c9cb4b0cb9fdbc522bc57b1c1934a5062
2024-02-27 09:03:07 +00:00
Eric Mc Sween
cd1773773e Merge pull request #17162 from overleaf/em-handle-comments
Handle comment updates in project-history

GitOrigin-RevId: 46f0043c1c20200bdb665e66643a7870c18d797f
2024-02-21 09:03:27 +00:00
Domagoj Kriskovic
c9b9ae4180 [overleaf-core-editor] Make comment properties immutable (#17022)
* make range class immutable

* rename variable

* use newRanges

* range readonly props

* skrinkBy test

* Fix range shrinking bug

* [overleaf-core-editor] Make comment properties immutable

* remove added line

* format fix

* make readonly array

* [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation (#16871)

* [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation

* added add comment op test

* delete comment op test

* import core to escape circle deps

* desctructure in tests

* require directly in builder

* invert of add comment is always delete comment

* no merging on compose

* NoOp if comment is not found

* use comment.clone()

* update test

* change CommentRawData type

* jsdoc assert type

* fix formating

* EditNoOperation

* return other in compose

* use ReturnType

* Revert "use ReturnType"

This reverts commit 2c7e04f1541310e9fc08963170a783a437ed1992.

* transorm add comment operation

* transform delete comment operation

* moved comment.js

* format fix

* fix transform addComment and textoperation

* fix merge

* test more complex test operations

* change to else if

* move range.js

* fix types

* fix AddComment and TextOperation transform

* fixed AddComment-TextOperation trasform, added test

* deletecommentoperation should win

* should not delete comment

* remove unused function, fix type

* fix format

* add resolved for existing comment

* transform EditNoOperation

* fix test description

* change the order of EditNoOperation

* fix DeleteCommentOperation-DeleteCommentOperation transform

* fix types after merging main

* refactor operation types

* fix errors after merging

* fix bad merge

* format fix

* removed comment.clone()

* return old comment

* remove unused var

GitOrigin-RevId: e31d723075cb04b0b7177e7cae0014c295f92a68
2024-02-21 09:03:21 +00:00
Mathias Jakobsen
826020effe Merge pull request #17099 from overleaf/mj-no-op-transform
[overleaf-editor-core] Fix transform for no-op Operation

GitOrigin-RevId: 20b8681153fb0788feb7d5d9954781a5432dbe69
2024-02-21 09:03:14 +00:00
Jakob Ackermann
39189978ac Merge pull request #17170 from overleaf/jpa-node-18-19-1
[misc] upgrade Node.js to 18.19.1

GitOrigin-RevId: 1bd2008682b585c3fccc65f74c90ba7fc9edc023
2024-02-20 09:04:55 +00:00
Domagoj Kriskovic
2440f89be5 [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation (#16871)
* [overleaf-editor-core] AddCommentOperation and DeleteCommentOperation

* added add comment op test

* delete comment op test

* import core to escape circle deps

* desctructure in tests

* require directly in builder

* invert of add comment is always delete comment

* no merging on compose

* NoOp if comment is not found

* use comment.clone()

* update test

* change CommentRawData type

* jsdoc assert type

* fix formating

* EditNoOperation

* return other in compose

* use ReturnType

* Revert "use ReturnType"

This reverts commit 2c7e04f1541310e9fc08963170a783a437ed1992.

* transorm add comment operation

* transform delete comment operation

* moved comment.js

* format fix

* fix transform addComment and textoperation

* fix merge

* test more complex test operations

* change to else if

* move range.js

* fix types

* fix AddComment and TextOperation transform

* fixed AddComment-TextOperation trasform, added test

* deletecommentoperation should win

* should not delete comment

* remove unused function, fix type

* fix format

* add resolved for existing comment

* transform EditNoOperation

* fix test description

* change the order of EditNoOperation

* fix DeleteCommentOperation-DeleteCommentOperation transform

* fix types after merging main

* refactor operation types

GitOrigin-RevId: 6f127763a6dc50d4fe3524d9b25dc7526b6b0028
2024-02-19 09:04:15 +00:00
Mathias Jakobsen
28106dd66c Merge pull request #16885 from overleaf/mj-scanops-tracking-info
Add comment and tracking information to ScanOps

GitOrigin-RevId: 475dab73d44529f793c7d07bc5ae6873f8e0b257
2024-02-15 09:04:01 +00:00
Domagoj Kriskovic
8b571bae9c [overleaf-editor-core] Make range methods immutable (#16890)
* make range class immutable

* rename variable

* use newRanges

* range readonly props

* skrinkBy test

* Fix range shrinking bug

GitOrigin-RevId: ea9a568b28f53e74dec4c500be3d5dba65abf0ad
2024-02-14 09:05:49 +00:00
Jakob Ackermann
63520c7076 Merge pull request #16859 from overleaf/jpa-sharelatex-cleanup
[misc] ShareLaTeX cleanup - high impact

GitOrigin-RevId: 6dcce9b0f15e30f7afcf6d69c3df36a369f38120
2024-02-09 09:04:11 +00:00
Mathias Jakobsen
ad0a8be0af Merge pull request #16807 from overleaf/mj-tracked-changes-history
[overleaf-editor-core] Add TrackedChangeList to StringFileData

GitOrigin-RevId: b2abce4860c5be6189beafca575de04e880b08f5
2024-02-06 09:03:54 +00:00
Mathias Jakobsen
09ff9526b8 Merge pull request #16872 from overleaf/mj-exclusive-ranges
[overleaf-editor-core] Make ranges exclusive

GitOrigin-RevId: 5b821d5bc1da8a6647305c268abc6185a7fa1f80
2024-02-06 09:03:51 +00:00
Mathias Jakobsen
63ff16843c [overleaf-editor-core] Introduce ScanOp and subclasses (#16695)
* [overleaf-editor-core] Introduce ScanOp and subclasses

* [overleaf-editor-core] Remove unused methods

* [overleaf-editor-core] Add tests for ScanOps

* [overleaf-editor-core] Simplify merge

* [overleaf-editor-core] Make ApplyContexts mutable

* [overleaf-editor-core] Remove unnecessary containsNonBmpChars check

* [overleaf-editor-core] Revert to using reduce

* [overleaf-editor-core] Modify inputCursor after using it

* [overleaf-editor-core] Rename DeleteOp to RemoveOp

* [overleaf-editor-core] Remove useless constructor

* [overleaf-editor-core] Mutate in mergeWith

* [overleaf-editor-core] Add check for out-of-bounds retain

* [overleaf-editor-core] Move error import

GitOrigin-RevId: d07bd58177579638551257d56f087e8967e5b52f
2024-02-02 09:03:32 +00:00
Domagoj Kriskovic
b87dad77d9 Added applyInsert/applyDelete methods to comments (#16572)
* Add CommentList to StringFileData

* added more types

* use toRaw

* using Map rather than array for comments

* using Range class

* Comment with ranges:Range[]

* Revert "Comment with ranges:Range[]"

This reverts commit 0783b1837562600637db03cc70c620129061c797.

* Comment with ranges:Range[]

* remove isDeleted

* commentList.toRaw()

* using toRaw

* commentId to id

* Revert "using toRaw"

This reverts commit 0c04ca5836f3befd5ec027bad5bf722e8b27f36c.

* fix merge

* make comment map internal to CommentList

* remove unused type

* fix parameter name in StringFileData

* import types more consistently

* more consistent type def

* Added moveOnInsert/moveOnDelete methods to comments

* use range helper methods

* mergeRanges function

* rename isAfter to startsAfter

* added @ts-checks

* using comment.isEmpty

* rename overlaps to covers

* remove ops in applyDelete

* mege, substract, isInRange

* ranges fixes, added tests

* rename to includes

* using pos,length in applyInsert

* simplify

* extendComment option

* check comment edges

* added inclusive option

* more specific touches()

* refactor mergeRanges()

* comment.addRange()

* remove inclusive option

* refactor using more helper methods

* fix typo

* inserting a comment between ranges tests

* test description fixes

* support only range

* more edge case testing

* added more range tests

* renamed to containsExcludingEdges

* endsAt check edge

* using firstIndex, lastIndex

* contains, containsIndex

* raturn -1 for lastIndex for empty ranges

* rename ranges in tests

* indexStartsAfter

* sort comment ranges

* rename to indexIsAfter, fix Range type

* add range if expandComment is true

* split the range when expandComment is false

* added moveBy and extendBy

* added more tests

* added comments

* prettier

* small fixes/typos

* rename indexIsAfter

* merge when deleting with overlaps

* added overlap test

* same range touches test

* test with overlapping comments

* delete duplicate test

* throw on empty range

GitOrigin-RevId: 1252e3d01f2f5dc1d00ce681c579506038e4d121
2024-02-02 09:03:28 +00:00
Jakob Ackermann
a3dc24a46e Merge pull request #16752 from overleaf/jpa-format-fix
[terraform] cloud-build: add missing triggers for libraries

GitOrigin-RevId: 3047b85550f9c2e51460509b9c1df7c414b901eb
2024-01-29 09:04:05 +00:00
Eric Mc Sween
5c517a56c3 Merge pull request #16661 from overleaf/em-fix-tsconfig
Small backend Typescript config fixes

GitOrigin-RevId: d600c1f3fa9ef88e9a06aaa5743d454a620c122d
2024-01-24 09:05:09 +00:00
Mathias Jakobsen
05bec77b74 Merge pull request #16660 from overleaf/mj-edit-operation-fix
[overleaf-editor-core] Fix typo in text operation tests

GitOrigin-RevId: a7ee6ce55cd0c6b4304990de2e6fa76f5406e663
2024-01-24 09:04:37 +00:00
Mathias Jakobsen
43b2fe4a3a [overleaf-editor-core] Restructure TextOperation hierachy (#16582)
* [overleaf-editor-core] Restructure TextOperation hierachy

Restructures the hierachy of TextOperations to include a superclass
EditOperation. This superclass will later on contain other classes used
for tracked changes and comments.

* [overleaf-editor-core] Update json format of LazyStringFileData

* [history-v1+project-history] Fix TextOperation.fromJSON calls

* [overleaf-editor-core] Change EditOperationBuilder.fromRaw to fromJSON

* [overleaf-editor-core] Update apply and invert functions to accept FileData

* [overleaf-editor-core] Pass missing argument to store method

* [overleaf-editor-core] Remove unused method

* [overleaf-editor-core] User EditOperationTransformer

* [overleaf-editor-core] Clean up JSDoc comments

* [overleaf-editor-core] Add tests for EditOperation

* [overleaf-editor-core] Update JSDoc types

GitOrigin-RevId: 9c22a3a89b8483bdb87b43f329ddbdd887ffed42
2024-01-24 09:04:18 +00:00
Domagoj Kriskovic
fc90db231c Add CommentList to StringFileData (#16568)
* Add CommentList to StringFileData

* added more types

* use toRaw

* using Map rather than array for comments

* using Range class

* Comment with ranges:Range[]

* Revert "Comment with ranges:Range[]"

This reverts commit 0783b1837562600637db03cc70c620129061c797.

* Comment with ranges:Range[]

* remove isDeleted

* commentList.toRaw()

* using toRaw

* commentId to id

* Revert "using toRaw"

This reverts commit 0c04ca5836f3befd5ec027bad5bf722e8b27f36c.

* fix merge

* make comment map internal to CommentList

* remove unused type

* fix parameter name in StringFileData

* import types more consistently

* more consistent type def

GitOrigin-RevId: 2be2225819d8e8ebcf90d08def280377205cb9ec
2024-01-24 09:04:15 +00:00
Eric Mc Sween
b92d1a0251 Merge pull request #16524 from overleaf/em-fix-typescript-backend
Fix typescript config in the backend

GitOrigin-RevId: fb292968bc14da6d7c17bee1da00803a74901899
2024-01-17 09:03:42 +00:00
Eric Mc Sween
d227dfba0c Merge pull request #16393 from overleaf/em-typescript-libraries
Add type checking to libraries

GitOrigin-RevId: bed79f5123081773d6ac6e27698246726184c5e6
2024-01-12 09:03:25 +00:00
Mathias Jakobsen
4763cfd59e Merge pull request #16058 from overleaf/jpa-faster-restart
[misc] faster service shutdown in dev-env

GitOrigin-RevId: c5589844aefe3ca097756b188e02354ab518b94d
2023-12-08 09:04:01 +00:00
Jakob Ackermann
f061a4add4 Merge pull request #15506 from overleaf/jpa-node-18-18-2
[misc] upgrade Node.js from 18.18.0 to 18.18.2

GitOrigin-RevId: 747783fcb9c2a09d79a82268531f612d1ad157be
2023-11-01 09:02:48 +00:00