Skip to content

v0.1.9

Choose a tag to compare

@github-actions github-actions released this 12 Nov 15:43
· 15 commits to main since this release

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