Skip to content

Commit 84e7ba5

Browse files
committed
feat: sqlite v3.50.4 & wa-sqlite v1.0.9
1 parent 5a06fd6 commit 84e7ba5

File tree

10 files changed

+808
-783
lines changed

10 files changed

+808
-783
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@subframe7536/sqlite-wasm",
33
"type": "module",
44
"version": "0.5.6",
5-
"description": "typesafe wa-sqlite wrapper, persist data to IndexedDB or OPFS",
5+
"description": "Typesafe wa-sqlite wrapper, persist data to IndexedDB or OPFS",
66
"author": "subframe7536",
77
"license": "MIT",
88
"repository": "https://github.com/subframe7536/sqlite-wasm",
@@ -79,18 +79,18 @@
7979
"registry": "https://registry.npmjs.org/"
8080
},
8181
"devDependencies": {
82-
"@subframe7536/eslint-config": "^1.3.1",
82+
"@subframe7536/eslint-config": "^1.3.2",
8383
"@subframe7536/type-utils": "^0.2.0",
84-
"@types/node": "^22.15.30",
85-
"bumpp": "^10.1.1",
86-
"eslint": "^9.28.0",
84+
"@types/node": "^22.18.6",
85+
"bumpp": "^10.2.3",
86+
"eslint": "^9.36.0",
8787
"ofetch": "^1.4.1",
88-
"tar": "^7.4.3",
88+
"tar": "^7.5.1",
8989
"tsup": "^8.5.0",
90-
"typescript": "^5.8.3",
90+
"typescript": "^5.9.2",
9191
"uuidv7": "^1.0.2",
92-
"vite": "^6.3.5",
93-
"wa-sqlite": "github:rhashimoto/wa-sqlite#v1.0.8",
92+
"vite": "^7.1.7",
93+
"wa-sqlite": "github:rhashimoto/wa-sqlite#v1.0.9",
9494
"zen-mitt": "^3.1.0"
9595
},
9696
"pnpm": {

playground/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
<link rel="icon" href="data:,">
88
</head>
99
<body>
10-
<button class="main">main</button>
10+
<button class="main-memory">main-memory</button>
11+
<button class="main-idb">main-idb</button>
1112
<button class="worker">worker</button>
1213
<button class="import">import</button>
1314
<button class="importW">import worker</button>

playground/src/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const supportOPFS = await isOpfsSupported()
2424
console.log('support module worker:', supportModuleWorker)
2525
console.log('support IDBBatchAtomicVFS:', supportIDB)
2626
console.log('support OPFSCoopSyncVFS:', supportOPFS)
27-
document.querySelector('.main')?.addEventListener('click', async () => {
27+
document.querySelector('.main-idb')?.addEventListener('click', async () => {
2828
if (!db) {
2929
// const root = await window.showDirectoryPicker()
3030
// db = await initSQLite(useIdbMemoryStorage('test.db', { url }))
@@ -37,6 +37,9 @@ document.querySelector('.main')?.addEventListener('click', async () => {
3737
sqliteModule: db.sqliteModule._sqlite3_libversion_number(),
3838
sql: (await db.run('select sqlite_version() as a'))[0].a,
3939
})
40+
await db.close()
41+
})
42+
document.querySelector('.main-memory')?.addEventListener('click', async () => {
4043
await runSQL((await initSQLite(useMemoryStorage({ url: syncUrl }))).run)
4144
})
4245
document.querySelector('.import')?.addEventListener('click', async () => {
@@ -163,7 +166,7 @@ document.querySelector('.clear')?.addEventListener('click', async () => {
163166
console.log('clear all IndexedDB')
164167
})
165168

166-
function download(buffer: Uint8Array): void {
169+
function download(buffer: Uint8Array<ArrayBuffer>): void {
167170
const blob = new Blob([buffer])
168171
const reader = new FileReader()
169172
reader.readAsDataURL(blob)

0 commit comments

Comments
 (0)