Commit Graph

14 Commits

Author SHA1 Message Date
Abdullah Atta
9116a24392 global: update license year to 2023 2023-01-16 13:48:28 +05:00
Abdullah Atta
d81f5dba65 refactor: migrate to theme-ui from rebass 2022-08-31 07:26:27 +05:00
Abdullah Atta
c317774c8a docs: add license header 2022-08-30 16:17:04 +05:00
thecodrr
751305e04c perf: optimize grouping/sorting & id creation 2022-06-16 16:01:08 +05:00
Abdullah Atta
630bb33b10 feat: add note version history (#20)
* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* test: add collector tests

* feat: dateEdited -> dateModified

* feat: migrate to liqe for searching

* chore: forceExit jest after test run

* feat: note version history

* fix bugs

* add tests for session history

* update tests

* add tests for restoring content

* add more tests

* update jsdoc

* return empty array if no session history present for a note

* init note history with await

* add note history versions limit

* cleanup note history after adding a new session

* fix tests

* add test for session cleanup

* init ContentHistory with await

* fix reference to db in init

* make sessionId in db

* check if note is locked through note metadata

* make cleanup method private

* use remove methods in notehistory and contenthistory

* restore note content via notes.add method if note is not locked

* move getting all items to seperate functions

* check if parsed json is valid

* deserialize a session only if it's sessionContent exists

* add locked property to sessionContent

* remove makeSessionId function

* update tests

* remove yarn.lock file

* update tests

Co-authored-by: ammarahm-ed <ammarahmed6506@gmail.com>
2021-12-21 13:41:08 +05:00
thecodrr
fda5e0c84b fix: do not automatically delete empty notes 2021-12-08 19:32:58 +05:00
thecodrr
442722933c feat: use blake2s for random id generation 2021-06-04 09:32:13 +05:00
thecodrr
2d6380fdbc feat: use bson-objectid for id generation 2021-05-21 19:19:48 +05:00
thecodrr
e898db9562 fix: derive consistent md5 ids from tag title 2021-02-20 11:31:44 +05:00
thecodrr
89be1c2cd2 fix: getRandomValues length is double so generate 12 bytes long hex 2020-09-17 15:04:16 +05:00
thecodrr
88fe786cfa feat: use built-in getRandomValues for generating ids 2020-09-17 00:39:02 +05:00
thecodrr
e5683e000e fix: generate 24 bit random ids 2020-08-27 13:22:03 +05:00
thecodrr
5a0c85fd4d feat: use cryptographically secure item ids 2020-08-27 13:13:43 +05:00
thecodrr
780ee93b58 sync: generate random id for items 2020-03-18 14:06:20 +05:00