Skip to content

esrun@0.45.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 22:44
· 128 commits to main since this release
e246ebc

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.resolve and the loader are
    otherwise unchanged.

Changed

  • On Windows, environment variable names are case-insensitive, as Windows
    makes them (D195). env.PATH, env.path and "PATH" in env reach the
    variable the OS spells Path, and a write or delete in any case changes
    that one variable; --allow-env=PATH grants it; an --env-file entry or a
    RUNTIME_ENV default replaces or keeps it instead of adding a second
    variable beside it; and runtime:system's env over inheritEnv sets or
    removes it, where { PATH: undefined } had let the inherited Path through
    to the child. On Linux and macOS names stay exact.

  • BSON.decode builds documents and the BSON class instances in V8's fast
    mode, as JSON.parse builds 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.mjs measures it. The
    MongoDB driver's results come through the same decoder.

Added

  • environment() in runtime:process: the deployment environment, read at
    run time — RUNTIME_ENV, else NODE_ENV, else "production" (D192).
    RUNTIME_ENV is proposed as one name for every runtime and language, for
    the question NODE_ENV has been made to answer alongside the kind of
    build; it needs --allow-env=RUNTIME_ENV,NODE_ENV and nothing more.
    process.env.NODE_ENV in bundles is unchanged.
  • JSONC and JSON5 in runtime:serialization (D191), each mirroring the
    global JSON with parse(text, reviver?), stringify(value, replacer?, space?) and validate(text, opts?). JSONC reads JSON with comments and
    trailing commas, as tsconfig.json and VS Code's settings are written;
    JSON5 reads JSON5 1.0.0. Both give back exactly what JSON.parse builds
    for the JSON they share, built by the engine straight from the text.
    JSONC.stringify is JSON.stringify; JSON5.stringify writes JSON5 as the
    json5 package does, with toJSON5() and a quote option. Errors name the
    dialect and end at line L column C.
  • JSONC.edit(text, path, value) and JSON5.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, and undefined
    removes the member with its comma and its line's comment. A json_edit
    fuzz target checks that every edit means exactly the change asked for.
  • es-runtime-json, the reader behind the coming JSONC and JSON5 in
    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 a json fuzz target checks that whatever JSONC reads,
    JSON5 reads the same way.

Fixed

  • A PostgreSQL cancel() — direct, or from an aborted signal — returns only
    once the server has acted on it, as libpq's PQcancel does. 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 idle cancel() were.

Testing / CI

  • bench/run.sh gains jsonc_large and json5_large: each runtime parses a
    5,000-record document with what it ships — runtime:serialization, Bun's
    Bun.JSONC and Bun.JSON5, Deno's @std/jsonc, and for Node (and Deno's
    JSON5) the jsonc-parser and json5 packages — and must read it the same.
  • scripts/fs-discipline.sh lists the DNS resolver's read of
    /etc/resolv.conf and 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 a mongosh container 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-json unpublished, 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's serveStatic and in the zod
    that puppeteer pulls in; pnpm audit is clean. Nothing in them ships.
  • The fuzz build turns on std for branches, which turso_core brings in
    without it. On nightly that crate then calls core::intrinsics::abort,
    which nightly removed on 2026-10-27, so every fuzz run had failed to build.