unstale

npm / memfs

memfs

What changed in memfs 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

5 breaking1 security1 deprecations12 new APIs and options2 performance6 behavior and defaults1 tooling15 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.1.1 on npm

memfs 443 changes

Breaking changes 5

  • Symlink resolution is now bounded at 40 and uses an improved algorithm for all open calls.

    4.70.0release notes

  • .unlink() no longer deletes empty directories.

    4.68.1release notes

  • Removed tslib from peerDependencies, changing the package's peer dependency requirements.

    4.66.0release notes

  • Relative paths are no longer allowed during snapshot restoration.

    4.57.7release notes

  • toTreeSync() sorts files and folders in its output.

    4.51.0release notes

Security 1

  • Negative truncate lengths are clamped to zero, preventing an uninitialized-memory leak.

    4.57.8release notes

Deprecations 1

  • Adds the deprecated Dirent.path property with a deprecation notice.

    4.52.0release notes

New APIs and options 12

  • The synchronous FSA worker timeout can now be configured.

    4.80.0release notes

  • A Node-compatible cp module is implemented, allowing developers to use cp functionality with memfs.

    4.78.0release notes

  • Adds glob support to memfs.

    4.77.0release notes

  • Adds support for file birth time.

    4.68.0release notes

  • FsaNodeFs now supports the recursive flag.

    4.65.0release notes

  • Adds a Node-to-FSA watcher bridge.

    4.63.0release notes

  • A FileSystemObserver implementation is available.

    4.61.0release notes

  • Event emission was added to fs-core.

    4.58.0release notes

  • A custom process implementation can now be injected for better testability.

    4.57.0release notes

  • A Result type is implemented, and error handling for exists methods is improved.

    4.53.0release notes

  • Adds the Dirent.parentPath property.

    4.52.0release notes

  • Adds disposable methods to Dir.

    4.52.0release notes

Performance 2

  • The read/write path was improved, which may affect performance when using memfs.

    4.73.0release notes

  • Improves Node buffer allocation and management to prevent O(n^2) overhead.

    4.50.0release notes

Behavior and default changes 6

  • Improvements to Dir change its behavior for developers using the API.

    4.76.0release notes

  • Improvements to .opendir() change its behavior for developers using the API.

    4.76.0release notes

  • Flags validation errors are improved, making validation failures clearer to developers.

    4.74.0release notes

  • Error normalization is more Node.js-like, affecting the errors developers receive.

    4.71.0release notes

  • The git-fsa directory handle is now persisted.

    4.67.0release notes

  • FSA writable handles now have locking.

    4.54.0release notes

Tooling 1

  • Published sourcemaps now embed sources, which can make source content available when debugging builds.

    4.66.1release notes

Fixes and other changes 15

  • Improves FS(A) error handling.

    4.79.0release notes

  • Returns the correct shape from queryPermission.

    4.78.1release notes

  • Error formatting and normalization are improved.

    4.75.0release notes

  • Relative streams are resolved from the virtual cwd.

    4.72.2release notes

  • BYOB file stream reads now finish at EOF.

    4.72.1release notes

  • Path validation errors are improved, making invalid paths easier to diagnose.

    4.72.0release notes

  • Directory iteration now matches Node's lifecycle.

    4.71.1release notes

  • Improved support for the O_NOFOLLOW flag.

    4.69.0release notes

  • O_APPEND behavior is aligned with Linux.

    4.68.2release notes

  • Fixes handling of drive letters in file URLs.

    4.66.0release notes

  • Enabled cpSync in fsSynchronousApiList.

    4.57.3release notes

  • Enabled statfsSync in fsSynchronousApiList.

    4.57.3release notes

  • Symlinks are now followed when checking for the executable flag.

    4.57.2release notes

  • Fixes EBADF when calling fileHandle.close after streaming via pipeline.

    4.57.1release notes

  • Leading ./ is normalized in relative glob patterns.

    4.56.11release notes