Back to Explore

streamich/memfs

GitHub
26 updates · last 90 days1 watchersOpen source

Last release:

memfs provides JavaScript file system utilities for Node.js and browsers, including an in-memory implementation of the Node.js fs API and the browser File System API. It’s useful for testing or running code that expects filesystem behavior without writing to a real disk, and it also includes adapters between the Node fs API and the browser File System API.

Project status

  • Actively maintained: The most recent upstream push was 2026-09-13, and the project has multiple memfs-related updates released within days (v4.78.0 through v4.74.0 on 2026-09-10 to 2026-09-13), indicating ongoing development rather than maintenance mode.
  • Update cadence: Recent activity is rapid and clustered, with several updates over roughly one week, plus frequent follow-on iterations (streaming, validation errors, argument normalization, and API behavior changes).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v4.78.1

    Release v4.78.1 primarily fixes the return shape of `.queryPermission()` to match what callers expect. The code changes go beyond that note, restructuring permission handling to return simple permission state strings instead of status objects, and removing the underlying permission status classes.

    Breaking
  • v4.78.0

    This release adds a new Node-compatible `cp` implementation in `@jsonjoy.com/fs-node` and wires it into the `Volume` and `fs.promises` APIs. It also updates the `fs` promise wrappers for `cp` and `copyFile` and expands test coverage around edge cases involving recursion, symlinks, and ancestor traversal.

    Features
  • v4.77.0

    v4.77.0 is a focused release around the project’s glob implementation. The code diff shows a substantial rewrite of `glob` across callback, synchronous, and promises APIs, along with updated option typing/behavior and a dependency bump for `glob-to-regex.js`.

    BreakingFeatures
  • v4.76.0

    v4.76.0 focuses on improvements to memfs's directory streaming implementation, specifically `.opendir()` and `Dir`. The code changes expand `Dir` to better preserve the original `path` input (including Buffer/Uint8Array), adjust directory entry construction (`Dirent`), and refine error handling and access checks.

    Features
  • v4.75.0

    v4.75.0 focuses on improving how this filesystem library formats and normalizes validation errors, and reducing duplication in validator logic. The code changes extend beyond the single PR note, introducing a new shared inspection/formatting implementation and changing where specific argument errors are constructed.

  • v4.74.0

    v4.74.0 introduces improved validation error reporting, moving toward standardized Node-like argument errors. The change adds a new shared argument error helper module and updates fs-node utilities and tests so invalid inputs (flags, mode, callback type, encoding) throw more consistent error codes and messages.

    Features
  • v4.73.0

    v4.73.0 makes a significant internal change to memfs' read/write implementation by centralizing argument normalization (added `packages/fs-node/src/readWriteArgs.ts`) and rewiring FileHandle/Volume to use it. The release notes only mention a general “improve read/write path”, but the diff shows multiple TypeScript type changes and behavioral cursor semantics changes.

    Features
  • v4.72.2

    Release v4.72.2 fixes memfs handling of relative stream/file operations so they resolve against the virtual cwd rather than an unintended global/default cwd. The code change goes beyond streams and updates core filename resolution to consistently use the filesystem instance's process.cwd.

  • v4.72.1

    v4.72.1 is a small patch release for memfs focused on readable web stream EOF behavior in the fs-node implementation. It adds a fix so BYOB (Bring Your Own Buffer) reads correctly complete at end-of-file and includes a regression test covering both BYOB and default readers.

  • v4.72.0

    Release v4.72.0 focuses on improving path validation errors. However, the code changes also adjust how invalid arguments are typed and reported (error codes and messages), which can affect consumers that assert on exact error strings or codes.

    Features
  • v4.71.1

    This release updates the Node-compatible directory (fs-node) iterator lifecycle to better match Node's behavior. The main change is in how `Dir` closes itself during and after async iteration, plus small guards around disposal and iteration state.

    Breaking
  • v4.71.0

    v4.71.0 focuses on normalizing errors to be more Node.js-like, including standardized `err.code`, `err.errno`, `err.syscall`, and path-related fields. The change also restructures error creation into new core modules and updates how errors propagate across watchers and worker boundaries.

    BreakingFeatures
  • v4.70.0

    This release adds a hard cap of 40 symbolic link hops during resolution and improves the algorithm used for `.open()` operations. The diff also shows several related behavior changes around trailing slashes, `O_NOFOLLOW`, and error-path reporting that are not described in the release notes.

    BreakingFeatures
  • v4.69.1

    Release v4.69.1 is a refactor aimed at improving how dependencies are shared across the memfs monorepo packages (PR #1281). The release notes only mention dependency refactoring, but the diff shows multiple code paths were moved or re-exported between packages, which can affect runtime behavior and deep imports.

  • v4.69.0

    Release v4.69.0 adds improved support for the POSIX O_NOFOLLOW flag. The implementation updates core path resolution in Superblock.open to detect symlinks and throws an ELOOP error, with new tests covering open/openSync and stream and promises APIs.

    BreakingFeatures
  • v4.68.2

    Release v4.68.2 is a bug fix release that changes append-mode write behavior to match Linux. The code now treats O_APPEND as always writing to the current end of the file, regardless of any caller-provided position.

    Breaking
  • v4.68.1

    This release changes memfs unlink behavior so that attempting to unlink a directory does not remove it. The release notes mention empty directories specifically. The code also broadens the restriction to all directory cases and standardizes the thrown error to an EPERM-style error.

  • v4.68.0

    v4.68.0 adds support for a node creation time (birth time), exposing it through Node and the fs-compatible Stats APIs. The change introduces Node.btime, includes it in serialization, and updates stats generation so reported birthtime values are stable and distinct from ctime.

    BreakingFeatures
  • v4.67.0

    Release v4.67.0 primarily updates the memfs Git File System Access (git-fsa) browser demo to persist the user-selected directory handle and reuse it on later visits. The code diff also includes several demo build/runtime changes (IndexedDB handle storage, worker removal, and webpack/dev-server adjustments) that are not mentioned in the release notes.

    Features
  • v4.66.1

    Release v4.66.1 is a small build-focused change across the memfs monorepo. The only functional-area change shown in the diff is enabling inline sources for sourcemaps (to embed sources in published sourcemaps), alongside the usual version bumps across packages.