Skip to content
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

auto serialization of json && kysely recommended types #3081

Conversation

samuelstroschein
Copy link
Member

@samuelstroschein samuelstroschein commented Aug 27, 2024

I just solved the same issues in the inlang sdk2 and thought i copy & paste them over to lix to get them resolved.

changes:

  • json values are now auto serialized (god thanks) which avoids type errors and bugs (closes serailize json properties (lix) lix-sdk#60)
  • the database schema is structured as recommended by kysely (closes Clean up Table Schema lix-sdk#53). enables NewChange etc things were optional properties are not required to be provided.
  • default values for uuids that avoids apps to pass ids (likely bug prone, they use wrong ids etc)

additional notes

  • all lix tests pass ✅
  • all inlang SDK tests pass ✅

Copy link

changeset-bot bot commented Aug 27, 2024

⚠️ No Changeset found

Latest commit: 6c28408

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -0,0 +1,97 @@
import {
Copy link
Contributor

Choose a reason for hiding this comment

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

did not check/ understand this file, i assume its some copy paste from kysley somwhere ...

Copy link
Member Author

Choose a reason for hiding this comment

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

I wrote it myself based on a kysely plugin. The API is bonkers. The important part is the serializeJson function.

@samuelstroschein samuelstroschein merged commit 20fae1a into lix-integration Aug 27, 2024
2 checks passed
@samuelstroschein samuelstroschein deleted the samuelstroschein/lix-130-serailize-json-properties-lix branch August 27, 2024 20:13
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2024
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