Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

update LevelDB implementation #102

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

update LevelDB implementation #102

wants to merge 7 commits into from

Conversation

mixmix
Copy link
Collaborator

@mixmix mixmix commented Jun 16, 2024

With the upgrade of rxdb, we saw breaking changes hit @pluto-encrypted/leveldb.
This PR

  • updates leveldb package
  • improves test-suite
    • removing before-hooks which were causing some problems
    • add storage cleanup

@mixmix mixmix changed the title fix: update-lockfile fix: leveldb tests Jun 17, 2024
mixmix and others added 3 commits July 4, 2024 09:39
* get rid of seg fault

* fix tests for indexdb and inmemory. Tests for leveldb failing to query docs

* fix test blocks

* add notes do debugging index problems

* update gitignore

---------

Signed-off-by: mix irving <mix@protozoa.nz>
Co-authored-by: mixmix <mix@protozoa.nz>
@@ -16,4 +16,5 @@ Object.defineProperty(globalThis, "crypto", {
},
});

Object.assign(global, { TextDecoder, TextEncoder });
const _TextUtils = JSON.parse(JSON.stringify({ TextDecoder, TextEncoder }))
Object.assign(global, _TextUtils)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change fixed an error that was being thrown

@mixmix mixmix changed the title fix: leveldb tests update LevelDB implementation Jul 19, 2024
@mixmix mixmix marked this pull request as draft July 19, 2024 02:31
Comment on lines +19 to +20
const _TextUtils = JSON.parse(JSON.stringify({ TextDecoder, TextEncoder }))
Object.assign(global, _TextUtils)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chereseeriepa if you stringify { TextEncode } you get {}

So perhaps the correct edit is:

Suggested change
const _TextUtils = JSON.parse(JSON.stringify({ TextDecoder, TextEncoder }))
Object.assign(global, _TextUtils)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants