Skip to content

Releases

v0.2.2

Choose a tag to compare

@github-actions github-actions released this 13 Nov 16:10

Full Changelog: v0.2.1...v0.2.2

v0.2.1

Choose a tag to compare

@github-actions github-actions released this 13 Nov 15:02

Full Changelog: v0.2.0...v0.2.1

v0.2.0

Choose a tag to compare

@loreste loreste released this 13 Nov 13:29

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

  • jse binary retired -- only malia ships now (jse.* globals remain as aliases)
  • Local tarball install: malia install ./pkg.tgz and file: specifiers work
  • HTTP: bodiless methods (GET/HEAD) skip body collection (faster)
  • Cache module: oversized entries rejected, stale-while-revalidate triggers background refresh
  • Cluster: duplicate online events 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

Choose a tag to compare

@github-actions github-actions released this 12 Nov 15:43

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 / node shims created on install -- existing workflows work unchanged
  • Lockfile generation: package-lock.json v3
  • Dependency resolution: semver ranges, peer deps, optional deps, bundled deps
  • Download cache: ~/.malia/cache with SHA-1 integrity verification
  • Private registries: .npmrc auth tokens, scoped registries
  • Supply-chain security: lifecycle scripts (postinstall) disabled by default -- opt in with MALIA_SCRIPTS=1

Concurrency Primitives

  • malia.parallel.map(items, fn, {concurrency}) -- bounded parallel execution
  • malia.parallel.filter, .each, .reduce, .race, .any, .pool, .pipeline
  • malia.mutex() / malia.semaphore(n) -- async locks
  • malia.retry(fn, {attempts, backoff}) -- retry with exponential backoff
  • malia.timeout(promise, ms) -- deadline enforcement
  • malia.batch(items, size, fn) -- chunked processing
  • malia.debounce(fn, ms) / malia.throttle(fn, ms)

Built-in Cron Scheduler

  • malia.cron("*/5 * * * *", fn) -- replaces node-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 (replaces helmet)
  • jse.rateLimit(handler, {max, window}) -- per-IP rate limiting (replaces express-rate-limit)
  • jse.cors(handler, {origin}) -- CORS middleware with preflight (replaces cors)
  • 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 patterns
  • malia secrets -- detect leaked API keys (AWS, GitHub, Stripe, OpenAI, Slack, SSH, JWT)
  • malia permissions <file> -- show what permissions a script needs before running
  • malia sbom -- generate CycloneDX 1.5 SBOM for compliance
  • malia deps --licenses -- license audit across dependencies

Developer & Sysadmin Tools

  • malia doctor -- project health check
  • malia serve . -- instant static file server with directory listing, ETags, MIME types
  • malia clean [--all] -- remove node_modules, caches, temp files
  • malia upgrade -- check for latest version
  • malia env -- show resolved environment variables (secrets auto-masked)
  • Auto .env loading at startup (replaces dotenv)

Node.js API Additions

  • EventEmitter.captureRejections, errorMonitor, setMaxListeners, addAbortListener
  • crypto.hkdf / hkdfSync (HMAC-based Key Derivation)
  • crypto.X509Certificate
  • util.parseArgs, util.styleText, util.MIMEType
  • Module._resolveFilename, Module._load
  • process.report, process.getBuiltinModule, process.abort, process.allowedNodeEnvironmentFlags
  • ChildProcess.ref() / unref() / connected
  • test.mock.fn() / test.mock.method() / test.mock.reset()
  • Buffer.allocUnsafeSlow, Buffer.prototype.swap64
  • fs.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

Choose a tag to compare

@github-actions github-actions released this 10 Nov 21:49

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 swap

The 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

Choose a tag to compare

@github-actions github-actions released this 27 Oct 17:28

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-byte write() splitting
  • process.hrtime(): fixed seconds being 1000x too large
  • process.stdin: now emits Buffer instead of Uint8Array
  • fs: fixed error objects missing .code property
  • HTTP client: fixed IncomingMessage async iterator, pipe() respecting {end: false}
  • net.Socket: fixed connect() Unix path normalization, _write after 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

Choose a tag to compare

@github-actions github-actions released this 19 Oct 16:06

What's changed

Node compatibility

  • CJS module semantics match Node: module.id is "." for the entry file, full path for dependencies. module.loaded set to true after execution. process.mainModule points to the entry module (CJS only; undefined for ESM entries).
  • require.cache is a plain object: keyed by absolute filename, same as Node. Deleting an entry forces the next require() to reload the module — hot-reload tools and test runners work correctly.
  • No global require in ESM: reverted to match Node 22+ behavior. typeof require is undefined in .mjs files. Use createRequire(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.log silently swallows pipe errors, same as Node.
  • Target Node v26.12.0: process.version, process.versions.node, and CLI --version updated.

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.resolve and dynamic require() 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.toml in one place.

v0.1.4

Choose a tag to compare

@github-actions github-actions released this 15 Oct 11:31

Full Changelog: v0.1.3...v0.1.4

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 14 Oct 13:58

Full Changelog: v0.1.2...v0.1.3

v0.1.2

Choose a tag to compare

@github-actions github-actions released this 14 Oct 12:47

Full Changelog: v0.1.1...v0.1.2