Repository navigation
esrun@0.45.0
Removed
esrun --import-policy(D194). The runtime loader judged modules by name and
could not pin what they contained, and a built program — the way esrun runs
in production — has its packages inlined, so the loader never saw them.
Which packages ship is now decided only at build time, by esdev's dependency
policy; a bundle runs without--allow-imports, so nothing else can load.
--allow-imports=<list>now says so.import.meta.resolveand the loader are
otherwise unchanged.
Changed
-
On Windows, environment variable names are case-insensitive, as Windows
makes them (D195).env.PATH,env.pathand"PATH" in envreach the
variable the OS spellsPath, and a write or delete in any case changes
that one variable;--allow-env=PATHgrants it; an--env-fileentry or a
RUNTIME_ENVdefault replaces or keeps it instead of adding a second
variable beside it; andruntime:system'senvoverinheritEnvsets or
removes it, where{ PATH: undefined }had let the inheritedPaththrough
to the child. On Linux and macOS names stay exact. -
BSON.decodebuilds documents and the BSON class instances in V8's fast
mode, asJSON.parsebuilds objects, where it used to build dictionaries
(D187). Documents with the same fields share a shape, so reading them is
several times faster, a decode holds less heap and costs less to collect,
and a typical collection decodes faster overall; a document of only plain
fields decodes somewhat slower.bench/bson/decode.mjsmeasures it. The
MongoDB driver's results come through the same decoder.
Added
environment()inruntime:process: the deployment environment, read at
run time —RUNTIME_ENV, elseNODE_ENV, else"production"(D192).
RUNTIME_ENVis proposed as one name for every runtime and language, for
the questionNODE_ENVhas been made to answer alongside the kind of
build; it needs--allow-env=RUNTIME_ENV,NODE_ENVand nothing more.
process.env.NODE_ENVin bundles is unchanged.JSONCandJSON5inruntime:serialization(D191), each mirroring the
globalJSONwithparse(text, reviver?),stringify(value, replacer?, space?)andvalidate(text, opts?).JSONCreads JSON with comments and
trailing commas, astsconfig.jsonand VS Code's settings are written;
JSON5reads JSON5 1.0.0. Both give back exactly whatJSON.parsebuilds
for the JSON they share, built by the engine straight from the text.
JSONC.stringifyisJSON.stringify;JSON5.stringifywrites JSON5 as the
json5package does, withtoJSON5()and aquoteoption. Errors name the
dialect and endat line L column C.JSONC.edit(text, path, value)andJSON5.edit(text, path, value)change
one value in a config file and keep every other byte: comments, blank
lines, key order and quotes (D191). A missing key is added in the style of
its siblings, missing objects on the path are created, andundefined
removes the member with its comma and its line's comment. Ajson_edit
fuzz target checks that every edit means exactly the change asked for.es-runtime-json, the reader behind the comingJSONCandJSON5in
runtime:serialization(D191). JSONC is JSON with//and/* */
comments and one trailing comma; JSON5 is JSON5 1.0.0 in full. One lexer
reads both and reports each value to a sink, so the engine can build values
with no intermediate tree. Nesting stops at 256 levels, and errors give the
line and column. Every case of JSONTestSuite and json5-tests runs in
cargo test, and ajsonfuzz target checks that whatever JSONC reads,
JSON5 reads the same way.
Fixed
- A PostgreSQL
cancel()— direct, or from an abortedsignal— returns only
once the server has acted on it, as libpq'sPQcanceldoes. It returned as
soon as the request was sent, so a cancel that arrived after its query had
finished, or one made with nothing running, cancelled the next query
instead: 297 of 300 queries sent straight after an idlecancel()were.
Testing / CI
bench/run.shgainsjsonc_largeandjson5_large: each runtime parses a
5,000-record document with what it ships —runtime:serialization, Bun's
Bun.JSONCandBun.JSON5, Deno's@std/jsonc, and for Node (and Deno's
JSON5) thejsonc-parserandjson5packages — and must read it the same.scripts/fs-discipline.shlists the DNS resolver's read of
/etc/resolv.confand the MongoDB specification tests' reads, which had
left the check failing.- The sharded hibernating-room test waits for both clients to receive the
last broadcast before printing, where it waited for one and failed when the
other's copy was still in flight. - The MongoDB job waits for its servers by asking each from inside its own
container, for up to three minutes, and prints the server's log when one
never answers. It started amongoshcontainer per probe and gave up after
two minutes without saying why. - The MongoDB 8 leg of the driver job checks the runner's kernel first.
MongoDB 8 refuses to start on Linux 6.19 through 7.0.13, no MongoDB release
fixes it, and GitHub's runners are on such kernels, so there the leg posts a
warning and stops; MongoDB 7 runs every driver test, and the leg resumes by
itself on a kernel from 7.0.14. - The release leaves
es-runtime-jsonunpublished, as it does the other
internal crates; it had tried to publish it to crates.io and failed. - The benchmark's comparison dependencies move to Hono 4.13 and
puppeteer-core 25.16, past advisories in Hono'sserveStaticand in the zod
that puppeteer pulls in;pnpm auditis clean. Nothing in them ships. - The fuzz build turns on
stdforbranches, which turso_core brings in
without it. On nightly that crate then callscore::intrinsics::abort,
which nightly removed on 2026-10-27, so every fuzz run had failed to build.