Repository navigation
Releases
v1.1.0
SQLite as a database option, and everything built since the untagged 1.0.0 baseline:
self-service accounts and API keys with daily limits, the service site, client programs in
eight languages, the website, UDC collections on @jsudc/* 0.3. A small installation on one
host runs memento on a single SQLite file (DATABASE_URL=file:<path>), with no database
service and no Redis; PostgreSQL stays the default.
The first tagged release, and the first under the npm scope @jsmemento/*: the tag
v1.1.0 publishes the image ghcr.io/digital-cube/jsmemento as :1.1.0, :1.1, :1 and
:latest, and @jsmemento/core, server, cli, react and lookups 1.1.0 on npm.
[1.0.0] below is the baseline of 2026-10-31, which was never tagged or published.
Code that embeds @jsmemento/server, probes the health check or reads the error codes has to
change, as Breaking for code that embeds the server lists. The version is still minor
because no package was ever published under @memento/* or @jsmemento/* and no release was
ever tagged, so nobody can depend on the old names or the old behaviour.
Breaking for code that embeds the server
Against 1.0.0, the untagged baseline:
- The package names. The npm packages are
@jsmemento/core,server,cli,reactand
lookups, no longer in the@mementoscope, which on npm belongs to someone else: change
the dependency names and imports. Themementocommand, the image, theMEMENTO_*
variables and the/mementoprefix stay as they are. DatabaseHandlecarriesdialect(the newDialecttype) instead ofpool
(node-postgres'pg.Pool).Databaseis drizzle's query builder without a driver in its type,
PgDatabase<PgQueryResultHKT, typeof schema>instead ofNodePgDatabase<typeof schema>, so
it has no$client. Code that reached forhandle.poolordb.$clientuseshandle.db
for queries andhandle.close()on shutdown.connect(url)picks the database from the URL's scheme:postgres:///
postgresql://, or SQLite forfile:<path>,file:///abs/pathand:memory:. Any other
URL throws an error naming only the scheme (before, every URL went to node-postgres). One
process speaks one dialect: aconnectto the other database while a handle is open throws.schemais the tables of the connected database (PostgreSQL untilconnectopens a
SQLite file, which swaps in twins with the same row types). Read a table when a query is
built, not into a module-level constant. The PostgreSQL tables live in
db/schema-postgres.ts.runMigrations(db)applies the migration set of the process's database:
MIGRATIONS_FOLDER(drizzle/) for PostgreSQL, the newSQLITE_MIGRATIONS_FOLDER
(drizzle-sqlite/) for SQLite. On PostgreSQL it runs under an advisory lock.- Ids of new rows are generated by the application as UUID v7 (
uuidv7()), no longer by
the database'sgen_random_uuid(), which stays the column default (no migration). - The health check moved from
GET <prefix>/healthtoGET <prefix>/api/health
(default/memento/api/health). The image'smemento-healthcheckfollows it; external
monitors and load-balancer probes have to be pointed at the new path. - Error codes: a framework
415(unsupported content type) answers with the code
unsupported_media_typeinstead ofbad_request, and a429withrate_limited. - Text sorts (
listTemplates,listTenants, the retention sweep, every UDC sort on a text
field) are in Unicode code-point order on every database:USER_LOGINbefore_generic,
upper case before lower case (see Fixed).
Against the image of main between 1.0.0 and this release (:main, :edge), for code that
used what was added there:
- A boolean UDC field (
is_admin,verified,disabled, …) filters ontrue/false
(a JSON boolean or the string) and refuses anything else withvalidation_error. Before,
the value went to PostgreSQL as a string and its cast decided (t,1andyespassed).
The rows answer a JSON boolean on both databases. - The UDC field maps
EVENTS_FIELDS,CPU_LOAD_FIELDSandAPI_KEY_EVENT_FIELDread
their columns when a query is built (the tables of the connected database), and
FieldKindgains"bool".isoOftakes epoch milliseconds too. @jsudc/*0.3: an application that builds or extends the UDC registry itself (theudc
option,MementoRegistry,eventCollections,EventCollectionSource) with its own
@jsudc/core/@jsudc/serverhas to be on 0.3 too. The registry, its sources and their
schemas are@jsudc0.3 types, and 0.3 stops the start when alookupfield orrow_link
names a collection nobody serves.@jsmemento/reactdoes not depend on@jsudc/*, and no
@jsmemento/*package has@jsudc/*as a peer dependency.- Metering: a key of a tenant with an account member is metered and held to its daily
limit on every server process, not only on one withMEMENTO_ACCOUNTS(see Fixed). An
embedding application without accounts now answers429 quota_exceededfor such a key past
its limit.
Added
-
memento --version(also-V,@jsmemento/cli) prints the package's version, read from
itspackage.json; in the image,docker run --rm ghcr.io/digital-cube/jsmemento:1.1.0 memento --versionprints1.1.0. -
The website says how fresh it is. The footer of every page (the home page beside
"MIT licence.", the docs under Starlight's footer) shows the version, the date of its release
tag (theCHANGELOG.mdheading while there is no tag), when the site was built (UTC) and the
commit; the Packages list and table show when each package's newest version went to npm, and
that version when it is not the repository's (not on npm yet while a package has never been
published); beside the image, the release tag's date. Read once per build
(apps/website/src/build-info.mjs); the registry never fails the build, andSITE_NPM=off
builds without asking it (apps/website/README.md).
deploy/website/stage.shfetches the tags and rebuilds when a release tag lands on a built
commit. -
SQLite as a database option for installations that must not depend on a database
service (the first user: a customer's local machine with neither PostgreSQL nor Redis):
DATABASE_URL=file:<path>(orfile:///abs/path,:memory:for tests) instead of
postgresql://…. PostgreSQL stays the default. On SQLite everything works — events,
queries, rendering, chats, UDC collections with the same answers, the/wsstream, accounts,
quotas, usage, retention, the CLI — with one limit: one server process on one host per
file, so that process serves either the examples site or the service site, not both. Redis
is optional there as on PostgreSQL and not needed at all: without it the stream runs on the
in-process bus, the quota counter reads the usage table and the rate limits live in memory;
with it, still one server process. The guide, from an empty directory to a running server
(which database fits, the quick start, the image and a Compose file withoutpostgresand
redis, embedding, accounts, the CLI next to the server, backups and the limits), is
docs/SQLITE.md; the README anddocs/DEPLOYMENT.mdlink to it.- The driver is Node's built-in
node:sqliteunder drizzle'ssqlite-proxy, no native
dependency. One writer connection behind an in-process FIFO gate (every transaction
BEGIN IMMEDIATE, a nested one a savepoint), a read-only second connection for reads, WAL,
foreign_keys = ON; another process holding the write lock (amementoCLI command next to
the server) is waited for on a timer, up to 10 s, without stopping the server. - Its own migration set,
packages/server/drizzle-sqlite/(with the event immutability
triggers), shipped in the package next todrizzle/;pnpm db:generatewrites both, the
server at start andmemento migrateapply the set of the URL's database. DATABASE_URL/TEST_DATABASE_URLacceptfile:<path>,file:///abs/pathand
:memory:. The tables ofdb/schema.tsare those of the connected database
(db/schema-postgres.tsordb/schema-sqlite.ts, the same row types, checked at compile
time); a process speaks one dialect. New exports:dialectOf,describeDatabase,
SQLITE_MIGRATIONS_FOLDER.- The server and CLI suites run on both databases (vitest projects,
MEMENTO_TEST_DIALECT,
test:pg/test:sqlite);test/parity.test.tspins what both must answer alike.
- The driver is Node's built-in
-
The website (
apps/website,@jsmemento/website, docs/DEPLOYMENT.md):
Astro + Starlight with memento's own identity (ink and bone, the red thread, Bodoni Moda),
dark and light, Pagefind search, a home hero (oneUSER_LOGINand its EN / SR sentence),
the sidebar Get started / Concepts / Reference / Examples / Clients / Packages (an index each
for now) and its own 404.SITE_URL,EXAMPLE_URL,SERVICE_URLat build time;
starlight-links-validatorfails the build on a broken internal link (CI job Website
build). Served atstage.memento-service.orgbydeploy/website/stage.sh
(build-and-swap, nginx vhost indeploy/website/nginx/). Not part of the image.
The home page below the hero: one event read back every way (entity history, en / sr,
Filter DSL, a/wsframe), the eight examples as real screenshots, the API, four quick
starts and the packages; Get started with Docker, a client and embedded in Node. Its code
is repository files imported raw (apps/website/snippets/,clients/): requests and answers
recorded bynpm run capture, screenshots bynpm run shots, the snippets compiled by
check:snippetsintypecheck.
The rest of the sidebar: Concepts (eve...