Repository navigation
RunTime-Now 2.0.0
The biggest release so far: rtn now runs npm packages, CommonJS code and your tests.
- npm packages: imports and
require()resolve throughnode_moduleswithpackage.json"exports"(subpaths,*patterns, conditions),"imports"(#internal),"main", scoped packages and nestednode_modules. Checked with lodash, zod, dayjs, chalk 5, date-fns, uuid, nanoid, yaml, semver, picocolors, ms, kleur, mitt and eventemitter3. - CommonJS:
require(),module.exports,__dirname/__filename,require.resolve/cache/main,createRequire(),.cjs/.ctsfiles and CommonJS entry points. ES modules import CommonJS (module.exports= default export, its properties = named exports), andrequire()loads ES modules without top-levelawait. - Node built-in modules:
Buffer/node:buffer,node:events(EventEmitter),node:util,node:assert(+assert/strict),node:os,node:url,node:crypto(createHash/createHmacwith sha256, sha1, md5,randomBytes,randomInt, …),node:timers(+timers/promises),node:module,node:tty,node:process;crypto.subtle.digest. All built-ins work with or withoutnode:.tests/cases/node-compat.mjsprints exactly what Node 22 prints. rtn test: a built-in test runner with the Jest/Bun API —describe/test/it,.skip/.only/.todo/.each, hooks, async anddonetests, timeouts, 30+expectmatchers,.resolves/.rejects, asymmetric matchers,mock()andspyOn(). Calm black/white/blue output, exit code 1 on failure.rtn init: creates a TypeScript project that runs and tests out of the box.- Faster startup: the built-in JavaScript is compiled to QuickJS bytecode at build time —
rtn -e 0takes ~6 ms (1.6: ~10 ms) even though rtn has ~4,000 more lines of built-in JS. processis anEventEmitter(process.on("exit")), plusprocess.emitWarning,global,setImmediate/clearImmediate.console.logshows deep objects like Node ([Map],[MyClass]instead of[Object]).
Breaking changes
process.versionnow reports the Node version whose APIs rtn follows (v22.12.0) andprocess.versions.nodeexists, so npm packages take their Node code paths. rtn's own version:process.versions.rtnorrtn.version.- A
.js/.tsfile that usesrequire()/module.exportsand noimport/exportnow runs as CommonJS (previously always an ES module). - Bare specifiers (
import x from "pkg") now resolve npm packages instead of throwing;fs,path,events… withoutnode:are the built-in modules.
Install
curl -fsSL https://byteforgestudiolab.github.io/RunTime-Now/install | bashAlready installed? Run rtn upgrade.

