solid-objects 1.0.0 → 1.0.1
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.
- package/CHANGELOG.md +7 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/agents.md +12 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.1 - 2026-10-14
|
|
4
|
+
|
|
5
|
+
- The agent guide now lists the import path, the call, and the driver of each
|
|
6
|
+
SQL database adapter, and it shows how to cancel a reminder with
|
|
7
|
+
`unschedule()`. Agents in the Track B evaluation invented the names
|
|
8
|
+
`solid-objects/database/postgres` and `this.cancelReminder()`.
|
|
9
|
+
|
|
3
10
|
## 1.0.0 - 2026-10-13
|
|
4
11
|
|
|
5
12
|
- Version 1.0 freezes the public API under semantic versioning.
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.
|
|
1
|
+
export declare const VERSION = "1.0.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "1.0.
|
|
1
|
+
export const VERSION = "1.0.1";
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
package/docs/agents.md
CHANGED
|
@@ -95,6 +95,14 @@ const runtime = configure({
|
|
|
95
95
|
await runtime.install()
|
|
96
96
|
```
|
|
97
97
|
|
|
98
|
+
Each SQL database has its own adapter. Import the adapter from its own path:
|
|
99
|
+
|
|
100
|
+
| Database | Import | Call | Driver |
|
|
101
|
+
| ---------- | ---------------------------------------------------------------- | ---------------------------------- | ------------------------------- |
|
|
102
|
+
| SQLite | `import { sqlite } from "solid-objects/database/sqlite"` | `sqlite({ path: "app.sqlite3" })` | None. Node.js has `node:sqlite` |
|
|
103
|
+
| PostgreSQL | `import { postgresql } from "solid-objects/database/postgresql"` | `postgresql({ connectionString })` | `npm install pg` |
|
|
104
|
+
| MySQL | `import { mysql } from "solid-objects/database/mysql"` | `mysql({ connectionString })` | `npm install mysql2` |
|
|
105
|
+
|
|
98
106
|
Every authorization callback denies by default. Do step 5 before you call an
|
|
99
107
|
actor. [Configuration](configuration.md) lists each option and database
|
|
100
108
|
adapter.
|
|
@@ -199,7 +207,8 @@ Obey these rules in actor code:
|
|
|
199
207
|
- Public methods are ordered operations. Each one takes no argument or one
|
|
200
208
|
object argument.
|
|
201
209
|
- Use `this.schedule({ at, key })` for delayed work. A new `schedule` with the
|
|
202
|
-
same key moves the alarm.
|
|
210
|
+
same key moves the alarm. `this.unschedule("expire", { key: buyer })` cancels
|
|
211
|
+
it.
|
|
203
212
|
- Use `this.reject(code, { message })` for a business rule failure that must
|
|
204
213
|
not retry. The second argument is an object, for example
|
|
205
214
|
`this.reject("room_full", { message: "The room is full" })`.
|
|
@@ -221,6 +230,8 @@ Avoid these mistakes:
|
|
|
221
230
|
| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
222
231
|
| `this.schedule({ at, key })` with no operation after it | `this.schedule({ at, key }).expire({ buyer })`. A `schedule()` call with no operation after it fails the turn with `ScheduleWithoutOperation` |
|
|
223
232
|
| `this.reject("room full")` or `this.reject(code, message)` | `this.reject("room_full", { message: "The room is full" })` |
|
|
233
|
+
| `postgres()` from `solid-objects/database/postgres` | `postgresql({ connectionString })` from `solid-objects/database/postgresql`. Step 4 lists each adapter |
|
|
234
|
+
| A guessed cancel method, such as `this.cancelReminder()` | `this.unschedule("expire", { key: buyer })`. `this.unscheduleAll("expire")` cancels every key of one operation |
|
|
224
235
|
| `registerEffect(name, (context, argumentsValue) => ...)` | `registerEffect(name, (argumentsValue, context) => ...)`. The staged arguments come first |
|
|
225
236
|
| A worker process that never names the actor class | `runtime.register(TicketSale)` before `runtime.run(signal)`. See step 7 |
|
|
226
237
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "solid-objects",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Fix race conditions across Node.js processes: ordered operations, expiring holds, and state that survives a restart, in your SQL database. A SQL-backed virtual actor library for TypeScript and Node.js.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|