Repository navigation
Releases
v0.2.2
Full Changelog: v0.2.1...v0.2.2
v0.2.1
v0.2.0
v0.2.0
N-API Native Addon Support
The big one. .node files now load and run. The full Node-API function table is implemented -- 149 extern "C" functions covering v1 through v9:
- Value creation: strings, numbers, booleans, objects, arrays, symbols, BigInt, dates
- Property access: get/set by name, index, or value; has_property, delete, own property names
- Functions: create, call, construct (new), get callback info
- Buffers: create, copy, external, get data pointer
- Error handling: throw, create, get/set last error
- References: create, delete, ref/unref, get value
- Async: napi_async_work (execute + complete), napi_create_promise / resolve / reject
- Thread-safe functions: create, call, acquire, release
- Type checking: typeof, is_array, instanceof, strict_equals, coerce
Addons using node-addon-api or raw N-API should work. Tested with a C addon exercising the core surface.
HTTP Response Cache (Rust-level)
Responses with Cache-Control: public, max-age=N are now cached in the hyper thread. Cache hits never cross to JavaScript -- they're served directly from Rust with zero overhead. Just set the header on your response; the runtime handles the rest.
TLS Server Support
tls.createServer({ cert, key }) now works. Uses rustls with async TLS handshake per connection. Accepted sockets use the same read/write/close ops as plain TCP.
Other Changes
jsebinary retired -- onlymaliaships now (jse.*globals remain as aliases)- Local tarball install:
malia install ./pkg.tgzandfile:specifiers work - HTTP: bodiless methods (GET/HEAD) skip body collection (faster)
- Cache module: oversized entries rejected, stale-while-revalidate triggers background refresh
- Cluster: duplicate
onlineevents fixed - Performance claims updated based on independent benchmark
- Honest framework compatibility docs (tested vs untested features)
Full Changelog: v0.1.9...v0.2.0
Full Changelog: v0.1.9...v0.2.0
v0.1.9
v0.1.9
Built-in Package Manager (npm replacement)
Malia now ships a full npm-compatible package manager. No separate Node.js installation required.
- 25 npm commands: install, uninstall, update, list, outdated, audit, init, link, pack, publish, prune, dedupe, rebuild, cache, config, info, fund, whoami, prefix, root, exec, run, test, start, version
npm/npx/nodeshims created on install -- existing workflows work unchanged- Lockfile generation:
package-lock.jsonv3 - Dependency resolution: semver ranges, peer deps, optional deps, bundled deps
- Download cache:
~/.malia/cachewith SHA-1 integrity verification - Private registries:
.npmrcauth tokens, scoped registries - Supply-chain security: lifecycle scripts (
postinstall) disabled by default -- opt in withMALIA_SCRIPTS=1
Concurrency Primitives
malia.parallel.map(items, fn, {concurrency})-- bounded parallel executionmalia.parallel.filter,.each,.reduce,.race,.any,.pool,.pipelinemalia.mutex()/malia.semaphore(n)-- async locksmalia.retry(fn, {attempts, backoff})-- retry with exponential backoffmalia.timeout(promise, ms)-- deadline enforcementmalia.batch(items, size, fn)-- chunked processingmalia.debounce(fn, ms)/malia.throttle(fn, ms)
Built-in Cron Scheduler
malia.cron("*/5 * * * *", fn)-- replacesnode-cron- 5/6-field expressions, ranges, steps, day/month names
cron.every("10s", fn),cron.daily(),cron.weekly(),cron.monthly()- Job control:
start(),stop(),trigger(),runCount,lastRun
Security
jse.secure(handler)-- built-in security headers middleware (replaceshelmet)jse.rateLimit(handler, {max, window})-- per-IP rate limiting (replacesexpress-rate-limit)jse.cors(handler, {origin})-- CORS middleware with preflight (replacescors)setTimeout("string")blocked (eval-based code injection)- Tarball extraction hardened: symlinks/hardlinks rejected, paths canonicalized
- HTTP request smuggling mitigated (conflicting Content-Length + Transfer-Encoding)
- Hot-reload restricted to project directory
Security Engineer Toolkit
malia scan-- static analysis for 30+ vulnerability patternsmalia secrets-- detect leaked API keys (AWS, GitHub, Stripe, OpenAI, Slack, SSH, JWT)malia permissions <file>-- show what permissions a script needs before runningmalia sbom-- generate CycloneDX 1.5 SBOM for compliancemalia deps --licenses-- license audit across dependencies
Developer & Sysadmin Tools
malia doctor-- project health checkmalia serve .-- instant static file server with directory listing, ETags, MIME typesmalia clean [--all]-- remove node_modules, caches, temp filesmalia upgrade-- check for latest versionmalia env-- show resolved environment variables (secrets auto-masked)- Auto
.envloading at startup (replacesdotenv)
Node.js API Additions
EventEmitter.captureRejections,errorMonitor,setMaxListeners,addAbortListenercrypto.hkdf/hkdfSync(HMAC-based Key Derivation)crypto.X509Certificateutil.parseArgs,util.styleText,util.MIMETypeModule._resolveFilename,Module._loadprocess.report,process.getBuiltinModule,process.abort,process.allowedNodeEnvironmentFlagsChildProcess.ref()/unref()/connectedtest.mock.fn()/test.mock.method()/test.mock.reset()Buffer.allocUnsafeSlow,Buffer.prototype.swap64fs.chown/fs.chownSync
npm Packages Replaced (built-in)
| Package | Malia built-in |
|---|---|
| dotenv (160M/week) | Auto .env loading |
| p-limit / p-map (200M+) | malia.parallel.map |
| p-retry (30M) | malia.retry |
| p-timeout (30M) | malia.timeout |
| node-cron (4M) | malia.cron |
| helmet (6M) | jse.secure() |
| express-rate-limit (3M) | jse.rateLimit() |
| cors (14M) | jse.cors() |
| http-server (5M) | malia serve . |
Full Changelog: v0.1.8...v0.1.9
Full Changelog: v0.1.8...v0.1.9
Full Changelog: v0.1.8...v0.1.9
Full Changelog: v0.1.8...v0.1.9
Full Changelog: v0.1.8...v0.1.9
v0.1.8
What's New in 0.1.8
Built-in AI Toolkit (malia.ai)
Zero-config AI integration. Auto-detects local LLMs and cloud providers. No npm packages.
// One-liner — auto-detects Ollama, vLLM, LM Studio
const reply = await malia.ai("What is quantum computing?");
// Frontier models — infers provider from model name
const ai = malia.ai("gpt-4o"); // OPENAI_API_KEY
const ai = malia.ai("claude-sonnet-4-20250514"); // ANTHROPIC_API_KEY
const ai = malia.ai("gemini-2.0-flash"); // GOOGLE_API_KEY
const ai = malia.ai("grok-3"); // XAI_API_KEY
// Streaming
for await (const token of ai.stream("Explain gravity")) {
process.stdout.write(token);
}
// Embeddings + similarity
const vec = await ai.embed("search query");
const score = malia.ai.similarity(vecA, vecB);Supported: OpenAI, Anthropic (native Messages API), Google Gemini (native generateContent API), Mistral, Groq, DeepSeek, Together, Fireworks, Perplexity, xAI, plus all local OpenAI-compatible endpoints.
Hot Module Replacement
Zero-downtime code swaps on a running server. No restart, no port rebind, no dropped connections.
const server = jse.serve({ port: 3000 }, handler);
await server.hot("./handler.mjs"); // watches file, reloads on change
server.reload(newHandler); // programmatic swapThe HTTP socket stays open. In-flight requests finish with the old handler. New requests use the new handler immediately.
HTTP Connection Pooling
http.Agent({ keepAlive: true }) reuses TCP sockets across requests.
Request Body Streaming
Bodies > 10 MB stream through a channel instead of buffering in memory.
OpenTelemetry Auto-Instrumentation
jse.trace.autoInstrument(); // trace all fetch() calls
jse.serve({ port: 3000 }, jse.trace.instrumentedHandler(handler));Configurable Serve Limits
No arbitrary caps. handlerTimeout, handlerTimeoutMs, and timeout accepted as aliases.
jse.serve({ limits: { requestTimeoutMs: 600000, maxBodyBytes: 100 * 1024 * 1024 } }, handler);80+ Bug Fixes
Security: HTTP response header injection (CRLF) blocked in ServerResponse.setHeader
Node.js Compatibility: IncomingMessage close event, async iterator body, createServer(options, listener), _implicitHeader/headersSent, GET/HEAD no Content-Length, proper error codes (408/413/502/504), server.address(), Buffer.from validation, Buffer.write UTF-8 safety, Response.clone() WHATWG spec, and many more.
Performance: Hex encode lookup table, latin1/ascii batched decode, Buffer.concat fast path, Response.json skip Headers allocation, serve hot path inlined, randomUUID inline nibble lookup.
Compatibility
243/243 Node.js API surface checks pass (100%).
Full Changelog: v0.1.7...v0.1.8
v0.1.7
v0.1.7 -- Bug Fixes
Focused on production stability and edge-case fixes across the runtime.
Bug Fixes
- HTTP server: client disconnecting mid-response no longer crashes the server
- Buffer: fixed
toString()with negative start, unknown encoding handling, multi-bytewrite()splitting - process.hrtime(): fixed seconds being 1000x too large
- process.stdin: now emits Buffer instead of Uint8Array
- fs: fixed error objects missing
.codeproperty - HTTP client: fixed
IncomingMessageasync iterator,pipe()respecting{end: false} - net.Socket: fixed
connect()Unix path normalization,_writeafter destroy crash - crypto: multiple edge-case fixes in hash and cipher operations
- serve: proper error status codes (413, 408, 502, 504, 503) with Content-Type headers
Improvements
- Linux builds run on glibc 2.28+ (RHEL 8+, Debian 10+, Ubuntu 20.04+)
- .deb and .rpm packages for x64 and arm64
- Node.js API compatibility: 243/243 checks passing
v0.1.6
What's changed
Node compatibility
- CJS module semantics match Node:
module.idis"."for the entry file, full path for dependencies.module.loadedset totrueafter execution.process.mainModulepoints to the entry module (CJS only;undefinedfor ESM entries). require.cacheis a plain object: keyed by absolute filename, same as Node. Deleting an entry forces the nextrequire()to reload the module — hot-reload tools and test runners work correctly.- No global
requirein ESM: reverted to match Node 22+ behavior.typeof requireisundefinedin.mjsfiles. UsecreateRequire(import.meta.url)when needed. - EPIPE on stdout/stderr: broken pipes now produce
{ code: "EPIPE", errno: -32, syscall: "write" }instead of"Uncaught (in promise) undefined".console.logsilently swallows pipe errors, same as Node. - Target Node v26.12.0:
process.version,process.versions.node, and CLI--versionupdated.
Stability
- HTTP client disconnect no longer crashes the server: a client closing the connection mid-response is handled gracefully — no unhandled promise rejection, no server restart needed.
- Windows path handling:
require.resolveand dynamicrequire()now produce correct paths on Windows (drive letter handling in__filenameOf). - Windows CI: connection error assertions relaxed for platform differences.
Platform
- Linux builds target glibc 2.28+ for broader distro compatibility.
- Version string sourced from
Cargo.tomlin one place.