Skip to content

chore(zero-swift): version packages - #15

Merged
tmm merged 1 commit into
mainfrom
changeset-release/main
Oct 22, 2026
Merged

tmm merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

zero-swift@0.4.0

Minor Changes

  • 76312e4: JSONValue.object holds a JSONObject instead of a [String: JSONValue]. A JSONObject keeps its keys as a JS object does: integer-like keys first in ascending order, then the others in the order they were set, so JSON is written as JSON.stringify writes it. Keys are compared by UTF-16 code unit, so keys that differ only in Unicode normalization ("é" and "e\u{301}") stay apart instead of one overwriting the other. Before, they merged in pokes (row values, primary keys, merges, client IDs), and custom-query and AST hashes of such keys differed from JS. Dictionary literals, object[key], and for (key, value) in object work as before, and Row(_:) and Row.object convert both ways.

    Migration: where code builds .object(dict) from a [String: JSONValue] variable, write .object(JSONObject(dict)) or declare the variable as JSONObject. objectValue and ZeroObjectReader.object/ZeroObjectWriter.object are now JSONObject; use .dictionary where a [String: JSONValue] is needed. AST.Bound.row is a JSONObject, and AnyQuery.start, TableMutator, and LoopbackServer.put take a JSONObject as well as a dictionary.

Patch Changes

  • fcc95f0: Two Zero instances of one client group in one process (the same user, storageKey, and storage, such as two windows) no longer drop each other's queries: initConnection lists every running client of the group in activeClients, as in JS, so zero-cache doesn't delete the other one. When one closes, the others send deleteClients for it once.
  • 48ca692: A first poke that changes nothing after a reconnect or relaunch completes the got queries, as in JS. <= and >= filters no longer match NaN. Storage: every client sharing a database hears about a write failure, and a closed client doesn't; writes queued before a failure no longer land after it; a database busy past the busy timeout is retried by the next write instead of being a storage failure; a read failure loading the client group is reported through onStorageFailure and moves the client to memory; and the memory fallback after a failed open is shared by name in the process, like .memory.
  • a548803: codegen generates Swift that compiles for any table, column, relationship, JSON field, or enumeration value name. A name that is taken, a keyword Swift doesn't allow even backticked, a member the generated code declares, or a type it uses is renamed by a documented rule, and keeps its original name in the schema, CodingKeys, and raw values. Names outside ASCII are kept where Swift allows them, enumeration values with control characters are escaped as Swift allows, and a recursive json<T>() type is JSONValue where it recurs instead of overflowing the stack.

@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 11dff60 to a9ca717 Compare October 22, 2026 04:09
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from a9ca717 to 3d80c9d Compare October 22, 2026 06:24
@tmm
tmm merged commit 58a08b3 into main Oct 22, 2026
2 checks passed
@tmm
tmm deleted the changeset-release/main branch October 22, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant