• v2.19.0 4e6721d84c

    v2.19.0
    All checks were successful
    release / build-and-release (push) Successful in 24s
    Stable

    littleisland released this 2026-11-07 07:46:56 +00:00 | 73 commits to main since this release

    NOE v2.19.0

    This release adds sessionStorage and explicit-file localStorage through
    the Web Storage interface. The implementation is dfa497e. No runtime
    dependency or engine change is required.

    Session and persistent storage

    Storage and sessionStorage accompany the default Web APIs. Each runtime,
    including each Worker, starts with its own empty session store. Use the stable
    global object; new Storage() is not supported.

    sessionStorage.setItem("message", "hello");
    console.log(sessionStorage.getItem("message"));
    

    Persistent storage has no default location. CLI run and eval accept
    --local-storage path before their script/code operand:

    noe run --local-storage ./state.json examples/storage/web-storage.js
    noe eval --local-storage ./state.json 'console.log(localStorage.length)'
    

    The containing directory must already exist. The first changing mutation
    creates the file. Each synchronous change commits atomically through the
    existing filesystem backend before returning. Failed writes preserve previous
    data, invalid stored documents raise InvalidStateError, and read-only
    filesystem mutations raise SecurityError. Storage does not silently fall
    back to memory. Keys and values preserve UTF-16, including unpaired surrogates.

    Both objects provide length, key, getItem, setItem, removeItem, and
    clear, plus named property assignment, reads, deletion, and enumeration.
    Missing items return null through methods and undefined through property
    reads. DOMString conversion, required arguments, receiver checks, and
    method-name collisions follow the documented Storage contract. Instances
    cannot be structured-cloned or transferred.

    Go selection and compatibility

    profile := stdlib.Profile{
        Environment: stdlib.Environment{Cwd: "/"},
        Modules: stdlib.Modules{
            FS: &stdlib.FileSystemOptions{Root: dataDirectory},
            LocalStorage: &stdlib.LocalStorageOptions{Path: "state.json"},
        },
    }
    

    Modules.LocalStorage requires the existing FS capability. Root, Cwd, and
    ReadOnly apply, and paths/options are snapshotted before Worker creation.
    Nil leaves the localStorage global absent. Selecting storage adds no network
    or command authority. Session storage needs no external capability.

    Go source compatibility: LocalStorage adds a field to Modules.
    Consumers using unkeyed struct literals must move to named fields. Existing
    keyed selections and the public /v2 module path remain supported. No existing
    JavaScript API or import is removed.

    Host model and limits

    Main runtimes and Workers selecting the same canonical file observe committed
    local data. Operations are serialized within the NOE process. Separate OS
    processes and ordinary filesystem edits do not join that coordination; use
    noe:sqlite for cross-process transactional state. A multi-call
    get/increment/set sequence is not a transaction.

    NOE has no Window, Document, browser origin partition, or storage events.
    Worker exposure is a NOE extension; sessions remain runtime-local. Storage is
    synchronous, unencrypted, and has no added quota. The Proxy facade rejects
    Object.defineProperty requests with configurable: false before mutation;
    configurable data descriptors are supported.

    See the example,
    Go embedding guide,
    API reference, and
    implementation contract.

    Verification and distribution

    Implementation checks cover public string/property semantics, file authority,
    UTF-16 persistence, Worker sharing/isolation, option snapshots, cleanup,
    concurrent updates, CLI executions/example, declarations/docs, and external Go
    consumers. A prototype descriptor getter deadlock found during bounded review
    was fixed before release. Its regression fails on the earlier source and
    passes on the corrected implementation; focused race tests and fix-only
    re-review pass.

    Release preparation reuses unchanged implementation results. CI builds the
    six Linux/macOS/Windows amd64/arm64 assets and SHA256SUMS from the immutable tag
    without repeating local source suites. Native execution is Linux amd64; other
    targets receive build/checksum/metadata verification. Go 1.27.2, go-quickjs
    v0.32.0, go-intl v0.8.0, CGO-disabled distribution builds, and disabled JIT
    remain selected.

    This release request includes verification and installation of the published
    native asset at both existing vm201 executable paths, with previous binaries
    retained. Other hosts, service restarts, and noebot changes are excluded. See
    the release checkpoints for publication and
    installation evidence.

    Downloads