Skip to content

Releases

v1.1.0

Choose a tag to compare

@github-actions github-actions released this 17 Nov 10:09

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, react and
    lookups, no longer in the @memento scope, which on npm belongs to someone else: change
    the dependency names and imports. The memento command, the image, the MEMENTO_*
    variables and the /memento prefix stay as they are.
  • DatabaseHandle carries dialect (the new Dialect type) instead of pool
    (node-postgres' pg.Pool).
  • Database is drizzle's query builder without a driver in its type,
    PgDatabase<PgQueryResultHKT, typeof schema> instead of NodePgDatabase<typeof schema>, so
    it has no $client. Code that reached for handle.pool or db.$client uses handle.db
    for queries and handle.close() on shutdown.
  • connect(url) picks the database from the URL's scheme: postgres:// /
    postgresql://, or SQLite for file:<path>, file:///abs/path and :memory:. Any other
    URL throws an error naming only the scheme (before, every URL went to node-postgres). One
    process speaks one dialect: a connect to the other database while a handle is open throws.
  • schema is the tables of the connected database (PostgreSQL until connect opens 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 new SQLITE_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's gen_random_uuid(), which stays the column default (no migration).
  • The health check moved from GET <prefix>/health to GET <prefix>/api/health
    (default /memento/api/health). The image's memento-healthcheck follows 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_type instead of bad_request, and a 429 with rate_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_LOGIN before _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 on true / false
    (a JSON boolean or the string) and refuses anything else with validation_error. Before,
    the value went to PostgreSQL as a string and its cast decided (t, 1 and yes passed).
    The rows answer a JSON boolean on both databases.
  • The UDC field maps EVENTS_FIELDS, CPU_LOAD_FIELDS and API_KEY_EVENT_FIELD read
    their columns when a query is built (the tables of the connected database), and
    FieldKind gains "bool". isoOf takes epoch milliseconds too.
  • @jsudc/* 0.3: an application that builds or extends the UDC registry itself (the udc
    option, MementoRegistry, eventCollections, EventCollectionSource) with its own
    @jsudc/core / @jsudc/server has to be on 0.3 too. The registry, its sources and their
    schemas are @jsudc 0.3 types, and 0.3 stops the start when a lookup field or row_link
    names a collection nobody serves. @jsmemento/react does 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 with MEMENTO_ACCOUNTS (see Fixed). An
    embedding application without accounts now answers 429 quota_exceeded for such a key past
    its limit.

Added

  • memento --version (also -V, @jsmemento/cli) prints the package's version, read from
    its package.json; in the image, docker run --rm ghcr.io/digital-cube/jsmemento:1.1.0 memento --version prints 1.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 (the CHANGELOG.md heading 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, and SITE_NPM=off
    builds without asking it (apps/website/README.md).
    deploy/website/stage.sh fetches 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> (or file:///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 /ws stream, 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 without postgres and
    redis, embedding, accounts, the CLI next to the server, backups and the limits), is
    docs/SQLITE.md; the README and docs/DEPLOYMENT.md link to it.

    • The driver is Node's built-in node:sqlite under drizzle's sqlite-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 (a memento CLI 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 to drizzle/; pnpm db:generate writes both, the
      server at start and memento migrate apply the set of the URL's database.
    • DATABASE_URL / TEST_DATABASE_URL accept file:<path>, file:///abs/path and
      :memory:. The tables of db/schema.ts are those of the connected database
      (db/schema-postgres.ts or db/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.ts pins what both must answer alike.
  • 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 (one USER_LOGIN and 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_URL at build time;
    starlight-links-validator fails the build on a broken internal link (CI job Website
    build
    ). Served at stage.memento-service.org by deploy/website/stage.sh
    (build-and-swap, nginx vhost in deploy/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 /ws frame), 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 by npm run capture, screenshots by npm run shots, the snippets compiled by
    check:snippets in typecheck.
    The rest of the sidebar: Concepts (eve...

Read more