Correct the URL for loading sqlite3-worker1-bundler-friendly.mjs from sqlite3-worker1-promiser-bundler-friendly.js, so that the promiser can be used in bundler-using environments. Problem reported via email.

FossilOrigin-Name: 753a75218913c3b9c7ec5438387107369c34d1775d68b04d19ae18197e558605
This commit is contained in:
stephan 2023-11-22 17:11:39 +00:00
parent d9f3d6d753
commit c0314bc01d
3 changed files with 16 additions and 13 deletions

View File

@ -247,9 +247,8 @@ globalThis.sqlite3Worker1Promiser = function callee(config = callee.defaultConfi
globalThis.sqlite3Worker1Promiser.defaultConfig = {
worker: function(){
//#if target=es6-bundler-friendly
return new Worker("sqlite3-worker1-bundler-friendly.mjs",{
type: 'module' /* Noting that neither Firefox nor Safari suppor this,
as of this writing. */
return new Worker(new URL("sqlite3-worker1-bundler-friendly.mjs", import.meta.url),{
type: 'module'
});
//#else
let theJs = "sqlite3-worker1.js";
@ -267,8 +266,12 @@ globalThis.sqlite3Worker1Promiser.defaultConfig = {
}
return new Worker(theJs + globalThis.location.search);
//#endif
}.bind({
}
//#ifnot target=es6-bundler-friendly
.bind({
currentScript: globalThis?.document?.currentScript
}),
})
//#endif
,
onerror: (...args)=>console.error('worker1 promiser error',...args)
};

View File

@ -1,5 +1,5 @@
C Merge\sconsole\sI/O\schanges\sfor\sWindows\sCLI.
D 2023-11-21T18:26:06.197
C Correct\sthe\sURL\sfor\sloading\ssqlite3-worker1-bundler-friendly.mjs\sfrom\ssqlite3-worker1-promiser-bundler-friendly.js,\sso\sthat\sthe\spromiser\scan\sbe\sused\sin\sbundler-using\senvironments.\sProblem\sreported\svia\semail.
D 2023-11-22T17:11:39.095
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -595,7 +595,7 @@ F ext/wasm/api/sqlite3-v-helper.js 7daa0eab0a513a25b05e9abae7b5beaaa39209b3ed12f
F ext/wasm/api/sqlite3-vfs-opfs-sahpool.c-pp.js 595953994aa3ae2287c889c4da39ab3d6f17b6461ecf4bec334b7a3faafddb02
F ext/wasm/api/sqlite3-vfs-opfs.c-pp.js 46c4afa6c50d7369252c104f274ad977a97e91ccfafc38b400fe36e90bdda88e
F ext/wasm/api/sqlite3-wasm.c d0e09eb5ed3743c00294e30019e591c3aa150572ae7ffe8a8994568a7377589f
F ext/wasm/api/sqlite3-worker1-promiser.c-pp.js bc06df0d599e625bde6a10a394e326dc68da9ff07fa5404354580f81566e591f
F ext/wasm/api/sqlite3-worker1-promiser.c-pp.js 569d4e859968e65f55dec5fac0b879828a23c8b179162cc7812fec19f844dd21
F ext/wasm/api/sqlite3-worker1.c-pp.js a541112aa51e16705f13a99bb943c64efe178aa28c86704a955f8fd9afe4ba37
F ext/wasm/batch-runner.html 4deeed44fe41496dc6898d9fb17938ea3291f40f4bfb977e29d0cef96fbbe4c8
F ext/wasm/batch-runner.js 0dad6a02ad796f1003d3b7048947d275c4d6277f63767b8e685c27df8fdac93e
@ -2143,8 +2143,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P 8936daa08243729d8538bb7288bbefb43f3bd842a0d4b2e8019092f5701c2926 448d6a1182d29940d5d34be2ce67df5601b688cd902dbbe97e95073f982a49ce
R 764d6a65ddcbf1b62de463cc42b71475
U larrybr
Z 9d8c4f0e647c59f8c21d5587e8bd311b
P 935a8a8ee76d0014df42c1480e044fd1c2dfc26e78abb587d99d861d2ae5eb27
R 88b228f6756043549fa673c8abfcfa61
U stephan
Z 2f087f3dd80678f00ca104b71330863c
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
935a8a8ee76d0014df42c1480e044fd1c2dfc26e78abb587d99d861d2ae5eb27
753a75218913c3b9c7ec5438387107369c34d1775d68b04d19ae18197e558605