Skip to content

Commit 2329b1e

Browse files
committed
chore(workspace): upgrade deps and improve docs
1 parent 0464764 commit 2329b1e

File tree

24 files changed

+984
-1381
lines changed

24 files changed

+984
-1381
lines changed

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"editor.formatOnSave": false,
77
// Auto fix
88
"editor.codeActionsOnSave": {
9-
"source.fixAll": true,
10-
"source.organizeImports": false
9+
"source.fixAll": "explicit",
10+
"source.organizeImports": "never"
1111
},
1212
// Enable eslint for all supported languages
1313
"eslint.validate": [

package.json

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "module",
44
"version": "0.5.3",
55
"private": true,
6-
"packageManager": "pnpm@8.10.4",
6+
"packageManager": "pnpm@8.12.0",
77
"description": "",
88
"author": {
99
"name": "subframe7536",
@@ -30,32 +30,37 @@
3030
"commit": "czg"
3131
},
3232
"devDependencies": {
33-
"@commitlint/cli": "^18.4.1",
34-
"@commitlint/config-conventional": "^18.4.0",
33+
"@commitlint/cli": "^18.4.3",
34+
"@commitlint/config-conventional": "^18.4.3",
3535
"@sqlite.org/sqlite-wasm": "3.43.2-prebuild1",
36-
"@subframe7536/eslint-config": "^0.4.2",
37-
"@types/better-sqlite3": "^7.6.7",
38-
"@types/node": "^20.9.0",
36+
"@subframe7536/eslint-config": "^0.5.5",
37+
"@types/better-sqlite3": "^7.6.8",
38+
"@types/node": "^20.10.4",
3939
"@types/sql.js": "^1.4.9",
4040
"@vlcn.io/crsqlite-wasm": "^0.15.2",
41-
"better-sqlite3": "^9.1.1",
42-
"bumpp": "^9.2.0",
43-
"cz-git": "^1.7.1",
44-
"czg": "^1.7.1",
45-
"eslint": "^8.53.0",
41+
"better-sqlite3": "^9.2.2",
42+
"bumpp": "^9.2.1",
43+
"cz-git": "^1.8.0",
44+
"czg": "^1.8.0",
45+
"eslint": "^8.55.0",
4646
"husky": "^8.0.3",
4747
"kysely": "^0.26.3",
48-
"lint-staged": "^15.1.0",
49-
"node-sqlite3-wasm": "^0.8.1",
50-
"sql.js": "^1.8.0",
51-
"tsup": "^7.2.0",
52-
"typescript": "^5.2.2",
53-
"vite": "4.5.0",
54-
"vitest": "^0.34.6"
48+
"lint-staged": "^15.2.0",
49+
"node-sqlite3-wasm": "^0.8.4",
50+
"sql.js": "^1.9.0",
51+
"tsup": "^8.0.1",
52+
"typescript": "^5.3.3",
53+
"vite": "^5.0.8",
54+
"vitest": "^1.0.4"
55+
},
56+
"pnpm": {
57+
"overrides": {
58+
"has": "npm:@nolyfill/has@latest"
59+
}
5560
},
5661
"lint-staged": {
5762
"*": [
58-
"eslint --cache --fix"
63+
"eslint . --fix"
5964
]
6065
},
6166
"config": {

packages/dialect-bun-worker/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
[kysely](https://github.com/kysely-org/kysely) dialect for `bun:sqlite`, run sql in worker
44

5-
## install
5+
## Install
66

77
```shell
88
bun install kysely kysely-bun-worker
99
```
1010

11-
## config
11+
## Config
1212

1313
```ts
1414
export type BunWorkerDialectConfig = {
@@ -29,4 +29,4 @@ export type BunWorkerDialectConfig = {
2929
*/
3030
worker?: Worker
3131
}
32-
```
32+
```

packages/dialect-bun-worker/src/driver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class BunWorkerConnection implements DatabaseConnection {
115115
}
116116

117117
streamQuery<R>(): AsyncIterableIterator<QueryResult<R>> {
118-
throw new Error('SQLite driver doesn\'t support streaming')
118+
throw new Error('Bun:sqlite-worker driver doesn\'t support streaming')
119119
}
120120

121121
async executeQuery<R>(compiledQuery: CompiledQuery<unknown>): Promise<QueryResult<R>> {

packages/dialect-sqlite-worker/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# worker dialect
1+
# kysely-sqlite-worker
22

33
[kysely](https://github.com/kysely-org/kysely) dialect for better-sqlite, execute sql in `node:worker_threads`
44

55
the type is also availiable for [`better-sqlite3-multiple-ciphers`](https://github.com/m4heshd/better-sqlite3-multiple-ciphers)
66

7-
## install
7+
## Install
88

99
```shell
1010
pnpm add kysely kysely-sqlite-worker better-sqlite3
1111
```
1212

13-
## config
13+
## Config
1414

1515
```ts
1616
export type SqliteWorkerDialectConfig = {

packages/dialect-sqlite-worker/src/driver.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ export class SqliteWorkerConnection implements DatabaseConnection {
103103
this.emit = emit
104104
}
105105

106-
streamQuery<R>(): AsyncIterableIterator<QueryResult<R>> {
107-
throw new Error('SQLite driver doesn\'t support streaming')
106+
async *streamQuery<R>(): AsyncIterableIterator<QueryResult<R>> {
107+
throw new Error('sqlite-worker driver doesn\'t support streaming')
108108
}
109109

110110
async executeQuery<R>(compiledQuery: CompiledQuery<unknown>): Promise<QueryResult<R>> {

packages/dialect-tauri/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Tauri dialect
1+
# kysely-dialect-tauri
22

33
[kysely](https://github.com/kysely-org/kysely) dialect for [`Tauri`](https://tauri.app/), using [official sql plugin](https://github.com/tauri-apps/plugins-workspace/tree/dev/plugins/sql), support MySQL, PostgreSQL and SQLite
44

5-
## install
5+
## Install
66

77
```shell
88
pnpm add kysely kysely-dialect-tauri @tauri-apps/plugin-sql
99
```
1010

11-
## usage
11+
## Usage
1212

1313
```ts
1414
import { Kysely } from 'kysely'
@@ -23,12 +23,12 @@ const kysely = new Kysely<DB>({
2323
})
2424
```
2525

26-
## config
26+
## Config
2727

2828
```ts
2929
export interface TauriSqlDialectConfig<T extends 'sqlite' | 'mysql' | 'postgres'> {
3030
database: Promisable<TauriSqlDB> | ((prefix: T extends 'sqlite' ? `${T}:` : `${T}://`) => Promisable<TauriSqlDB>)
3131
type: T
3232
onCreateConnection?: (connection: DatabaseConnection) => Promisable<void>
3333
}
34-
```
34+
```

packages/dialect-wasm/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# wasm dialect
1+
# kysely-wasm
22

33
[kysely](https://github.com/kysely-org/kysely) dialect for various SQLite wasm
44

55
no wasm denpendencies, your need to install yourself
66

7-
## install
7+
## Install
88

99
```shell
1010
pnpm add -D kysely kysely-wasm
1111
```
1212

13-
## introduce
13+
## Introduce
1414

1515
there are 6 dialects
1616

@@ -47,17 +47,15 @@ you can choose to use `native file system` as backend storage, which is no need
4747

4848
you can choose to use `IndexedDB` as backend storage
4949

50-
### type
50+
### Type
5151

5252
see in jsdoc
5353

54-
### usage and more details
54+
### Usage and more details
5555

5656
see [test](../../test/dialect-wasm.test.ts) and [playground](../../playground/src/modules)
5757

58-
5958
## TODO
6059

6160
- [ ] add type and use [worker client](https://github.com/tomayac/sqlite-wasm#usage-with-the-bundled-sqliteclient-with-opfs-if-available) for `OfficialWasmDialect`
6261
- [ ] seem to have nodejs support for official wasm: https://github.com/tomayac/sqlite-wasm/blob/main/sqlite-wasm/jswasm/sqlite3-node.mjs
63-
- [ ] add indexeddb support for official wasm, [example](https://sqlite.org/src/file/ext/wasm/api/sqlite3-vfs-opfs.js)

packages/dialect-wasm/src/baseDriver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export abstract class BaseSqliteConnection implements DatabaseConnection {
6767
abstract query(sql: string, params?: any[]): QueryReturn
6868
abstract info(): InfoReturn
6969
streamQuery<R>(): AsyncIterableIterator<QueryResult<R>> {
70-
throw new Error('SQLite driver doesn\'t support streaming')
70+
throw new Error('sqlite-wasm driver doesn\'t support streaming')
7171
}
7272

7373
async executeQuery<R>({ parameters, query, sql }: CompiledQuery<unknown>): Promise<QueryResult<R>> {

packages/dialect-wasm/src/wasqlite-dialect/type.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export interface Sqlite {
88
str_new: (db: number, sql: string) => number
99
str_value: (str: number) => number
1010
str_finish: (str: number) => void
11-
prepare_v2: (db: number, sql: number) => Promise<{ stmt: number; sql: number } | null>
11+
prepare_v2: (db: number, sql: number) => Promise<{ stmt: number, sql: number } | null>
1212
step: (stmt: number) => Promise<number>
1313
finalize: (stmt: number) => Promise<number>
1414
column_names: (stmt: number) => string[]

0 commit comments

Comments
 (0)