-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various improvements #291
Various improvements #291
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments
I would extract to multiple PRs for ease of review, one to replace to jsr, one for packaging, one for biome and so on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some more comments
Also, I would redo the PR to try to keep the git history as most of the files marked as deleted instead of moved and updated, this has really high value
Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.
What is the motivation?
We found that the size of the library was getting out of hand and wanted to improve on this. Additionally, with the introduction of JSR, we no longer see the need for this to be a Deno project.
What does this change do?
decimal.js
library, as it's unpacked size is 250kb.Uuid
wrapper to offer a nicer interface over theuuidv7
library.zod
, which was a big contributor to size.semver
, which was a big contributor to size. We now compare versions withlocaleCompare
.encodeCbor
anddecodeCbor
are now passed along with the emitter in anEngineContext
class, to the engine. This ensures that the engine library uses the same instances of classes that the cbor encoding and decoding depend on.ws
andwss
.jsonify
method to use custom logic overJSON.stringify()
andJSON.parse()
, keeping non-surrealql class values intact, and resulting in 100% to 150% faster.What is your testing strategy?
Updated all tests to Bun, and added various new tests. In the future we'd like to expand tests to test on both source and the compiled library, and across Bun, Deno and Node.
Is this related to any issues?
Fixes #284
Supersedes #272
Have you read the Contributing Guidelines?