Repository navigation
v0.7.14
ExisJS Release v0.7.14
Release Date: 2026-10-05
Type: Stability, CLI & Runtime Hardening
Affected Packages: exisjs, create-exisjs
Highlights
-
Windows Subprocess & CLI Spawning Hardening (
exis run/exis exec):- Resolved
C:\Program is not recognized as an internal or external commanderror on Windows systems with space-containing Node.js installation paths (e.g.,C:\Program Files\nodejs\node.exe). - Switched direct Node binary execution to
shell: falseandwindowsHide: true, preventing security deprecation warnings and CLI execution failures.
- Resolved
-
File-System Route Specificity & Radix Tree Segment Ordering:
- Enhanced
fs-scanner.tssorting to guarantee static routes always take precedence over dynamic wildcard[id]and catch-all[...slug]segments regardless of directory traversal order. - Prevents accidental shadowing between static endpoints (e.g.
/api/stock/kpis) and co-located parameterized routes (e.g./api/stock/[id]).
- Enhanced
-
Enhanced Binary, Buffer & Stream File Responses (
res.download()):- Extended
res.download()to accept Node.jsReadablestreams, WebReadableStream,Buffer, strings, and file paths with unified signature and automatic streaming. - Automatically configures
Content-Disposition: attachment; filename="..."andContent-Typeheaders with support for custom headers.
- Extended
-
Graceful Shutdown & Windows Libuv Assertion Resolution:
- Fixed Windows
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 94andwrite EPIPEduring server termination/hot-reloading. - Safely disconnects IPC channels via
process.disconnect()before closing HTTP servers and database connection pools. - Added quiet
EPIPEandEOFerror handling onprocess.stdoutandprocess.stderrduring the termination phase. - Ensured coordinated shutdown for
cron.stopAll()andDatabaseManager.disconnectAll().
- Fixed Windows
-
Strict Type Inference & Route Type Preservation:
- Hardened
IsOptional<T>andIsNullable<T>type flags inTexEngineto prevent union type collapse. - Ensured
createRouterand route definitions strictly preserve handler parameter and response types without requiring manual type assertions.
- Hardened
Detailed Improvements & Usage Examples
1. First-Class Binary & Stream Downloads
import { route } from 'exisjs/router'
import { createReadStream } from 'node:fs'
export const getExport = route.get({
path: '/export/csv',
async handle(req, res) {
const csvBuffer = Buffer.from('id,name,role\n1,Alice,Admin')
return res.download(csvBuffer, 'users.csv', {
contentType: 'text/csv',
})
},
})
export const getLogStream = route.get({
path: '/export/logs',
async handle(req, res) {
const stream = createReadStream('./logs/app.log')
return res.download(stream, 'audit.log')
},
})2. Route Specificity Resolution
Directory structure:
src/http/
├── stock/
│ ├── [id]/
│ │ └── route.ts # Matches /stock/123
│ └── kpis/
│ └── route.ts # Explicitly prioritized over /stock/[id]
Static route segments are registered ahead of parameterized routes in the radix tree, preventing dynamic shadowing.
Full Changelog: v0.7.13...v0.7.14