Repository navigation
v0.10.0
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.
-
queueis checked at start-up.queue.drivermust 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-featuresexample hadenableWorkers: true, which nothing ever read; remove it if you copied that block. queuenow applies backpressure (see Added). Withqueue: { 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 thequeueblock if you don't want a limit. -
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. -
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.envwhile the route file loads.
Migrate: provide the variable, or fix the file named in the message. Development (
exisjs dev) is unchanged: such a route answers500with the error.
The CLI moves to @exisjs/cli
- New package
@exisjs/cliwith theexisjscommand (dev,build,test,run,start,routes,generate, ...). It depends on the build tools (esbuild, tsx, chokidar, commander, pino-pretty) and takestypescriptfrom the project as a peer dependency, so the project controls its TypeScript version. exisjsno longer depends on the build tools. It lists@exisjs/clias an optional dependency until 0.11, so projects that runexisjs devwithout listing@exisjs/clikeep working, with a one-line notice. A production image leaves it out withnpm ci --omit=dev --omit=optional.exisjs buildwrites.exis/server/main.js.node .exis/server/main.jsstarts the server in that process: Node receivesSIGTERMdirectly, and production needs neither the CLI nor npm. It changes to the project folder first, so it works from any directory, and defaultsNODE_ENVtoproduction(also when it is set but empty). In cluster mode it is the primary and forks the workers.exisjs startis 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/clican run it, so"start": "exisjs start"andnpm startwork everywhere; the other commands need@exisjs/cli.exisjs migrateupdates a 0.9 project: adds@exisjs/cli(andtypescriptwhen missing) todevDependencies, and lists the Dockerfile lines to change. Thestartscript staysexisjs start.--dry-runonly shows the changes.create-exisjsgenerates the new layout.pino-prettyis optional for the runtime. When pretty logs are requested butpino-prettyis 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 exceedssize-budget.json, or when any build tool is installed.publintand@arethetypeswrong/clicheck both packages' exports and types. - Types resolve with every
moduleResolution.exisjs/validator,exisjs/routerand the other subpaths now also have types under the oldernode(node10) setting, throughtypesVersions.
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 servesGET /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.
- Request counts and duration histograms are labelled by route pattern (
queuelimits concurrent requests.queue: { maxConcurrent, maxQueue, timeoutMs }caps requests handled at once. Extra requests wait, then get503.tex.object()takesoptional,nullableandnullish, 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 thattex.envstill refuses to start without the secrets; - running
node_modules/.bin/exisjs startinstead ofnpm start; - health checks and migrations.
- a tested multi-stage Dockerfile and
Changes in 0.10.0 (since 0.10.0-beta.0)
exisjs migrateflagsnpm run buildwithout--skip-env-check. It only recognisedexisjs buildwritten out in a DockerfileRUNline. It now also flagsnpm run buildwhen the project'sbuildscript isexisjs build, in a Dockerfile or innixpacks.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
HEALTHCHECKevery 30 seconds wrote 120GET /healthlines an hour atinfo. Successful requests to/health, and to/_healthand/_readywhenhealthcheckis enabled, now log atdebug, which production hides. A failing probe still logs as a warning or error. - A database that fails to connect at start is logged.
exisjs starthid the error fromregisterDatabase()connections, so a wrong connection string left no trace. It is now logged as an error; the server still starts, and/_readyanswers503until the database is healthy.
Changes in 0.10.0-beta.0
- Ctrl+C in a terminal stops at once. With
healthcheckon, Ctrl+C onexisjs startwaited for the readiness drain (5 s in production), which is meant for load balancers. It is now skipped forSIGINTwhen stdin is a terminal.SIGTERM(Docker, Kubernetes) andSIGINTwithout a terminal (Fly.io, PM2) still drain. - Deployment guide: don't remove the CLI with
npm prune.exisjsand@exisjs/cliboth provide theexisjscommand.npm prune --omit=dev --omit=optionalremoves the CLI's command and doesn't link the runtime's, soexisjs startis not found. Use a cleannpm ci --omit=dev --omit=optional, as the documented Dockerfile does, or runnpm rebuild exisjsafter pruning, or start withnode .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.
serverinexis.config.tstakes effect. The engine was picked before the config file loaded, so onlyexis({ server })worked, and the uWS fallback warning was logged while the logger was still silent. Aserver: '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 saysfailed to loadwith uWS's own error instead ofnot installed. Usenode:24-trixie-slimwith uWS (see the deployment guide). - "Install the CLI" hints name the matching version.
npm install -D @exisjs/clitakeslatest, which can be an older prerelease whose peer dependency pins a differentexisjs, so npm refused withERESOLVE. 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 wrongqueuesetting or a failing route showed a code frame frombackpressure.jsorroute-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.
/_readynow answers503before the server stops accepting connections. Before, the listener closed at once onSIGTERM, so load balancers saw refused connections instead of a failing probe. Withhealthcheckenabled, the server keeps serving forhealthcheck.drainMs(default 5000 in production) while/_readyanswers503, then closes the listener and lets requests finish.- The
npx exisjs migratenotice appears. npm links@exisjs/cli'sexisjscommand, so the notice in the runtime's command never ran. The CLI now prints it whenpackage.jsonlistsexisjsbut not@exisjs/cli. - A global
@exisjs/clihands off to the project's own CLI. Run in a project, it used its own copy ofexisjsandtypescript. In a project that hasexisjsbut not@exisjs/cli, it stops and says to install the CLI. exisjs startlogs like production. It printed the development banner (with "press h + enter") and dropped the JSONServer running atand 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
queuesetting 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 buildremoves its output, soexisjs startcan't run a half-built.exis/. exisjs migratechecks more deployment files:exisjs buildwithout--skip-env-checkin theDockerfile, and start commands throughnpm startinnixpacks.tomlandProcfile.create-exisjs --helpprints the options instead of starting the questions.- uWebSockets.js is no longer installed with
exisjs(breaking forserver: 'uws'). It was an optional dependency fetched from GitHub on every install, although onlyserver: 'uws'uses it: installs neededgit, 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@alphafor 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 onlystatusresettagsto[](and any other field with a default). Fields left out of a partial schema now stay unset. Found while buildingexamples/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 withrequire()(TypeScript compilesimport()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 realimport(). -
The
create-exisjssample user service returned the password it was sent, andGET /users/:idanswered200withnullfor an unknown id. It now stores and returns only the name and email, and answers404. -
Graceful shutdown skipped
onCloseand 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 as0.10.0-alpha.0would 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. -
ValidatorErrorwas not exported fromexisjs/validator. Neither wereTexBuilder,TexType, the option types, orSafeParseResult, although the API reference listed them. Useerr instanceof ValidatorError. -
Ctrl+C in
exisjs devprintedFailed 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 asServer process error. -
exisjs devdid not reload when the project sat inside a folder such asTemp,data,buildorpublic. The watcher matched its ignore rules against the full path, so every file of such a project was ignored,.envincluded. The rules now apply only inside the project..envfiles are also watched whenwatch.pathsis 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 withcreate-exisjs(functional routes): a tasks API using query coercion and pagination, nested optional objects,tex.url,pattern, objectrefine,partial()updates,safeParse()batch import,healthcheck,metricsandqueue.npm run verify:examplesbuilds it and starts it withnode .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, thennpm install. Until you do,exisjscommands 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 withCMD ["node_modules/.bin/exisjs", "start"](orCMD ["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
devDependenciesfor the build (npm install --include=dev). -
Check
exis.config.tsfor aqueueblock. Keep it only if you want the limit, and removedriver: '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