Repository navigation
v0.7.11
ExisJS Release v0.7.11
Release Date: 2026-10-01
Type: High-Performance Server Optimization, uWS Adapter Parity, Dev Server Configuration, Security & Scaffolding Alignment
Affected Packages: exisjs, create-exisjs
Highlights
- Static Route In-Memory Fast Path:
NativeRadixTreenow builds a dedicated static lookup map (staticCache) for parameterless routes (e.g./,/api/health,/users/list).- Completely bypasses radix tree traversal for exact static routes, eliminating tree lookup overhead and delivering record-breaking sub-millisecond throughput (>51,000 req/sec).
- Zero-Allocation
AbortSignalLazy Instantiation:ExisRequest.prototype.signalis now lazily initialized on first access rather than allocated on every HTTP request.- Reduces object allocations, garbage collector pressure, and avoids attaching event listeners to
IncomingMessageunless the route handler or middleware explicitly readsreq.signal.
- High-Performance uWS Adapter (
uWebSockets.js) Parity:- Full compatibility and event lifecycle interface parity on
UwsIncomingMessage,UwsServerResponse, andUwsWebSocketShim(.once(),.off(),.removeListener(),.removeAllListeners(),.destroyed,.writableEnded,.writeHead(),.getHeaders(),.getHeaderNames(),.flushHeaders()). - Seamlessly integrates with Node.js streaming ecosystems, connection abort listeners, and third-party middleware without type errors or event listener leaks.
- Full compatibility and event lifecycle interface parity on
- Constant-Time Timing Safe Comparison (
timingSafeEqual):- Added
timingSafeEqual(a, b)inexisjs/middlewarefor comparing API keys, bearer tokens, HMAC signatures, and webhook secrets in constant time. - Implements constant-time dummy comparisons on length mismatch to eliminate length-leak side-channel timing attacks.
- Added
- Configurable Dev Server Watcher (
devinexis.config.ts):- Added type-safe
devoptions indefineConfig(watch,ignored,usePolling,interval,binaryInterval). - Allows developers on Windows, Docker containers, WSL, and network shares to fine-tune file polling, watch directories, and ignore custom paths.
- Added type-safe
- Flexible Database Lifecycle Registration:
registerDatabasenow supports dual signatures: bothregisterDatabase(options)andregisterDatabase(app, options), allowing modular dependency injection and root bootstrap patterns.- Standardized error cause assignment across Node.js runtime versions.
- CLI Scaffolding Alignments (
create-exisjs):- Updated project generator to scaffold scheduled tasks in
src/cron/cleanup.tsutilizing thecron()helper and@Cron()decorator withCronExpression.EVERY_DAY_AT_MIDNIGHT. - Upgraded starter templates to
exisjs: '^0.7.11'.
- Updated project generator to scaffold scheduled tasks in
Key Improvements & Details
1. Timing-Safe String and Buffer Comparison
import { timingSafeEqual } from 'exisjs/middleware'
import { ForbiddenException } from 'exisjs/error'
export function verifyApiKey(req: ExisRequest) {
const apiKey = req.headers['x-api-key'] as string
if (!timingSafeEqual(apiKey, process.env.API_KEY)) {
throw new ForbiddenException('Invalid API Key')
}
}
2. Configurable Dev Watcher (exis.config.ts)
import { defineConfig } from 'exisjs/config'
export default defineConfig({
port: 3000,
dev: {
usePolling: true,
interval: 100,
ignored: ['**/tmp/**', '**/*.sqlite*'],
},
})
3. Flexible Database Lifecycle Registration
import { registerDatabase } from 'exisjs/database'
import mongoose from 'mongoose'
// Direct options registration
registerDatabase({
name: 'mongodb',
connect: async () => {
await mongoose.connect(process.env.DATABASE_URL!)
},
disconnect: async () => {
await mongoose.disconnect()
},
healthCheck: async () => mongoose.connection.readyState === 1,
})
4. Zero-Overhead Static Route Resolution
Static endpoints bypass tree traversals automatically:
import { route } from 'exisjs/router'
// Instant Map-based resolution with zero allocation overhead
export default [
route.get('/', (req, res) => res.json({ status: 'healthy' })),
route.get('/ping', (req, res) => res.send('pong')),
]
Full Changelog: v0.7.10...v0.7.11