@shivaedev/contract 0.55.0 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.56.0 - 2026-11-21
4
+
5
+ ### Added
6
+
7
+ - `ContractClient<typeof Notes>` from `@shivaedev/contract/makeClient.ts` is the type of a contract's binding in any client whose record holds it, so a screen names its client by the contract alone.
8
+ - `makeClient`'s `url` is optional and defaults to `/rpc` beside the page's location, so browser code passes no URL and, without a session-scoped contract, no options.
9
+
10
+ ### Breaking
11
+
12
+ - `makeClient` takes a record of contracts and moves to `@shivaedev/contract/makeClient.ts`. It makes one RPC client over every contract in the record, with one activity and one runtime, and binds each contract under its key in `api`. Wrap the contract in a record and read its binding by that key: `makeClient(Notes, options).api.list` becomes `makeClient({ notes: Notes }, options).api.notes.list`, and the import `import { makeClient } from "@shivaedev/contract/bind.ts"` becomes `import { makeClient } from "@shivaedev/contract/makeClient.ts"`.
13
+ - the `group` option of `makeClient` is removed, and so is binding further contracts with `bind` on a made client's `Client`. Put every contract in one record instead: `const client = makeClient(Users, { group: Admin.group, url }); const jobs = bind(Jobs, client.Client)` becomes `const client = makeClient({ jobs: Jobs, users: Users }, { url })`, with `client.api.users` and `client.api.jobs`. `bind` stays for an `AtomRpc.Service` the application builds itself.
14
+ - `MadeClient` from `@shivaedev/contract/clientOptions.ts` moves to `@shivaedev/contract/makeClient.ts` and takes the record's type, `MadeClient<typeof contracts>`; `ClientService` is removed. `ClientOptions` moves from `@shivaedev/contract/clientOptions.ts` to `@shivaedev/contract/ClientOptions.ts` and gains `registry`, so `Omit<ClientOptions, "url"> & { readonly registry?: AtomRegistry.AtomRegistry }` becomes `ClientOptions`.
15
+
3
16
  ## 0.55.0 - 2026-11-21
4
17
 
5
18
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shivaedev/contract",
3
- "version": "0.55.0",
3
+ "version": "0.56.0",
4
4
  "description": "Typed query and command contracts over native Effect RPC and reactivity",
5
5
  "keywords": [
6
6
  "effect"
@@ -51,13 +51,13 @@
51
51
  "devDependencies": {
52
52
  "@effect/platform-node": "4.1.4",
53
53
  "@effect/vitest": "4.1.4",
54
- "@shivaedev/identity": "0.38.1",
55
- "@shivaedev/quality": "0.83.0",
56
- "@shivaedev/server": "0.41.0",
54
+ "@shivaedev/identity": "0.38.2",
55
+ "@shivaedev/quality": "0.83.1",
56
+ "@shivaedev/server": "0.41.1",
57
57
  "@shivaedev/sql": "0.54.0",
58
- "@shivaedev/test-kits": "0.16.1",
58
+ "@shivaedev/test-kits": "0.16.2",
59
59
  "@shivaedev/test-sql": "0.26.0",
60
- "@shivaedev/test-story": "0.52.1",
60
+ "@shivaedev/test-story": "0.52.2",
61
61
  "@types/node": "24.19.2",
62
62
  "effect": "4.1.4",
63
63
  "fake-indexeddb": "6.2.8",