Commit a09aa95
fix(example-showcase): route external-datasource fixture through the sqlite fallback (#2890)
`setupShowcaseExternalDatasource` (run from the showcase app's `onEnable`
at boot) built its MANAGED provisioning driver with a raw
`new SqlDriver({ client: 'better-sqlite3' })`. `better-sqlite3` loads its
native addon lazily at first query, so a `NODE_MODULE_VERSION` ABI mismatch
(e.g. after a Node upgrade) threw `ERR_DLOPEN_FAILED` here — which propagated
through `onEnable` -> `AppPlugin.start()` and bricked `plugin.app.com.example.showcase`,
failing `pnpm dev` entirely, even though the default datasource had already
stepped down to wasm SQLite.
Every other sqlite construction site was hoisted onto the shared
`resolveSqliteDriver` native -> wasm -> in-memory step-down (#2229); this
fixture site was missed. Route it through the same helper so a native ABI/load
failure degrades to wasm in dev (real SQL + on-disk persistence) instead of
crashing boot, and still fails closed in production. Adds
`@objectstack/service-datasource` (which exports `resolveSqliteDriver`) as a
dependency of the example.
Claude-Session: https://claude.ai/code/session_01UUWGgTT5s7XgBb2eLtzhfU
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5caeaa4 commit a09aa95
3 files changed
Lines changed: 24 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | 23 | | |
16 | 24 | | |
| |||
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
79 | 93 | | |
80 | 94 | | |
81 | 95 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments