memfs v4 has been released, install 4.2.0 NPM package.
File System Access API
memfs added adapters for File System Access (FAS) API, which is a file system API available in browsers. FSA can write to a real user folder, which user picks; or without any permissions can write to a virtual file system, called OPFS (Origin Private File System). memfs implements adapters, which:
Construct a Node's fs-like API out of the FSA API.
In browser, support for synchronous fs methods is also available using a WebWorker.
Also, the other way around, memfs can provide FSA API on top of any fs-like file system.
Other notable changes
In-memory fs changes
A number of in-memroy fs bugs were fixed.
Type interfaces of methods and options objects for in-memory fs were improved.
mkdirp and mkdripSync were removed, they were deprecated before. (You can pass the "recursive" flag to mkdir and mkdirSync, instead.)
Many re-usable Node.js fs utilities now live in the /src/node folder.
Promises API methods are now bound by default to their this object, just like in native fs module.
crudfs and casfs
crudfs implementation on top of Node fs was added.
crudfs implementation on top of File System Access API was added.
casfs implementation on top of crudfs was added.
print utility was added which allows to recursively print a directory tree to terminal.
snapshot utility was added which allows to create recursive binary snapshots of folders and then load them back into some folder.
The /demo folder now contains multiple Webpack demos.
Build changes and deprecations
TypeScript was upgraded from version 4 to 5.
tslib is now included as peer dependency, instead of TypeScript helpers being emitted into distributable.
TypeScript build target of the distributable is no es2017, instead of previously es5.
The library is now tested on Node v18+ versions.
BigInt shim is no longer shipped, memfs will rely on the BigInt provided by the JavaScript environment. You can shim that global, if necessary.
fs-monkey dependemcy was removed.
New features in this major release are marked as experimental, which means those APIs are in preview, their public interface may have breaking changes even across minor releases.
CircleCI was removed, now GitHub actions power all builds and releases.
The next branch was tested, which deploys pre-releases.
Bug Fixes
* π add support for unknown nodes (77786f1)
* π allow readin into various kinds of buffers (361812d)
* π allow readin into various kinds of buffers (e9c70e9)
* π allow to seek in file (c04895b)
* π allow to seek in file (b363689)
* π correctly handle directory paths (ea909e8)
* π do not allow empty children names (f014fd8)
* π do not allow empty children names (43da1d6)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps memfs from 3.6.0 to 4.2.0.
Release notes
Sourced from memfs's releases.
... (truncated)
Changelog
Sourced from memfs's changelog.
... (truncated)
Commits
af1e9d1
Release 4.2.075e60a5
docs: remove v4 notice7556e5b
chore(release): 4.1.0 [skip ci]32dd55a
Merge pull request #926 from streamich/next491272b
chore: π€ bump compile target to es2017dec27b3
chore(release): 4.1.0-next.5 [skip ci]01381cf
Merge pull request #930 from streamich/snapshotsdb54c49
docs: βοΈ add snapshto docseb3a62c
style: π run Prettier41f9b8c
feat: πΈ add json encoding for snapshotsDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)