emo.test = ๐งช
emo.tool = ๐จ
emo.wasm-opt = ๐งผ
+emo.cleanup = ๐งผ
# ๐ท๐ช๐งฎ๐งซ๐งฝ๐ฟโฝ๐ง๐ฑ๐ช๐๐งผ
#
#
sqlite3.canonical.c = $(dir.top)/sqlite3.c
sqlite3.c ?= $(firstword $(wildcard $(dir.top)/sqlite3-see.c) $(sqlite3.canonical.c))
-sqlite3.h = $(dir $(sqlite3.c))/sqlite3.h
+sqlite3.h = $(dir $(sqlite3.c))sqlite3.h
#
# bin.version-info = binary to output various sqlite3 version info for
# ^^^ making dist/snapshot
CLEAN_FILES += $(wildcard sqlite-wasm-*.zip)
+########################################################################
+# The npm target is specifically for preparing files for the downstream
+# https://github.com/sqlite/sqlite-wasm (npm) distribution.
+#
+# Per agreement with that project's maintainers, these filenames need
+# to remain stable. To avoid breakage in their deployment process, any
+# changes (like renaming files) which potentially break their deployment
+# needs to be communicated to that project via opening a new ticket or
+# direct coordination with its maintainers.
+#
+# This target does a full clean/rebuild so that we can ensure that the
+# optimization level is set consistently across all files.
+#
+npm.bundle.zip = npm-bundle.zip
+CLEAN_FILES += $(npm.bundle.zip)
+# Distributables which need to be built for npm:
+npm_files = $(addprefix $(dir.dout)/, \
+sqlite3-bundler-friendly.mjs \
+sqlite3-opfs-async-proxy.js \
+sqlite3-worker1-bundler-friendly.mjs \
+sqlite3-worker1-promiser.mjs \
+sqlite3-worker1.mjs \
+sqlite3.mjs \
+sqlite3.wasm \
+sqlite3-node.mjs \
+)
+npm: $(sqlite3.canonical.c)
+ @echo "$(emo.cleanup) Forcing a clean rebuild to ensure consistent optimization flags."
+ $(MAKE) clean
+ $(MAKE) -e "emcc_opt=-Oz $(emcc-opt-extra)" $(npm_files)
+ rm -f $(npm.bundle.zip); zip -r $(npm.bundle.zip) $(npm_files)
+ unzip -l $(npm.bundle.zip)
+
########################################################################
# Explanation of, and some commentary on, various emcc build flags
# follows. Full docs for these can be found at:
-C Fix\sthe\swasm\ssnapshot\sbuild's\szipfile\sname\sto\sinclude\s'-snapshot'\sand\scorrect\sthe\supdate-docs\starget\sfor\srecent\sbuild\srefactoring.
-D 2026-01-09T18:42:27.684
+C Add\sthe\s'npm'\sext/wasm\smakefile\starget\sto\screate\snpm-bundle.zip\sfor\suse\sby\sthe\sdownstream\snpm\spackage.\sThis\starget\sis\sintended\sto\sbecome\stheir\spath\sfor\spulling\snpm-relevant\sdeliverables,\srather\sthan\sthe\scanonical\sdownloads,\sand\sthey\shave\sour/my\scommitment\snot\sto\sbreak\sit\swithout\sinvolving\sthem\sfirst.
+D 2026-01-09T19:44:31.051
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F ext/session/sqlite3session.c b3de195ce668cace9b324599bf6255a70290cbfb5451e826e946f3aee6e64c54
F ext/session/sqlite3session.h 7404723606074fcb2afdc6b72c206072cdb2b7d8ba097ca1559174a80bc26f7a
F ext/session/test_session.c 8766b5973a6323934cb51248f621c3dc87ad2a98f023c3cc280d79e7d78d36fb
-F ext/wasm/GNUmakefile f2c9aefe6398d7171f698f96ac22dca9c42d149dc8f5e5adb2bf7e715f04c04c
+F ext/wasm/GNUmakefile ffd166e3fa26d00b6623104051981a3641df8943f51905de2a4a88f14d586c11
F ext/wasm/README-dist.txt f01081a850ce38a56706af6b481e3a7878e24e42b314cfcd4b129f0f8427066a
F ext/wasm/README.md 2e87804e12c98f1d194b7a06162a88441d33bb443efcfe00dc6565a780d2f259
F ext/wasm/SQLTester/GNUmakefile e0794f676d55819951bbfae45cc5e8d7818dc460492dc317ce7f0d2eca15caff
F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
F tool/winmain.c 00c8fb88e365c9017db14c73d3c78af62194d9644feaf60e220ab0f411f3604c
-P 9adab8b2bef4130abd358d53384cb5f4dd691b808336bb7102793b0165b1c516
-R 8142de4df1409c3197b6657fa6b5fe9c
+P 0f53dbf06010f66ba23941ee4269d507efa370f1a8cc0099d274d8baadebdb46
+R 64fd9becb93ebc8b129fa81217b5f109
U stephan
-Z 6d267efc16568d51ef4b143084a87d51
+Z fbc6ff4d9dec0f732dbb941d472276a9
# Remove this line to create a well-formed Fossil manifest.