Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 21 Oct 06:29
· 14 commits to main since this release

ExisJS Release v0.10.0

Status: Released 2026-10-21 (npm tag latest)
Type: Minor: the CLI moves to @exisjs/cli; one-process production start; settings that did nothing now work or fail at start-up; metrics endpoint
Affected Packages: exisjs, @exisjs/cli (new), create-exisjs

Production installs are about 10x smaller. The exisjs command moved to the new @exisjs/cli package, a development dependency. A production install of exisjs is now 4.5 MB and 25 packages, with no TypeScript, esbuild, tsx, chokidar, commander or pino-pretty (before: about 45 MB, of which 34 MB build tooling). exisjs build writes .exis/server/main.js, and node .exis/server/main.js runs the server as one process.


Breaking Changes

0.10.0 follows the project rule that a setting which is accepted but does nothing is worse than no setting. Each change below makes a server that seemed fine fail at start-up, with a message naming the option.

  1. queue is checked at start-up.

    • queue.driver must be 'memory'. 'redis' and any other value stop the start. They never did anything: there is no Redis queue.
    • Unknown keys stop the start. The 03-all-features example had enableWorkers: true, which nothing ever read; remove it if you copied that block.
    • queue now applies backpressure (see Added). With queue: { driver: 'memory' } alone, the defaults apply: 1000 requests at once, 500 waiting, 10 s wait.

    Migrate: delete queue.driver: 'redis' and unknown keys, or delete the queue block if you don't want a limit.

  2. tex.object(shape, options) rejects unknown options. In plain JavaScript a misspelled option such as { optinal: true } used to be ignored. It now throws when the schema is defined.

  3. Outside development, a route file that cannot load stops the start.

    • Before, it was logged and skipped: the server started without that part of its API and reported healthy.
    • The usual cause is a missing environment value read by tex.env while the route file loads.

    Migrate: provide the variable, or fix the file named in the message. Development (exisjs dev) is unchanged: such a route answers 500 with the error.

The CLI moves to @exisjs/cli

  • New package @exisjs/cli with the exisjs command (dev, build, test, run, start, routes, generate, ...). It depends on the build tools (esbuild, tsx, chokidar, commander, pino-pretty) and takes typescript from the project as a peer dependency, so the project controls its TypeScript version.
  • exisjs no longer depends on the build tools. It lists @exisjs/cli as an optional dependency until 0.11, so projects that run exisjs dev without listing @exisjs/cli keep working, with a one-line notice. A production image leaves it out with npm ci --omit=dev --omit=optional.
  • exisjs build writes .exis/server/main.js. node .exis/server/main.js starts the server in that process: Node receives SIGTERM directly, and production needs neither the CLI nor npm. It changes to the project folder first, so it works from any directory, and defaults NODE_ENV to production (also when it is set but empty). In cluster mode it is the primary and forks the workers.
  • exisjs start is part of the runtime and runs the server in its own process, instead of spawning a second Node process and forwarding signals to it. Production installs without @exisjs/cli can run it, so "start": "exisjs start" and npm start work everywhere; the other commands need @exisjs/cli.
  • exisjs migrate updates a 0.9 project: adds @exisjs/cli (and typescript when missing) to devDependencies, and lists the Dockerfile lines to change. The start script stays exisjs start. --dry-run only shows the changes.
  • create-exisjs generates the new layout.
  • pino-pretty is optional for the runtime. When pretty logs are requested but pino-pretty is not installed (a production install), logs stay JSON and one hint is printed, instead of a crash at start-up.
  • CI checks the production install on every change (scripts/size-budget.mjs): it fails when the size or package count exceeds size-budget.json, or when any build tool is installed. publint and @arethetypeswrong/cli check both packages' exports and types.
  • Types resolve with every moduleResolution. exisjs/validator, exisjs/router and the other subpaths now also have types under the older node (node10) setting, through typesVersions.
Production install of exisjs 0.9.2 0.10.0
node_modules size ~45 MB 4.5 MB
Packages — 25
Build tooling 34 MB none
Node processes in the container 2 1

Added

  • Prometheus metrics. metrics: { enabled: true } now serves GET /metrics. Before, the setting was accepted and no route existed.
    • Request counts and duration histograms are labelled by route pattern (/users/:id), never the raw URL.
    • Also reported: requests in flight, memory and event-loop lag.
    • In cluster mode, a scrape that reaches any worker reports the totals of every worker.
  • queue limits concurrent requests. queue: { maxConcurrent, maxQueue, timeoutMs } caps requests handled at once. Extra requests wait, then get 503.
  • tex.object() takes optional, nullable and nullish, like the field builders, with matching types.
  • Docs: "Deploying with Docker". It covers:
    • a tested multi-stage Dockerfile and .dockerignore;
    • why the build needs --skip-env-check, and that tex.env still refuses to start without the secrets;
    • running node_modules/.bin/exisjs start instead of npm start;
    • health checks and migrations.

Changes in 0.10.0 (since 0.10.0-beta.0)

  • exisjs migrate flags npm run build without --skip-env-check. It only recognised exisjs build written out in a Dockerfile RUN line. It now also flags npm run build when the project's build script is exisjs build, in a Dockerfile or in nixpacks.toml (Dokploy, Railway), where the build otherwise fails, or needs the secrets at build time and keeps them in the image.
  • Health probes no longer fill the production log. A Docker HEALTHCHECK every 30 seconds wrote 120 GET /health lines an hour at info. Successful requests to /health, and to /_health and /_ready when healthcheck is enabled, now log at debug, which production hides. A failing probe still logs as a warning or error.
  • A database that fails to connect at start is logged. exisjs start hid the error from registerDatabase() connections, so a wrong connection string left no trace. It is now logged as an error; the server still starts, and /_ready answers 503 until the database is healthy.

Changes in 0.10.0-beta.0

  • Ctrl+C in a terminal stops at once. With healthcheck on, Ctrl+C on exisjs start waited for the readiness drain (5 s in production), which is meant for load balancers. It is now skipped for SIGINT when stdin is a terminal. SIGTERM (Docker, Kubernetes) and SIGINT without a terminal (Fly.io, PM2) still drain.
  • Deployment guide: don't remove the CLI with npm prune. exisjs and @exisjs/cli both provide the exisjs command. npm prune --omit=dev --omit=optional removes the CLI's command and doesn't link the runtime's, so exisjs start is not found. Use a clean npm ci --omit=dev --omit=optional, as the documented Dockerfile does, or run npm rebuild exisjs after pruning, or start with node .exis/server/main.js.

Changes in 0.10.0-alpha.2

Found by testing 0.10.0-alpha.1 from npm on Windows, Linux containers and a production CRM server.

  • server in exis.config.ts takes effect. The engine was picked before the config file loaded, so only exis({ server }) worked, and the uWS fallback warning was logged while the logger was still silent. A server: 'uws' app ran on Node without saying so. app.create() now picks the engine again once the config and logger are loaded.
  • An installed uWS that fails to load says so. uWS v20.71.0 needs glibc 2.38; node:24-slim (Debian 12) has 2.36. The warning now says failed to load with uWS's own error instead of not installed. Use node:24-trixie-slim with uWS (see the deployment guide).
  • "Install the CLI" hints name the matching version. npm install -D @exisjs/cli takes latest, which can be an older prerelease whose peer dependency pins a different exisjs, so npm refused with ERESOLVE. Both hints now print @exisjs/cli@<the project's exisjs version>.
  • On Windows, start-up errors no longer show framework code. The filter for framework stack frames only matched /, so a wrong queue setting or a failing route showed a code frame from backpressure.js or route-scanner.js.

Changes in 0.10.0-alpha.1

Found by testing 0.10.0-alpha.0 from npm on new projects, Docker, Linux, pnpm, Yarn, a workspace and a production CRM server.

  • /_ready now answers 503 before the server stops accepting connections. Before, the listener closed at once on SIGTERM, so load balancers saw refused connections instead of a failing probe. With healthcheck enabled, the server keeps serving for healthcheck.drainMs (default 5000 in production) while /_ready answers 503, then closes the listener and lets requests finish.
  • The npx exisjs migrate notice appears. npm links @exisjs/cli's exisjs command, so the notice in the runtime's command never ran. The CLI now prints it when package.json lists exisjs but not @exisjs/cli.
  • A global @exisjs/cli hands off to the project's own CLI. Run in a project, it used its own copy of exisjs and typescript. In a project that has exisjs but not @exisjs/cli, it stops and says to install the CLI.
  • exisjs start logs like production. It printed the development banner (with "press h + enter") and dropped the JSON Server running at and shutdown lines.
  • A route that fails to load in a built app is named. The start stopped with "the routes manifest failed to load"; it now names the route file.
  • A wrong queue setting stops the start before the app's code runs. Before, the entry file had already connected to databases and scheduled cron jobs.
  • A failed exisjs build removes its output, so exisjs start can't run a half-built .exis/.
  • exisjs migrate checks more deployment files: exisjs build without --skip-env-check in the Dockerfile, and start commands through npm start in nixpacks.toml and Procfile.
  • create-exisjs --help prints the options instead of starting the questions.
  • uWebSockets.js is no longer installed with exisjs (breaking for server: 'uws'). It was an optional dependency fetched from GitHub on every install, although only server: 'uws' uses it: installs needed git, lock files pinned an old commit, and where the clone failed, server: 'uws' quietly ran on Node. It is now an optional peer dependency. Apps that use it install it themselves: npm install https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.71.0.tar.gz.
  • Docs: the validation error examples show the current response format; the deployment guide describes the readiness drain and the real time limits; Yarn 1 users run npx create-exisjs@alpha for prereleases.

Fixed

  • partial() reset fields that an update left out. A PATCH schema made with .partial() kept the fields' defaults, so a request that sent only status reset tags to [] (and any other field with a default). Fields left out of a partial schema now stay unset. Found while building examples/05-tasks-api.

  • In tests, route files and the test file used two copies of the same module. With NODE_ENV=test, route files were loaded with require() (TypeScript compiles import() to it for CommonJS) while the test imported them as ES modules, so resetting an in-memory store or spying on a service from a test did not affect the routes. Route files are now always loaded with a real import().

  • The create-exisjs sample user service returned the password it was sent, and GET /users/:id answered 200 with null for an unknown id. It now stores and returns only the name and email, and answers 404.

  • Graceful shutdown skipped onClose and the database disconnect when a request was still running. The server stopped listening, the request finished, and nothing kept the process alive any more: Node exited with code 0 before the close hooks ran. Found in Docker. The shutdown now waits for the hooks.

  • The publish workflow always published to latest. A prerelease such as 0.10.0-alpha.0 would have reached every user. The npm tag now comes from the version (-alpha → alpha, -beta → beta, -rc → next), and the GitHub release is marked as a prerelease.

  • ValidatorError was not exported from exisjs/validator. Neither were TexBuilder, TexType, the option types, or SafeParseResult, although the API reference listed them. Use err instanceof ValidatorError.

  • Ctrl+C in exisjs dev printed Failed to start process: write EPIPE. On Windows the server process often exits first; telling it to stop then failed, and the error was printed as a start failure. A closed channel during shutdown is now expected, and real errors after start are reported as Server process error.

  • exisjs dev did not reload when the project sat inside a folder such as Temp, data, build or public. The watcher matched its ignore rules against the full path, so every file of such a project was ignored, .env included. The rules now apply only inside the project. .env files are also watched when watch.paths is set.

  • Backpressure leaked a slot for every streamed or aborted response. It counted a request as finished only through res.end(), so a server under the limit eventually queued or rejected everything. It now counts the connection closing. A client that gives up while waiting also frees its place in the queue.

  • Production startup hid a broken routes manifest. If the manifest could not be imported, a warning was logged and the server fell back to scanning the source folders; it now stops.

Examples

  • New examples/05-tasks-api, created with create-exisjs (functional routes): a tasks API using query coercion and pagination, nested optional objects, tex.url, pattern, object refine, partial() updates, safeParse() batch import, healthcheck, metrics and queue. npm run verify:examples builds it and starts it with node .exis/server/main.js.
  • Examples 01 to 04 were converted with exisjs migrate.

Upgrade Notes

  • partial() no longer applies defaults. A field left out of a partial schema stays unset. Code that relied on a PATCH resetting omitted fields to their defaults must send them.

  • Run npx exisjs migrate, then npm install. Until you do, exisjs commands still work through the runtime package and print a notice; from 0.11 they need @exisjs/cli.

  • In a Dockerfile: install production dependencies with npm ci --omit=dev --omit=optional, and start with CMD ["node_modules/.bin/exisjs", "start"] (or CMD ["node", ".exis/server/main.js"]). If you use the uWebSockets.js engine (server: 'uws'), install it in your project: npm install https://github.com/uNetworking/uWebSockets.js/archive/refs/tags/v20.71.0.tar.gz.

  • Platforms that build on the host must install devDependencies for the build (npm install --include=dev).

  • Check exis.config.ts for a queue block. Keep it only if you want the limit, and remove driver: 'redis' and unknown keys.

  • If a deployment starts without all its environment variables, it now exits with code 1 instead of serving part of the API. Check the platform's environment settings before upgrading.

Full Changelog: v0.9.2...v0.10.0