# What changed in memfs

> 43 changes in memfs 4 from its official release notes, upgrade guides and advisories: 5 breaking, 1 deprecations, 1 security, 12 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/memfs/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## memfs 4

### Breaking changes

- Symlink resolution is now bounded at 40 and uses an improved algorithm for all open calls. (4.70.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.70.0)
- .unlink() no longer deletes empty directories. (4.68.1) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.68.1)
- Removed tslib from peerDependencies, changing the package's peer dependency requirements. (4.66.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.66.0)
- Relative paths are no longer allowed during snapshot restoration. (4.57.7) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.57.7)
- toTreeSync() sorts files and folders in its output. (4.51.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.51.0)

### Security

- Negative truncate lengths are clamped to zero, preventing an uninitialized-memory leak. (4.57.8) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.57.8)

### Deprecations

- Adds the deprecated Dirent.path property with a deprecation notice. (4.52.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.52.0)

### New APIs and options

- The synchronous FSA worker timeout can now be configured. (4.80.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.80.0)
- A Node-compatible cp module is implemented, allowing developers to use cp functionality with memfs. (4.78.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.78.0)
- Adds glob support to memfs. (4.77.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.77.0)
- Adds support for file birth time. (4.68.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.68.0)
- FsaNodeFs now supports the recursive flag. (4.65.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.65.0)
- Adds a Node-to-FSA watcher bridge. (4.63.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.63.0)
- A FileSystemObserver implementation is available. (4.61.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.61.0)
- Event emission was added to fs-core. (4.58.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.58.0)
- A custom process implementation can now be injected for better testability. (4.57.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.57.0)
- A Result type is implemented, and error handling for exists methods is improved. (4.53.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.53.0)
- Adds the Dirent.parentPath property. (4.52.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.52.0)
- Adds disposable methods to Dir. (4.52.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.52.0)

### Performance

- The read/write path was improved, which may affect performance when using memfs. (4.73.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.73.0)
- Improves Node buffer allocation and management to prevent O(n^2) overhead. (4.50.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.50.0)

### Behavior and default changes

- Improvements to `Dir` change its behavior for developers using the API. (4.76.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.76.0)
- Improvements to `.opendir()` change its behavior for developers using the API. (4.76.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.76.0)
- Flags validation errors are improved, making validation failures clearer to developers. (4.74.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.74.0)
- Error normalization is more Node.js-like, affecting the errors developers receive. (4.71.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.71.0)
- The git-fsa directory handle is now persisted. (4.67.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.67.0)
- FSA writable handles now have locking. (4.54.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.54.0)

### Tooling

- Published sourcemaps now embed sources, which can make source content available when debugging builds. (4.66.1) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.66.1)

### Fixes and other changes

- Improves FS(A) error handling. (4.79.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.79.0)
- Returns the correct shape from queryPermission. (4.78.1) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.78.1)
- Error formatting and normalization are improved. (4.75.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.75.0)
- Relative streams are resolved from the virtual cwd. (4.72.2) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.72.2)
- BYOB file stream reads now finish at EOF. (4.72.1) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.72.1)
- Path validation errors are improved, making invalid paths easier to diagnose. (4.72.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.72.0)
- Directory iteration now matches Node's lifecycle. (4.71.1) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.71.1)
- Improved support for the O_NOFOLLOW flag. (4.69.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.69.0)
- O_APPEND behavior is aligned with Linux. (4.68.2) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.68.2)
- Fixes handling of drive letters in file URLs. (4.66.0) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.66.0)
- Enabled cpSync in fsSynchronousApiList. (4.57.3) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.57.3)
- Enabled statfsSync in fsSynchronousApiList. (4.57.3) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.57.3)
- Symlinks are now followed when checking for the executable flag. (4.57.2) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.57.2)
- Fixes EBADF when calling fileHandle.close after streaming via pipeline. (4.57.1) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.57.1)
- Leading ./ is normalized in relative glob patterns. (4.56.11) — [release notes](https://github.com/streamich/memfs/releases/tag/v4.56.11)
