This page is automatically synced from packages/lix/sdk/CHANGELOG.md.
68a939b: Refactored the architecture of lix to be event-sourced.
Changes are now the source of truth which allows re-materialization of state at any point in time, and re-assurance of data integrity.
Lix up to v0.4 used SQLite event triggers to track changes. The risk of missing triggers combined with a lack of hooking into the commit process meant that changes could be lost or not properly tracked.
This release includes:
Lix Engine: A query engine (packages/lix/sdk/src/engine) that includes a custom SQL parser, preprocessor, and query optimizer to map queries to native SQL.
Reactive queries: subscribe UI components to live data with lix.observe(); emits on every state commit for polling-free updates.
Diffing + history: working/checkpoint and commit-to-commit diffs, plus a state_history view for blame and time-travel.
Change proposals: change proposals with conversations/messages and per-change authorship for review flows.
Support for directories: built-in directory/file descriptors and path helpers replace the old file-queue plumbing.
Engine portabilityy: openLix now accepts raw plugin modules and exposes lix.call(...) for worker/remote environments.
New Transaction Model: A formal 3-stage mutation lifecycle (Mutation -> Transaction -> Commit) ensures ACID guarantees and clearer change tracking.
Schema definition API: API for defining custom entity schemas, making Lix extensible for any data type.
closeLix() api275d87e: improve: createChangeSet() now accepts labels to associate with the change set
Before:
await createChangeSet({
lix,
changes: [],
// ❌ no way to add labels
});After:
// Get existing labels
const labels = await lix.db.selectFrom("label").selectAll().execute();
await createChangeSet({
lix,
changes: [],
// ✅ associate labels with the change set
labels,
});dc92f56: - Rename lix-server-api to lix-server-protocol for improved clarity and consistent naming. All functionality remains backward compatible. The following changes were made:
c1ed545: improve: createChangeSet() now takes an empty list of changes without throwing
Before:
await createChangeSet({
lix,
// 💥 throws FOREIGN KEY CONSTRAINT violation
changes: [],
});After:
await createChangeSet({
lix,
// ✅ does not throw
changes: [],
});8ce6666: Fix glob pattern behavior in file queue by removing prepending slash and add proper null checks for plugin.detectChangesGlob.
Also update the error message explanation for file paths to correctly state why paths need to start with a root slash.
KeyValue types175f7f9: @lix-js/sdk:
@lix-js/plugin-csv:
lix-file-manager:
PR URL: https://github.com/opral/monorepo/pull/3377
657bdc4: adds a telemetry event for opening a lix as well as the option to disable telemetry
0de2866: refactor: removes the anonymous_ prefix from "anonymous accounts".
Closes https://github.com/opral/lix-sdk/issues/233.
There is no difference between an account prefixed with anonymous and one that is not. This change removes the prefix to avoid confusion.
03e746d: add the option to open a lix with an existing account
const account = localStorage.getItem("account");
await openLix({ account });48fac78: fix: sync process does not create new intervals after the database has been closed
this bug hindered node processes to exit https://github.com/opral/inlang-sdk/issues/155
Updated dependencies [7046bc3]
4d9d980: adds unique and default human readable version names
version.name which eases conditional logic.cc93bd9: Refactor: Use nano-ids for change controlled tables like discussions, comments, and labels.
-http://localhost:3005/app/fm/?f=0193f041-21ce-7ffc-ba6e-d2d62b399383&d=0193f041-2457-7ffc-ba7e-494efc37b1b8&l=55a7bcc8-63d8-43b7-af0b-3916618fc258
+http://localhost:3005/app/fm/?f=tUYFRUe4lb&d=rrzumhqqTOwq&l=MftKxYHfDw2bSVr8BsAdditional information
The pattern is still not human readable. I assume that we will introduce a human readable pattern in the future in addition to permalinks. This change is a incremental step towards better link sharing and good enough for now.
Performance implications
Nano IDs are not sortable and theoretically make insertions slower. However, until we get lix'es that have billions of rows we need to get users first. Sharing is a key feature to get users.
85eb03e: refactor: remove comment.created_at and comment.created_by https://github.com/opral/lix-sdk/issues/175
Comments and discussions are now change controlled. Hence, knowing when a comment or discussion has been created can be queried via the changes. This removes the need for the created_at and created_by fields on the Comment and Discussion entities, and thereby simplifies the schema, avoids duplicate date, and reduces the risk of inconsistencies.
2d3ab95: refactor: explicit firstComment argument in createDiscussion() https://github.com/opral/lix-sdk/issues/164
It was unclear that the content argument in createDiscussion() was meant to be the first comment. This change makes it explicit by renaming the argument to firstComment.
- createDiscussion({ discussion, content: "first comment" })
+ createDiscussion({ discussion, firstComment: { content: "first commment" } }})d78a1bf: improve: remove top level await in json parsing
required for lix apps that transpile to CJS. CJS does not support top level await. see https://github.com/evanw/esbuild/issues/253
6b14433: refactor: rename change_queue to file_queue https://github.com/opral/lix-sdk/issues/168
-db.selectFrom("change_queue")
+db.selectFrom("file_queue")9f1765a: refactor: rename plugin_key: lix_own_entity/lix_own_change_control to lix_sdk
c494dca: refactor: remove change_set_label_author table.
Closes https://github.com/opral/lix-sdk/issues/227
Change set labels are now under own change control. Querying who created a label can happen via the change table itself.
fc5a5dd: fix: duplicate version changes
Closes https://github.com/opral/lix-sdk/issues/217 by making version changes have a unique (entity_id, file_id, schema_key).
Sync was buggy because the sync process is an async process. A client received multiple version changes for the same entity and inserted them https://github.com/opral/lix-sdk/issues/217#issuecomment-2549545901 without checking if the version change for the entity already exists.
8c4ac57: refactor: rename parent to from in createVersion() https://github.com/opral/lix-sdk/issues/213
-await createVersion({ lix, parent: currentVersion })
+await createVersion({ lix, from: currentVersion })8629faa: fix: queries against closed database
de6d717: fix: type mismatch of file.data
The type of file.data in File interface is changed from ArrayBuffer to Uint8Array to match the type of Uint8Array returned by SQLite and various file related APIs.
-file.data: ArrayBuffer
+file.data: Uint8Arraybe9effa: Extract toBlob() from lix.* object https://github.com/opral/lix-sdk/issues/196
- await lix.toBlob()
+ await toBlob({ lix })b74e982: refactor: replace #* key syntax with skip_change_control column
closes https://github.com/opral/lix-sdk/issues/191
Enables matching of flags and avoids re-names of keys. This change replaces the #* key syntax with a skip_change_control column in the flags table.
key_value = {
- key: "#mock_key",
+ key: "mock_key",
+ skip_change_control: true,
value: "mock_value",
}5eecc61: refactor: rename file_id of own changes from null to lix_sdk to avoid debugging confusions https://github.com/opral/lix-sdk/issues/194
- file_id: null
+ file_id: lix_sdk