Skip to content

Commit fa761df

Browse files
committed
Release v3.49.0
1 parent 7c1b309 commit fa761df

9 files changed

+213
-158
lines changed

Diff for: index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ declare class Database {
11631163
*/
11641164
declare class JsStorageDb extends Database {
11651165
/** Create a new kvvfs-backed database in local or session storage. */
1166-
constructor(options?: { filename?: 'local' | 'session'; flags?: string; });
1166+
constructor(options?: { filename?: 'local' | 'session'; flags?: string });
11671167
constructor(mode: 'local' | 'session');
11681168

11691169
/** Returns an _estimate_ of how many bytes of storage are used by the kvvfs. */

Diff for: package-lock.json

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sqlite.org/sqlite-wasm",
3-
"version": "3.48.0-build4",
3+
"version": "3.49.0-build1",
44
"description": "SQLite Wasm conveniently wrapped as an ES Module.",
55
"keywords": [
66
"sqlite",
@@ -62,7 +62,7 @@
6262
"node-fetch": "^3.3.2",
6363
"prettier": "^3.4.2",
6464
"prettier-plugin-jsdoc": "^1.3.2",
65-
"publint": "^0.3.2",
65+
"publint": "^0.3.4",
6666
"shx": "^0.3.4",
6767
"typescript": "^5.7.3"
6868
}

Diff for: sqlite-wasm/jswasm/sqlite3-bundler-friendly.mjs

+47-36
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
/*
2727
** This code was built from sqlite3 version...
2828
**
29-
** SQLITE_VERSION "3.48.0"
30-
** SQLITE_VERSION_NUMBER 3048000
31-
** SQLITE_SOURCE_ID "2025-01-14 11:05:00 d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010"
29+
** SQLITE_VERSION "3.49.0"
30+
** SQLITE_VERSION_NUMBER 3049000
31+
** SQLITE_SOURCE_ID "2025-02-06 11:55:18 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde"
3232
**
3333
** Using the Emscripten SDK version 3.1.70.
3434
*/
@@ -5127,8 +5127,7 @@ var sqlite3InitModule = (() => {
51275127

51285128
run();
51295129

5130-
if (!Module.postRun) Module.postRun = [];
5131-
Module.postRun.push(function (Module) {
5130+
Module.runSQLite3PostLoadInit = function (EmscriptenModule) {
51325131
'use strict';
51335132

51345133
'use strict';
@@ -5941,26 +5940,6 @@ var sqlite3InitModule = (() => {
59415940
}
59425941

59435942
capi.sqlite3_db_config = function (pDb, op, ...args) {
5944-
if (!this.s) {
5945-
this.s = wasm.xWrap('sqlite3__wasm_db_config_s', 'int', [
5946-
'sqlite3*',
5947-
'int',
5948-
'string:static',
5949-
]);
5950-
this.pii = wasm.xWrap('sqlite3__wasm_db_config_pii', 'int', [
5951-
'sqlite3*',
5952-
'int',
5953-
'*',
5954-
'int',
5955-
'int',
5956-
]);
5957-
this.ip = wasm.xWrap('sqlite3__wasm_db_config_ip', 'int', [
5958-
'sqlite3*',
5959-
'int',
5960-
'int',
5961-
'*',
5962-
]);
5963-
}
59645943
switch (op) {
59655944
case capi.SQLITE_DBCONFIG_ENABLE_FKEY:
59665945
case capi.SQLITE_DBCONFIG_ENABLE_TRIGGER:
@@ -5980,10 +5959,37 @@ var sqlite3InitModule = (() => {
59805959
case capi.SQLITE_DBCONFIG_TRUSTED_SCHEMA:
59815960
case capi.SQLITE_DBCONFIG_STMT_SCANSTATUS:
59825961
case capi.SQLITE_DBCONFIG_REVERSE_SCANORDER:
5962+
case capi.SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE:
5963+
case capi.SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE:
5964+
case capi.SQLITE_DBCONFIG_ENABLE_COMMENTS:
5965+
if (!this.ip) {
5966+
this.ip = wasm.xWrap('sqlite3__wasm_db_config_ip', 'int', [
5967+
'sqlite3*',
5968+
'int',
5969+
'int',
5970+
'*',
5971+
]);
5972+
}
59835973
return this.ip(pDb, op, args[0], args[1] || 0);
59845974
case capi.SQLITE_DBCONFIG_LOOKASIDE:
5975+
if (!this.pii) {
5976+
this.pii = wasm.xWrap('sqlite3__wasm_db_config_pii', 'int', [
5977+
'sqlite3*',
5978+
'int',
5979+
'*',
5980+
'int',
5981+
'int',
5982+
]);
5983+
}
59855984
return this.pii(pDb, op, args[0], args[1], args[2]);
59865985
case capi.SQLITE_DBCONFIG_MAINDBNAME:
5986+
if (!this.s) {
5987+
this.s = wasm.xWrap('sqlite3__wasm_db_config_s', 'int', [
5988+
'sqlite3*',
5989+
'int',
5990+
'string:static',
5991+
]);
5992+
}
59875993
return this.s(pDb, op, args[0]);
59885994
default:
59895995
return capi.SQLITE_MISUSE;
@@ -8276,18 +8282,21 @@ var sqlite3InitModule = (() => {
82768282
'*',
82778283
],
82788284
],
8285+
82798286
[
82808287
'sqlite3_set_auxdata',
82818288
undefined,
82828289
[
82838290
'sqlite3_context*',
82848291
'int',
82858292
'*',
8286-
new wasm.xWrap.FuncPtrAdapter({
8287-
name: 'xDestroyAuxData',
8288-
signature: 'v(*)',
8289-
contextKey: (argv, argIndex) => argv[0],
8290-
}),
8293+
true
8294+
? '*'
8295+
: new wasm.xWrap.FuncPtrAdapter({
8296+
name: 'xDestroyAuxData',
8297+
signature: 'v(p)',
8298+
contextKey: (argv, argIndex) => argv[0],
8299+
}),
82918300
],
82928301
],
82938302
['sqlite3_shutdown', undefined],
@@ -10156,11 +10165,11 @@ var sqlite3InitModule = (() => {
1015610165

1015710166
globalThis.sqlite3ApiBootstrap.initializers.push(function (sqlite3) {
1015810167
sqlite3.version = {
10159-
libVersion: '3.48.0',
10160-
libVersionNumber: 3048000,
10168+
libVersion: '3.49.0',
10169+
libVersionNumber: 3049000,
1016110170
sourceId:
10162-
'2025-01-14 11:05:00 d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010',
10163-
downloadVersion: 3480000,
10171+
'2025-02-06 11:55:18 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde',
10172+
downloadVersion: 3490000,
1016410173
};
1016510174
});
1016610175

@@ -13883,7 +13892,7 @@ var sqlite3InitModule = (() => {
1388313892
'It must be called manually.',
1388413893
);
1388513894
}
13886-
});
13895+
};
1388713896

1388813897
moduleRtn = readyPromise;
1388913898

@@ -13928,13 +13937,15 @@ const toExportForESM = (function () {
1392813937
globalThis.sqlite3InitModule = function ff(...args) {
1392913938
return originalInit(...args)
1393013939
.then((EmscriptenModule) => {
13940+
EmscriptenModule.runSQLite3PostLoadInit(EmscriptenModule);
1393113941
const s = EmscriptenModule.sqlite3;
1393213942
s.scriptInfo = initModuleState;
1393313943

1393413944
if (ff.__isUnderTest) s.__isUnderTest = true;
1393513945
const f = s.asyncPostInit;
1393613946
delete s.asyncPostInit;
13937-
return f();
13947+
const rv = f();
13948+
return rv;
1393813949
})
1393913950
.catch((e) => {
1394013951
console.error('Exception loading sqlite3 module:', e);

Diff for: sqlite-wasm/jswasm/sqlite3-node.mjs

+47-36
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
/*
2727
** This code was built from sqlite3 version...
2828
**
29-
** SQLITE_VERSION "3.48.0"
30-
** SQLITE_VERSION_NUMBER 3048000
31-
** SQLITE_SOURCE_ID "2025-01-14 11:05:00 d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010"
29+
** SQLITE_VERSION "3.49.0"
30+
** SQLITE_VERSION_NUMBER 3049000
31+
** SQLITE_SOURCE_ID "2025-02-06 11:55:18 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde"
3232
**
3333
** Using the Emscripten SDK version 3.1.70.
3434
*/
@@ -5147,8 +5147,7 @@ var sqlite3InitModule = (() => {
51475147

51485148
run();
51495149

5150-
if (!Module.postRun) Module.postRun = [];
5151-
Module.postRun.push(function (Module) {
5150+
Module.runSQLite3PostLoadInit = function (EmscriptenModule) {
51525151
'use strict';
51535152

51545153
'use strict';
@@ -5961,26 +5960,6 @@ var sqlite3InitModule = (() => {
59615960
}
59625961

59635962
capi.sqlite3_db_config = function (pDb, op, ...args) {
5964-
if (!this.s) {
5965-
this.s = wasm.xWrap('sqlite3__wasm_db_config_s', 'int', [
5966-
'sqlite3*',
5967-
'int',
5968-
'string:static',
5969-
]);
5970-
this.pii = wasm.xWrap('sqlite3__wasm_db_config_pii', 'int', [
5971-
'sqlite3*',
5972-
'int',
5973-
'*',
5974-
'int',
5975-
'int',
5976-
]);
5977-
this.ip = wasm.xWrap('sqlite3__wasm_db_config_ip', 'int', [
5978-
'sqlite3*',
5979-
'int',
5980-
'int',
5981-
'*',
5982-
]);
5983-
}
59845963
switch (op) {
59855964
case capi.SQLITE_DBCONFIG_ENABLE_FKEY:
59865965
case capi.SQLITE_DBCONFIG_ENABLE_TRIGGER:
@@ -6000,10 +5979,37 @@ var sqlite3InitModule = (() => {
60005979
case capi.SQLITE_DBCONFIG_TRUSTED_SCHEMA:
60015980
case capi.SQLITE_DBCONFIG_STMT_SCANSTATUS:
60025981
case capi.SQLITE_DBCONFIG_REVERSE_SCANORDER:
5982+
case capi.SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE:
5983+
case capi.SQLITE_DBCONFIG_ENABLE_ATTACH_WRITE:
5984+
case capi.SQLITE_DBCONFIG_ENABLE_COMMENTS:
5985+
if (!this.ip) {
5986+
this.ip = wasm.xWrap('sqlite3__wasm_db_config_ip', 'int', [
5987+
'sqlite3*',
5988+
'int',
5989+
'int',
5990+
'*',
5991+
]);
5992+
}
60035993
return this.ip(pDb, op, args[0], args[1] || 0);
60045994
case capi.SQLITE_DBCONFIG_LOOKASIDE:
5995+
if (!this.pii) {
5996+
this.pii = wasm.xWrap('sqlite3__wasm_db_config_pii', 'int', [
5997+
'sqlite3*',
5998+
'int',
5999+
'*',
6000+
'int',
6001+
'int',
6002+
]);
6003+
}
60056004
return this.pii(pDb, op, args[0], args[1], args[2]);
60066005
case capi.SQLITE_DBCONFIG_MAINDBNAME:
6006+
if (!this.s) {
6007+
this.s = wasm.xWrap('sqlite3__wasm_db_config_s', 'int', [
6008+
'sqlite3*',
6009+
'int',
6010+
'string:static',
6011+
]);
6012+
}
60076013
return this.s(pDb, op, args[0]);
60086014
default:
60096015
return capi.SQLITE_MISUSE;
@@ -8296,18 +8302,21 @@ var sqlite3InitModule = (() => {
82968302
'*',
82978303
],
82988304
],
8305+
82998306
[
83008307
'sqlite3_set_auxdata',
83018308
undefined,
83028309
[
83038310
'sqlite3_context*',
83048311
'int',
83058312
'*',
8306-
new wasm.xWrap.FuncPtrAdapter({
8307-
name: 'xDestroyAuxData',
8308-
signature: 'v(*)',
8309-
contextKey: (argv, argIndex) => argv[0],
8310-
}),
8313+
true
8314+
? '*'
8315+
: new wasm.xWrap.FuncPtrAdapter({
8316+
name: 'xDestroyAuxData',
8317+
signature: 'v(p)',
8318+
contextKey: (argv, argIndex) => argv[0],
8319+
}),
83118320
],
83128321
],
83138322
['sqlite3_shutdown', undefined],
@@ -10176,11 +10185,11 @@ var sqlite3InitModule = (() => {
1017610185

1017710186
globalThis.sqlite3ApiBootstrap.initializers.push(function (sqlite3) {
1017810187
sqlite3.version = {
10179-
libVersion: '3.48.0',
10180-
libVersionNumber: 3048000,
10188+
libVersion: '3.49.0',
10189+
libVersionNumber: 3049000,
1018110190
sourceId:
10182-
'2025-01-14 11:05:00 d2fe6b05f38d9d7cd78c5d252e99ac59f1aea071d669830c1ffe4e8966e84010',
10183-
downloadVersion: 3480000,
10191+
'2025-02-06 11:55:18 4a7dd425dc2a0e5082a9049c9b4a9d4f199a71583d014c24b4cfe276c5a77cde',
10192+
downloadVersion: 3490000,
1018410193
};
1018510194
});
1018610195

@@ -11943,7 +11952,7 @@ var sqlite3InitModule = (() => {
1194311952
'It must be called manually.',
1194411953
);
1194511954
}
11946-
});
11955+
};
1194711956

1194811957
moduleRtn = readyPromise;
1194911958

@@ -11988,13 +11997,15 @@ const toExportForESM = (function () {
1198811997
globalThis.sqlite3InitModule = function ff(...args) {
1198911998
return originalInit(...args)
1199011999
.then((EmscriptenModule) => {
12000+
EmscriptenModule.runSQLite3PostLoadInit(EmscriptenModule);
1199112001
const s = EmscriptenModule.sqlite3;
1199212002
s.scriptInfo = initModuleState;
1199312003

1199412004
if (ff.__isUnderTest) s.__isUnderTest = true;
1199512005
const f = s.asyncPostInit;
1199612006
delete s.asyncPostInit;
11997-
return f();
12007+
const rv = f();
12008+
return rv;
1199812009
})
1199912010
.catch((e) => {
1200012011
console.error('Exception loading sqlite3 module:', e);

0 commit comments

Comments
 (0)