@pikku/kysely-node-sqlite 0.12.9 → 0.12.10

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 (3) hide show
  1. package/package.json +18 -12
  2. package/CHANGELOG.md +0 -200
  3. package/run-tests.sh +0 -68
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/kysely-node-sqlite",
3
- "version": "0.12.9",
3
+ "version": "0.12.10",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/pikkujs/pikku.git",
@@ -15,29 +15,35 @@
15
15
  "scripts": {
16
16
  "tsc": "tsc",
17
17
  "ncu": "npx npm-check-updates",
18
- "build": "tsc -b",
18
+ "build": "bun run clean && tsc -b",
19
19
  "test": "bash run-tests.sh",
20
20
  "test:watch": "bash run-tests.sh --watch",
21
21
  "test:coverage": "bash run-tests.sh --coverage",
22
- "prepublishOnly": "bun run build"
22
+ "prepublishOnly": "bun run build",
23
+ "clean": "rm -rf dist tsconfig.tsbuildinfo"
23
24
  },
24
25
  "engines": {
25
26
  "node": ">=22.10"
26
27
  },
27
28
  "dependencies": {
28
- "@pikku/kysely": "^0.13.25",
29
- "@pikku/kysely-sqlite": "^0.12.15",
30
- "kysely": "^0.29.5"
29
+ "@pikku/kysely": "^0.13.39",
30
+ "@pikku/kysely-sqlite": "^0.12.18",
31
+ "kysely": "^0.29.6"
31
32
  },
32
33
  "peerDependencies": {
33
- "@pikku/core": "^0.12.124"
34
+ "@pikku/core": "^0.12.144"
34
35
  },
35
36
  "devDependencies": {
36
- "@pikku/core": "^0.12.124",
37
- "@types/node": "^22",
38
- "tsx": "^4.23.12"
37
+ "@pikku/core": "^0.12.144",
38
+ "@types/node": "^26",
39
+ "tsx": "^4.23.15"
39
40
  },
40
41
  "exports": {
41
- ".": "./dist/src/index.js"
42
- }
42
+ ".": "./dist/src/index.js",
43
+ "./package.json": "./package.json"
44
+ },
45
+ "files": [
46
+ "dist",
47
+ "!dist/**/*.tsbuildinfo"
48
+ ]
43
49
  }
package/CHANGELOG.md DELETED
@@ -1,200 +0,0 @@
1
- # @pikku/kysely-node-sqlite
2
-
3
- ## 0.12.9
4
-
5
- ### Patch Changes
6
-
7
- - 1fe79bc: A standalone build of a SQLite app now ships its `db.sqliteExtensions` (sqlite-vec's vec0 by default) inside the artifact, so a migration or query that uses them works in production the way it does under `pikku dev`. The node bundle loads them from `sqlite-extensions/` beside itself; a compiled bun binary embeds them and writes them out under `$PIKKU_DATA_DIR/.pikku-sqlite-extensions/` on start. The libraries are the build machine's, so an extension that cannot be resolved there fails the build; `[]` builds without them.
8
-
9
- `createNodeSqliteKysely` and `createBunSqliteKysely` take an `extensions` list of library paths to load into the connection.
10
-
11
- - Updated dependencies [1394385]
12
- - Updated dependencies [7740547]
13
- - @pikku/core@0.12.124
14
- - @pikku/kysely-sqlite@0.12.15
15
-
16
- ## 0.12.8
17
-
18
- ### Patch Changes
19
-
20
- - 4c7a1b5: Run the monorepo's own scripts through bun instead of yarn. What moves is the
21
- package manager each package's `prepublishOnly` and build scripts invoke, plus
22
- the two manifest fixes bun needs to resolve the tree: `uWebSockets.js` is
23
- declared with an explicit `github:` specifier, and `@pikku/uws-handler` marks
24
- its `uWebSockets.js` peer optional so a bun install of a consumer that brings
25
- its own uWS app does not try to fetch it from the registry.
26
-
27
- Three published behaviours change, all of them cases where an isolated
28
- `node_modules` or bun as the runtime had been papered over by yarn's hoisting:
29
-
30
- - `@pikku/migrator-sql` turns foreign keys on when it opens a sqlite database
31
- through bun. `node:sqlite` enforces them by default and `bun:sqlite` does not,
32
- which silently turned every `ON DELETE CASCADE` into a no-op under
33
- `bunx --bun pikku`.
34
- - `@pikku/cli` resolves a deploy provider against the project being deployed
35
- rather than against wherever the CLI itself is installed, which is what its
36
- own "is not installed" error asks the user to arrange.
37
- - `@pikku/cli` treats a specifier a runtime hands straight back — bun does this
38
- for the modules it implements itself — as not resolved from the project, so
39
- it falls back rather than loading the runtime's own copy.
40
-
41
- - Updated dependencies [4c7a1b5]
42
- - @pikku/core@0.12.108
43
- - @pikku/kysely@0.13.25
44
- - @pikku/kysely-sqlite@0.12.14
45
-
46
- ## 0.12.7
47
-
48
- ### Patch Changes
49
-
50
- - 746ed6a: fix: one coercion plugin, not three
51
-
52
- The Kysely coercion plugin existed in three copies — the CLI's local database,
53
- `@pikku/kysely-node-sqlite` and `@pikku/kysely-bun-sqlite` — and all three had
54
- drifted apart. Only the CLI's resolved a column against the tables the query
55
- actually named, so two tables that disagree on the kind of a same-named column
56
- coerced correctly in local development and silently did not at runtime; only
57
- bun's dropped a genuinely ambiguous column instead of letting the last table
58
- processed win.
59
-
60
- The single implementation now lives in `@pikku/kysely`, which all three already
61
- depended on, and keeps both behaviours: table-qualified resolution first, an
62
- ambiguity-safe bare-name fallback second.
63
-
64
- `ColumnKind` — the value type of the generated `coercion.gen.ts` — is
65
- `'date' | 'bool' | 'json'`. The CLI's fourth member, `uuid`, was never a
66
- coercion kind: the codegen excludes it from the map by construction, because a
67
- UUID is a string in both Postgres and SQLite. It is now `AnnotationKind` in the
68
- CLI, the union a column may declare in `db/annotations.ts`, of which
69
- `ColumnKind` is the coercible subset.
70
-
71
- `@pikku/cli` also drops its unused dependency on the Node-only
72
- `@pikku/kysely-node-sqlite`.
73
-
74
- - Updated dependencies [5a1a962]
75
- - Updated dependencies [746ed6a]
76
- - @pikku/core@0.12.86
77
- - @pikku/kysely@0.13.18
78
-
79
- ## 0.12.6
80
-
81
- ### Patch Changes
82
-
83
- - 6eef0a0: Bump every dependency to its latest compatible minor/patch across the monorepo.
84
- - Updated dependencies [7722ceb]
85
- - Updated dependencies [375c1ff]
86
- - Updated dependencies [02a70cd]
87
- - Updated dependencies [aeef159]
88
- - Updated dependencies [a281de6]
89
- - Updated dependencies [266e3bc]
90
- - Updated dependencies [02a70cd]
91
- - Updated dependencies [786dae5]
92
- - Updated dependencies [6eef0a0]
93
- - Updated dependencies [3561d67]
94
- - Updated dependencies [a91c433]
95
- - Updated dependencies [02a70cd]
96
- - Updated dependencies [9537f74]
97
- - Updated dependencies [2b57ca8]
98
- - Updated dependencies [266e3bc]
99
- - Updated dependencies [9fce0f1]
100
- - Updated dependencies [83683a0]
101
- - Updated dependencies [456c88b]
102
- - Updated dependencies [456c88b]
103
- - Updated dependencies [c127273]
104
- - @pikku/core@0.12.85
105
- - @pikku/kysely@0.13.17
106
- - @pikku/kysely-sqlite@0.12.13
107
-
108
- ## 0.12.5
109
-
110
- ### Patch Changes
111
-
112
- - fd9d834: Stop publishing internals that only their own package or file used. The declarations stay; only the entrypoint re-export is removed, so nothing that imported a name from where it is declared is affected.
113
- - Updated dependencies [063f43a]
114
- - Updated dependencies [ce66bf8]
115
- - Updated dependencies [d0307a8]
116
- - Updated dependencies [ce66bf8]
117
- - Updated dependencies [3ad2131]
118
- - Updated dependencies [b930dca]
119
- - Updated dependencies [b95e77d]
120
- - Updated dependencies [fd9d834]
121
- - Updated dependencies [8978fbd]
122
- - @pikku/core@0.12.82
123
- - @pikku/kysely@0.13.15
124
- - @pikku/kysely-sqlite@0.12.11
125
-
126
- ## 0.12.4
127
-
128
- ### Patch Changes
129
-
130
- - 9d62571: Make user-defined SQL functions an explicit, checked capability of the SQLite drivers.
131
-
132
- `node:sqlite` can register scalar UDFs (`db.function()`); `bun:sqlite` cannot. Until now
133
- neither driver mentioned that, so an app that registered a UDF by reaching for the raw
134
- connection worked on Node and, on bun, failed as `no such function: …` from whichever
135
- query used it — typically one endpoint breaking in production while everything else
136
- looked healthy.
137
-
138
- Both drivers now export `registerSqliteFunctions(db, functions)` and accept a
139
- `functions` option on `createNodeSqliteKysely` / `createBunSqliteKysely`. The Node
140
- implementation registers them as deterministic; the bun implementation throws
141
- `SqliteFunctionsUnsupportedError` — exported from `@pikku/kysely-sqlite`, and naming
142
- every function requested — so the incompatibility surfaces at wiring time with a message
143
- saying what to do about it.
144
-
145
- - Updated dependencies [32277d5]
146
- - Updated dependencies [ea8aabf]
147
- - Updated dependencies [33e96ab]
148
- - Updated dependencies [fd72e58]
149
- - Updated dependencies [cabd9dc]
150
- - Updated dependencies [fd72e58]
151
- - Updated dependencies [fd72e58]
152
- - Updated dependencies [894b2f8]
153
- - Updated dependencies [dd19aa7]
154
- - Updated dependencies [50ec500]
155
- - Updated dependencies [9d62571]
156
- - @pikku/core@0.12.75
157
- - @pikku/kysely@0.13.8
158
- - @pikku/kysely-sqlite@0.12.10
159
-
160
- ## 0.12.3
161
-
162
- ### Patch Changes
163
-
164
- - 41ce2cb: Upgrade to TypeScript 6 and raise the minimum Node.js version to 22.
165
-
166
- All packages now build against `typescript@^6.0.3` and declare `engines.node >= 22`. Internal tooling (`ts-json-schema-generator`, `zod-to-ts`) was bumped to TypeScript 6-compatible releases.
167
-
168
- - Updated dependencies [241e6cf]
169
- - Updated dependencies [41ce2cb]
170
- - @pikku/kysely@0.13.0
171
- - @pikku/core@0.12.44
172
- - @pikku/kysely-sqlite@0.12.7
173
-
174
- ## 0.12.2
175
-
176
- ### Patch Changes
177
-
178
- - 34f254e: Bump the `kysely` dependency range to `^0.29.0` so it dedupes onto a single
179
- copy alongside Better Auth (which bundles kysely 0.29.x), avoiding two
180
- incompatible `Kysely` classes (the `#private` brand mismatch) when both pikku's
181
- adapters and Better Auth share a database connection.
182
-
183
- kysely 0.29 is ESM-only, which the unmaintained `kysely-plugin-serialize`
184
- (no `exports` map, CommonJS build) cannot import. Its `SerializePlugin` is now
185
- maintained directly in `@pikku/kysely` and re-exported, and the external
186
- dependency is dropped from `@pikku/kysely`, `@pikku/kysely-sqlite`, and
187
- `@pikku/cloudflare`.
188
-
189
- - Updated dependencies [6565b97]
190
- - Updated dependencies [34f254e]
191
- - @pikku/kysely@0.12.16
192
- - @pikku/kysely-sqlite@0.12.6
193
-
194
- ## 0.12.1
195
-
196
- ### Patch Changes
197
-
198
- - 9060165: New `@pikku/kysely-node-sqlite` provides a Kysely dialect and migrator for Node's built-in `node:sqlite`. `@pikku/kysely-sqlite` adds a `LibsqlWebDialect` for running Kysely against Cloudflare Workers and Turso databases over HTTP.
199
- - Updated dependencies [9060165]
200
- - @pikku/kysely-sqlite@0.12.5
package/run-tests.sh DELETED
@@ -1,68 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Enable nullglob to handle cases where no files match the pattern
4
- shopt -s nullglob
5
-
6
- # Initialize variables for options
7
- watch_mode=false
8
- coverage_mode=false
9
-
10
- # Parse command-line options
11
- while [[ $# -gt 0 ]]; do
12
- case $1 in
13
- --watch)
14
- watch_mode=true
15
- shift
16
- ;;
17
- --coverage)
18
- coverage_mode=true
19
- shift
20
- ;;
21
- *)
22
- echo "Unknown option: $1"
23
- exit 1
24
- ;;
25
- esac
26
- done
27
-
28
- # Define the pattern to match your test files
29
- pattern="src/*.test.ts"
30
-
31
- # Expand the pattern into an array of files
32
- files=($(find src -type f -name "*.test.ts"))
33
-
34
- # Check if any files matched the pattern
35
- if [ ${#files[@]} -eq 0 ]; then
36
- echo "No test files found matching pattern: $pattern"
37
- if [ "${STRICT_TEST_DISCOVERY}" = "1" ]; then
38
- exit 1
39
- fi
40
- exit 0
41
- fi
42
-
43
- # Construct the bun command
44
- #
45
- # --parallel gives every test file its own worker process, which is what node's
46
- # `--test` did. Several suites keep module-level caches (a TypeScript program, a
47
- # temp fixture directory) that a shared process would leak between files.
48
- #
49
- # --timeout because bun caps a test at 5s by default where node had no cap, and
50
- # the suites that build real TypeScript programs run well past that.
51
- bun_cmd=(bun test --parallel --timeout 120000)
52
-
53
- # Append options based on flags
54
- if [ "$watch_mode" = true ]; then
55
- # --watch reruns in one process; parallel workers have nothing to watch.
56
- bun_cmd=(bun test --watch --timeout 120000)
57
- fi
58
-
59
- if [ "$coverage_mode" = true ]; then
60
- # --coverage-dir=. keeps lcov.info at the package root: CI merges every
61
- # package's report by prefixing its SF paths with the file's own directory,
62
- # so a nested coverage/ directory would re-root them one level too deep.
63
- bun_cmd+=(--coverage --coverage-reporter=lcov --coverage-reporter=text --coverage-dir=.)
64
- export PIKKU_TEST_COVERAGE=1
65
- fi
66
-
67
- # Execute the bun command with the expanded list of files
68
- "${bun_cmd[@]}" "${files[@]}"