firebird-wasm 0.9.0 → 0.10.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 +112 -0
- package/dist/.tsbuildinfo.build +1 -1
- package/dist/browser/engine-transport.d.ts +19 -0
- package/dist/browser/engine-transport.d.ts.map +1 -1
- package/dist/browser/engine-transport.js +67 -0
- package/dist/browser/engine-transport.js.map +1 -1
- package/dist/browser/firebird-browser.d.ts +44 -1
- package/dist/browser/firebird-browser.d.ts.map +1 -1
- package/dist/browser/firebird-browser.js +123 -0
- package/dist/browser/firebird-browser.js.map +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/opfs-fs.d.ts.map +1 -1
- package/dist/browser/opfs-fs.js +18 -7
- package/dist/browser/opfs-fs.js.map +1 -1
- package/dist/browser/shared-transport.d.ts +3 -0
- package/dist/browser/shared-transport.d.ts.map +1 -1
- package/dist/browser/shared-transport.js +9 -0
- package/dist/browser/shared-transport.js.map +1 -1
- package/dist/browser/worker-protocol.d.ts +1 -1
- package/dist/browser/worker-protocol.d.ts.map +1 -1
- package/dist/browser/worker-transport.d.ts +3 -0
- package/dist/browser/worker-transport.d.ts.map +1 -1
- package/dist/browser/worker-transport.js +9 -0
- package/dist/browser/worker-transport.js.map +1 -1
- package/dist/drizzle/index.d.ts +170 -0
- package/dist/drizzle/index.d.ts.map +1 -0
- package/dist/drizzle/index.js +627 -0
- package/dist/drizzle/index.js.map +1 -0
- package/dist/electric/apply.d.ts +1 -0
- package/dist/electric/apply.d.ts.map +1 -1
- package/dist/electric/apply.js +28 -8
- package/dist/electric/apply.js.map +1 -1
- package/dist/electric/index.js +6 -1
- package/dist/electric/index.js.map +1 -1
- package/dist/electric/values.d.ts.map +1 -1
- package/dist/electric/values.js +5 -2
- package/dist/electric/values.js.map +1 -1
- package/dist/electric-server/catalog.d.ts.map +1 -1
- package/dist/electric-server/catalog.js +3 -2
- package/dist/electric-server/catalog.js.map +1 -1
- package/dist/electric-server/index.d.ts +19 -0
- package/dist/electric-server/index.d.ts.map +1 -1
- package/dist/electric-server/index.js +147 -14
- package/dist/electric-server/index.js.map +1 -1
- package/dist/firebird.d.ts +48 -9
- package/dist/firebird.d.ts.map +1 -1
- package/dist/firebird.js +927 -60
- package/dist/firebird.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/kysely/index.d.ts +197 -0
- package/dist/kysely/index.d.ts.map +1 -0
- package/dist/kysely/index.js +777 -0
- package/dist/kysely/index.js.map +1 -0
- package/dist/sql-tag.d.ts +5 -16
- package/dist/sql-tag.d.ts.map +1 -1
- package/dist/sql-tag.js +15 -0
- package/dist/sql-tag.js.map +1 -1
- package/dist/types.d.ts +24 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/wasm/firebird-embedded-st.js +1 -1
- package/dist/wasm/firebird-embedded-st.wasm +0 -0
- package/dist/wasm/firebird-embedded.js +1 -1
- package/dist/wasm/firebird-embedded.wasm +0 -0
- package/dist/wasm-loader.d.ts +16 -0
- package/dist/wasm-loader.d.ts.map +1 -1
- package/dist/wasm-loader.js.map +1 -1
- package/package.json +21 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,118 @@ All notable changes to `firebird-wasm`. This project follows
|
|
|
4
4
|
[semantic versioning](https://semver.org/); while the major version is 0 the
|
|
5
5
|
API may still move between minor releases.
|
|
6
6
|
|
|
7
|
+
## 0.10.1 — 2026-10-25
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Rebuilt WASM binaries in the published npm tarball.** The `0.10.0` npm
|
|
12
|
+
package was packed before the local WASM rebuild ran and shipped the `0.9.0`
|
|
13
|
+
`dist/wasm/firebird-embedded.{js,wasm}` and
|
|
14
|
+
`dist/wasm/firebird-embedded-st.{js,wasm}` binaries (missing
|
|
15
|
+
`_fb_cursor_open` / `_fb_cursor_fetch` / `_fb_cursor_close` for
|
|
16
|
+
`queryStream()`, `DECFLOAT` decoding, and C bridge formatting fast paths).
|
|
17
|
+
`0.10.1` ships the rebuilt `0.10.x` WASM artifacts in both the npm package
|
|
18
|
+
and the GitHub release.
|
|
19
|
+
- **Multi-row `INSERT`s in Kysely and Drizzle now execute via `execBatch`.**
|
|
20
|
+
Multi-row `INSERT` statements without `RETURNING` in `firebird-wasm/kysely`
|
|
21
|
+
and `firebird-wasm/drizzle` now route through `db.execBatch('INSERT INTO …
|
|
22
|
+
VALUES (?, …)', rows)` instead of `INSERT INTO … SELECT ? FROM RDB$DATABASE
|
|
23
|
+
UNION ALL …`, avoiding Firebird SQL error `-804` (`Data type unknown`) on
|
|
24
|
+
untyped `?` parameter markers in `SELECT` projection lists.
|
|
25
|
+
- **WASM build script (`wasm/build.sh`) and CI fixes.** Passes `-C1` to
|
|
26
|
+
`git apply --reverse --check` when verifying already-applied patches, passes
|
|
27
|
+
`-DCMAKE_C_FLAGS="-std=gnu11 -Wno-implicit-int"` during the native host
|
|
28
|
+
bootstrap configure for GCC 15 compatibility, and pins Playwright CI jobs to
|
|
29
|
+
`ubuntu-24.04`.
|
|
30
|
+
|
|
31
|
+
## 0.10.0 — 2026-10-24
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- **Kysely and Drizzle ORM dialects (`firebird-wasm/kysely` and
|
|
36
|
+
`firebird-wasm/drizzle`).** Both run against `FirebirdBrowser` and
|
|
37
|
+
`FirebirdLite`:
|
|
38
|
+
- `firebird-wasm/kysely` exports `FirebirdDialect`, `FirebirdDriver`,
|
|
39
|
+
`FirebirdQueryCompiler`, `FirebirdAdapter`, `FirebirdIntrospector`, and
|
|
40
|
+
`createKysely(db, config?)`. Compiles `?` positional parameters, Firebird
|
|
41
|
+
`OFFSET ? ROWS FETCH NEXT ? ROWS ONLY` pagination (and `ROWS ?` on
|
|
42
|
+
`UPDATE` / `DELETE`), multi-row `INSERT INTO … SELECT … FROM RDB$DATABASE
|
|
43
|
+
UNION ALL …`, `UPDATE OR INSERT INTO … MATCHING (…)` upserts on
|
|
44
|
+
`onConflict`, `INSERT` / `UPDATE` / `DELETE … RETURNING`, Firebird DDL
|
|
45
|
+
(`GENERATED BY DEFAULT AS IDENTITY` before `PRIMARY KEY`, `CREATE GLOBAL
|
|
46
|
+
TEMPORARY TABLE`, `ALTER TABLE … ADD / DROP / ALTER COLUMN … TO …`),
|
|
47
|
+
transactions with Firebird isolation levels and savepoints, cursor
|
|
48
|
+
streaming over `queryStream()`, system-table introspection
|
|
49
|
+
(`RDB$RELATIONS` / `RDB$RELATION_FIELDS`), and bijective lowercase/uppercase
|
|
50
|
+
identifier folding (`identifierCase: 'lower' | 'preserve'`).
|
|
51
|
+
- `firebird-wasm/drizzle` exports `drizzle(db, config?)`,
|
|
52
|
+
`FirebirdDrizzleDialect`, `FirebirdDrizzleSession`,
|
|
53
|
+
`FirebirdDrizzlePreparedQuery`, `FirebirdDrizzleTransaction`,
|
|
54
|
+
`FirebirdDrizzleDatabase`, `firebirdTable`, column builders, and query
|
|
55
|
+
operators. Supports relational queries (`db.query.*.findMany()`),
|
|
56
|
+
multi-row inserts, omitted identity/default columns, `onConflictDoUpdate`
|
|
57
|
+
via `UPDATE OR INSERT … MATCHING`, `RETURNING`, `db.$count()`,
|
|
58
|
+
transactions, and nested savepoints.
|
|
59
|
+
- **Cursor / streaming query API (`queryStream()`).** `queryStream(sql,
|
|
60
|
+
params?, options?)` on `FirebirdBrowser`, `FirebirdBrowserTransaction`,
|
|
61
|
+
`FirebirdLite`, and `FirebirdTransaction` (including `sql` tagged-template
|
|
62
|
+
overloads) returns an `AsyncIterable<QueryResult<T>>` yielding batches of
|
|
63
|
+
`batchSize` rows (default `500`) over an open cursor (`_fb_cursor_open`,
|
|
64
|
+
`_fb_cursor_fetch`, `_fb_cursor_close` in the WASM C bridge;
|
|
65
|
+
`ResultSet.fetch({ fetchSize })` on Node). Breaking out of `for await` early
|
|
66
|
+
closes the cursor and finishes its autocommit transaction immediately without
|
|
67
|
+
fetching the rest of the table.
|
|
68
|
+
- **Node backend `types` and `FieldInfo` parity.** `FirebirdLite` and
|
|
69
|
+
`FirebirdTransaction` now accept `types: { bigint, dates, binary, parsers,
|
|
70
|
+
serializers }` at database construction and per-query (`QueryOptions.types`),
|
|
71
|
+
populate full `FieldInfo` metadata (`type`, `typeName`, `subType`, `scale`,
|
|
72
|
+
`length`, `nullable`) from the native statement metadata, and normalize wire
|
|
73
|
+
values (`BIGINT`, `INT128`, scaled `NUMERIC` / `DECIMAL`, `DATE`, `TIME`,
|
|
74
|
+
`TIMESTAMP`, `TIME WITH TIME ZONE`, `TIMESTAMP WITH TIME ZONE`, `DECFLOAT`,
|
|
75
|
+
text/binary `BLOB`s, and `OCTETS`) to match `FirebirdBrowser`.
|
|
76
|
+
- **Shape server `replica=full`, `applyWrite`, `DECFLOAT`, and batched change
|
|
77
|
+
fetches.**
|
|
78
|
+
- `firebird-wasm/electric-server` now supports `?replica=full`: the update
|
|
79
|
+
and delete triggers record prior column values in `OLD_VALUES` on
|
|
80
|
+
`ELECTRIC_CHANGES`, and `replica=full` responses include `old_value` on
|
|
81
|
+
updates (changed columns) and deletes (all non-key columns).
|
|
82
|
+
- `server.applyWrite(write)` executes a `PendingWrite` from
|
|
83
|
+
`createWriteQueue` directly against the Firebird source table in one
|
|
84
|
+
transaction and returns `{ txid }` for immediate write-queue confirmation.
|
|
85
|
+
- `changesAfter` batches row fetches for changed keys with `IN (?, …)` in
|
|
86
|
+
chunks of 200 instead of issuing one `SELECT` per changed key.
|
|
87
|
+
- `DECFLOAT(16)` and `DECFLOAT(34)` (`SQL_DEC16 = 260`, `SQL_DEC34 = 262`)
|
|
88
|
+
are decoded in the C bridge, mapped in `firebird-wasm/electric-server`, and
|
|
89
|
+
accepted by `firebird-wasm/electric`.
|
|
90
|
+
- **Native `IBatch` in `FirebirdLite.execBatch` (`node-firebird-drivers#178`).**
|
|
91
|
+
When `statementHandle.createBatchAsync` is available on the native client
|
|
92
|
+
(merged upstream in [`asfernandes/node-firebird-drivers#178`](https://github.com/asfernandes/node-firebird-drivers/pull/178)),
|
|
93
|
+
`FirebirdLite.execBatch` and `FirebirdTransaction.execBatch` execute batches
|
|
94
|
+
through Firebird 4.0+'s `IBatch` API (including `addBlobAsync` with
|
|
95
|
+
`TAG_BLOB_POLICY = BLOB_ID_ENGINE` so `BLOB` parameters take no per-row round
|
|
96
|
+
trips), falling back automatically to `EXECUTE BLOCK` on older drivers or
|
|
97
|
+
Firebird 3.0 servers.
|
|
98
|
+
|
|
99
|
+
### Changed
|
|
100
|
+
|
|
101
|
+
- **Zero-copy OPFS reads and writes on the default single-threaded build.**
|
|
102
|
+
When `HEAPU8.buffer` is a plain `ArrayBuffer` (`firebird-embedded-st`),
|
|
103
|
+
`mountOpfs` passes the WASM heap subarray directly to
|
|
104
|
+
`FileSystemSyncAccessHandle.read` and `.write` without allocating or copying
|
|
105
|
+
through an intermediate scratch buffer.
|
|
106
|
+
- **Faster C bridge value formatting.** `SQL_FLOAT` uses `std::to_chars`,
|
|
107
|
+
offset-based `SQL_TIME_TZ` and `SQL_TIMESTAMP_TZ` (`0..2878`) are decoded in
|
|
108
|
+
C without `IUtil`, and `appendScaledDecimal` writes directly into the JSON
|
|
109
|
+
buffer without temporary string shifts.
|
|
110
|
+
- **Incremental WASM rebuilds, GCC 15 host bootstrap, and CI verification.**
|
|
111
|
+
`wasm/build.sh` preserves the timestamps of unchanged `autoconfig.h`,
|
|
112
|
+
`parse.h` / `parse.cpp`, and `epp-generated` outputs across native bootstrap
|
|
113
|
+
rebuilds, passes `-DCMAKE_C_FLAGS="-std=gnu11 -Wno-implicit-int"` so
|
|
114
|
+
Firebird's `Configure.cmake` checks succeed under GCC 15 (`-std=gnu23`),
|
|
115
|
+
checks already-applied patches with `-C1`, and `build-wasm.yml` runs an
|
|
116
|
+
incremental rebuild check after wiping `build-native-config` and
|
|
117
|
+
`.wasm-patches-applied` and touching `fb_wasm_api.cpp`.
|
|
118
|
+
|
|
7
119
|
## 0.9.0 — 2026-10-19
|
|
8
120
|
|
|
9
121
|
### Changed
|