Skip to content

Releases: streamich/memfs

v4.2.2

15 Sep 22:32
Compare
Choose a tag to compare

4.2.2 (2023-09-15)

Bug Fixes

v4.2.1

07 Aug 19:29
Compare
Choose a tag to compare

4.2.1 (2023-08-07)

Bug Fixes

  • don't error when watched directory gets renamed (#939) (b431b08)

memfs v4

26 Jun 12:40
Compare
Choose a tag to compare

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-memory 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 dependency 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)
* πŸ› handle root folder better (89bbffd)
* πŸ› handle root folder better (76de780)
* πŸ› improve file opening and closing logic (403c271)
* πŸ› throw "ENOENT" and "ENOTDIR" when folder or file 404 (5de4faa)
* πŸ› throw "ENOENT" and "ENOTDIR" when folder or file 404 (ddd5d56)

Features

  • 🎸 add .toTree() to Volume (2d5c4cb)
  • 🎸 add .truncate() method (038ab36)
  • 🎸 add .truncate() method (085335c)
  • 🎸 add ability to close files (0db56be)
  • 🎸 add ability to close files (d3828a8)
  • 🎸 add ability to create sub directories (8f15bd9)
  • 🎸 add ability to create sub directories (528c807)
  • 🎸 add ability to remove all files (76cabc7)
  • 🎸 add ability to remove all files (566e29b)
  • 🎸 add appendFileSync() method (57192fe)
  • 🎸 add appendFileSync() method (27411e4)
  • 🎸 add basenem() utility (8b27695)
  • 🎸 add basenem() utility (43354e5)
  • 🎸 add binary serialization to snapshots (c1cd615)
  • 🎸 add copyFile() method (de2bb0a)
  • 🎸 add copyFile() method (5e207c4)
  • 🎸 add copyFileSync() method (7e0137c)
  • 🎸 add copyFileSync() method (5fc1bac)
  • 🎸 add createSwapFile() method (dfdb908)
  • 🎸 add createSwapFile() method (b07ce79)
  • 🎸 add crudfs types (18c0658)
  • 🎸 add existsSync() method (0492a98)
  • 🎸 add existsSync() method (073ec6b)
  • 🎸 add fstatSync() method (f13ddb7)
  • 🎸 add fstatSync() method (6b1597a)
  • 🎸 add initial writing implementation (2f9542c)
  • 🎸 add initial writing implementation (6a50382)
  • 🎸 add integrity check on read (710eb2f)
  • 🎸 add json encoding for snapshots (41f9b8c)
  • 🎸 add lstat() and fstat() methods (ce5dd5e)
  • 🎸 add lstat() and fstat() methods (e147d58)
  • 🎸 add missing callback API methods and some sync API ones (956533a)
  • 🎸 add missing promises API types (f6727f3)
  • 🎸 add missing synchronous method types (ac38b5d)
  • 🎸 add mkdirSync() method (57f386b)
  • 🎸 add mkdirSync() method (bcad970)
  • 🎸 add mkdtempSync() method (1ac2df4)
  • 🎸 add mkdtempSync() method (68033dd)
  • 🎸 add options to promises.rmdir() method (ce268bb)
  • 🎸 add options to promises.rmdir() method (0628d56)
  • 🎸 add pathToLocation() utility (8e0136a)
  • 🎸 add pathToLocation() utility (cb92a99)
  • 🎸 add read/write mode separation (b4b6fcb)
  • 🎸 add read/write mode separation (60a65c1)
  • 🎸 add readdirSync() method (2178a50)
  • 🎸 add readdirSync() method (3689abd)
  • 🎸 add readlinkSync() method (f398908)
  • 🎸 add readlinkSync() method (8d243a0)
  • 🎸 add readSync() method (31383a8)
  • 🎸 add readSync() method (3729cd0)
  • 🎸 add realpathSync() method (f9a3cbe)
  • 🎸 add realpathSync() method (75890e0)
  • 🎸 add renameSync() method (a1674e4)
  • 🎸 add renameSync() method (5b1cd63)
  • 🎸 add rm() method (239437d)
  • 🎸 add rm() method (29a7dc8)
  • 🎸 add rmdirSync() method (59ccf3c)
  • 🎸 add rmdirSync() method (695b62a)
  • 🎸 add rmSync() method (a39e9a2)
  • 🎸 add rmSync() method (aa9acb3)
  • 🎸 add snapshot creation utilities (9fc8f13)
  • 🎸 add some common objects (b68ea2a)
  • 🎸 add some common objects (c89744d)
  • 🎸 add sumlink printing support (1850dae)
  • 🎸 add sync api (29c035a)
  • 🎸 add sync api (16d6600)
  • 🎸 add timeout to spin lock (1e2fc72)
  • 🎸 add timeout to spin lock (48e8e74)
  • 🎸 add truncateSync() and ftruncateSync() methods (4caf28b)
  • 🎸 add truncateSync() and ftruncateSync() methods (2b77619)
  • 🎸 add typed array view support to volume (a8bee73)
  • 🎸 add typed array view support to volume (7c8439f)
  • 🎸 add unlinkSync() method (4b3444d)
  • 🎸 add unlinkSync() method (417f911)
  • 🎸 add writev() method (17b0446)
  • 🎸 add writev() method (8190bfd)
  • 🎸 create FSA types folder (c153506)
  • 🎸 create FSA types folder (bb0c75a)
  • 🎸 create Node fs api tyeps (27fd08a)
  • 🎸 create Node fs api tyeps (4db1321)
  • 🎸 expose FSA from index file (6865a05)
  • 🎸 expose FSA from index file (77696f5)
  • 🎸 implement .del() method (9a7fd37)
  • 🎸 implement .drop() method (1b893a2)
  • 🎸 implement .get() method (63aacb6)
  • 🎸 implement .getDirectoryHandle() method (b6b026a)
  • 🎸 implement .getDirectoryHandle() method (090980c)
  • 🎸 implement .getFile() method (b8601cc)
  • 🎸 implement .getFile() method (17015a3)
  • 🎸 implement .getFileHandle() method (71567c9)
  • 🎸 implement .getFileHandle() method (40bdc13)
  • 🎸 implement .isSameEntry() method (f18d91e)
  • 🎸 implement .isSameEntry() method (438806b)
  • 🎸 implement .list() method (4a064cf)
  • 🎸 implement .mkdir method (2623049)
  • 🎸 implement .mkdir method (be1525a)
  • 🎸 implement .mkdtemp() method (cd54e9b)
  • 🎸 implement .mkdtemp() method (2db4cd0)
  • 🎸 implement .removeEntry() method (48617aa)
  • 🎸 implement .removeEntry() method (dca57a2)
  • 🎸 implement .resolve() method (bf47b96)
  • 🎸 implement .resolve() method (9d5669c)
  • 🎸 implement .values() and .entries() (f13de3b)
  • 🎸 implement .values() and .entries() (177010a)
  • 🎸 implement .write() for FSA (8226541)
  • 🎸 implement .write() for FSA (6a2fa2d)
  • 🎸 implement access() method (0a43a1b)
  • 🎸 implement access() method (c72390b)
  • 🎸 implement accessSync() method (accebdb)
  • 🎸 implement accessSync() method (719a19f)
  • 🎸 implement async verions of snapshotting (18912bf)
  • 🎸 implement basic readdir (898e221)
  • 🎸 implement basic readdir (685bc7e)
  • 🎸 implement basic rename() method, only for files (169662a)
  • 🎸 implement basic rename() method, only for files (4769314)
  • 🎸 implement basic state() method (425cad7)
  • 🎸 implement basic state() method (4039d64)
  • 🎸 implement CAS storage (33ddbcc)
  • 🎸 implement closeSync() method (24841fa)
  • 🎸 implement closeSync() method (646efaf)
  • 🎸 implement crudfs .put() method (505dc20)
  • 🎸 implement crudfs on top of fs (cb7ac4d)
  • 🎸 implement Dirent listings (03e60d0)
  • 🎸 implement Dirent listings (5d6f976)
  • 🎸 implement exists() method (615e88f)
  • 🎸 implement exists() method (0753937)
  • 🎸 implement first version of readFile() method (e046128)
  • 🎸 implement first version of readFile() method (629f22a)
  • 🎸 implement first version of worker (3662003)
  • 🎸 implement first version of worker (caf8394)
  • 🎸 implement FSA ReadStream (bc50fc5)
  • 🎸 implement FSA ReadStream (53784d9)
  • 🎸 implement info() method (eea9215)
  • 🎸 implement initial version of .open() method (b3983df)
  • 🎸 implement initial version of .open() method (cb363b5)
  • 🎸 implement initial version of appendFile() method (616be8d)
  • 🎸 implement initial version of appendFile() method (65580aa)
  • 🎸 implement initial version of writeFile() method (80e8499)
  • 🎸 implement initial version of writeFile() method (e2b2bfd)
  • 🎸 implement keys() method (33f9af0)
  • 🎸 implement keys() method (b8e8a4c)
  • 🎸 implement openSync() method (8ecac69)
  • 🎸 implement openSync() method (4b7eddd)
  • 🎸 implement read() method (33be...
Read more

v4.1.0-next.5

25 Jun 13:54
Compare
Choose a tag to compare
v4.1.0-next.5 Pre-release
Pre-release

4.1.0-next.5 (2023-06-25)

Bug Fixes

  • πŸ› add support for unknown nodes (77786f1)

Features

  • 🎸 add binary serialization to snapshots (c1cd615)
  • 🎸 add json encoding for snapshots (41f9b8c)
  • 🎸 add snapshot creation utilities (9fc8f13)
  • 🎸 implement async verions of snapshotting (18912bf)

v4.1.0-next.4

25 Jun 10:35
Compare
Choose a tag to compare
v4.1.0-next.4 Pre-release
Pre-release

4.1.0-next.4 (2023-06-25)

Features

  • 🎸 add .toTree() to Volume (2d5c4cb)
  • 🎸 add sumlink printing support (1850dae)
  • 🎸 implement toTreeSync() method (09c9770)

v4.1.0-next.3

22 Jun 09:48
Compare
Choose a tag to compare
v4.1.0-next.3 Pre-release
Pre-release

4.1.0-next.3 (2023-06-22)

Bug Fixes

  • πŸ› correctly handle directory paths (ea909e8)
  • πŸ› improve file opening and closing logic (403c271)

Features

  • 🎸 add missing callback API methods and some sycn API ones (956533a)
  • 🎸 add missing promisees API types (f6727f3)
  • 🎸 add missing synchronous method types (ac38b5d)
  • 🎸 implement crudfs on top of fs (cb7ac4d)
  • 🎸 make promises methods bound (3010141)
  • 🎸 setup NodeCrud implementation (39073ce)

v4.1.0-next.2

21 Jun 17:16
Compare
Choose a tag to compare
v4.1.0-next.2 Pre-release
Pre-release

4.1.0-next.2 (2023-06-21)

Features

  • 🎸 add integrity check on read (710eb2f)
  • 🎸 implement CAS storage (33ddbcc)

v4.1.0-next.1

21 Jun 17:12
Compare
Choose a tag to compare
v4.1.0-next.1 Pre-release
Pre-release

4.1.0-next.1 (2023-06-21)

Bug Fixes

  • πŸ› 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)
  • πŸ› do not allow empty children names (f014fd8)
  • πŸ› do not allow empty children names (43da1d6)
  • πŸ› handle root folder better (89bbffd)
  • πŸ› handle root folder better (76de780)
  • πŸ› throw "ENOENT" and "ENOTDIR" when folder or file 404 (5de4faa)
  • πŸ› throw "ENOENT" and "ENOTDIR" when folder or file 404 (ddd5d56)

Features

  • 🎸 add .truncate() method (038ab36)
  • 🎸 add .truncate() method (085335c)
  • 🎸 add ability to close files (0db56be)
  • 🎸 add ability to close files (d3828a8)
  • 🎸 add ability to create sub directories (8f15bd9)
  • 🎸 add ability to create sub directories (528c807)
  • 🎸 add ability to remove all files (76cabc7)
  • 🎸 add ability to remove all files (566e29b)
  • 🎸 add appendFileSync() method (57192fe)
  • 🎸 add appendFileSync() method (27411e4)
  • 🎸 add basenem() utility (8b27695)
  • 🎸 add basenem() utility (43354e5)
  • 🎸 add copyFile() method (de2bb0a)
  • 🎸 add copyFile() method (5e207c4)
  • 🎸 add copyFileSync() method (7e0137c)
  • 🎸 add copyFileSync() method (5fc1bac)
  • 🎸 add createSwapFile() method (dfdb908)
  • 🎸 add createSwapFile() method (b07ce79)
  • 🎸 add crudfs types (18c0658)
  • 🎸 add existsSync() method (0492a98)
  • 🎸 add existsSync() method (073ec6b)
  • 🎸 add fstatSync() method (f13ddb7)
  • 🎸 add fstatSync() method (6b1597a)
  • 🎸 add initial writign implementation (2f9542c)
  • 🎸 add initial writign implementation (6a50382)
  • 🎸 add lstat() and fstat() methods (ce5dd5e)
  • 🎸 add lstat() and fstat() methods (e147d58)
  • 🎸 add mkdirSync() method (57f386b)
  • 🎸 add mkdirSync() method (bcad970)
  • 🎸 add mkdtempSync() method (1ac2df4)
  • 🎸 add mkdtempSync() method (68033dd)
  • 🎸 add options to promises.rmdir() method (ce268bb)
  • 🎸 add options to promises.rmdir() method (0628d56)
  • 🎸 add pathToLocation() utility (8e0136a)
  • 🎸 add pathToLocation() utility (cb92a99)
  • 🎸 add read/write mode separation (b4b6fcb)
  • 🎸 add read/write mode separation (60a65c1)
  • 🎸 add readdirSync() method (2178a50)
  • 🎸 add readdirSync() method (3689abd)
  • 🎸 add readlinkSync() method (f398908)
  • 🎸 add readlinkSync() method (8d243a0)
  • 🎸 add readSync() method (31383a8)
  • 🎸 add readSync() method (3729cd0)
  • 🎸 add realpathSync() method (f9a3cbe)
  • 🎸 add realpathSync() method (75890e0)
  • 🎸 add renameSync() method (a1674e4)
  • 🎸 add renameSync() method (5b1cd63)
  • 🎸 add rm() method (239437d)
  • 🎸 add rm() method (29a7dc8)
  • 🎸 add rmdirSync() method (59ccf3c)
  • 🎸 add rmdirSync() method (695b62a)
  • 🎸 add rmSync() method (a39e9a2)
  • 🎸 add rmSync() method (aa9acb3)
  • 🎸 add some common objects (b68ea2a)
  • 🎸 add some common objects (c89744d)
  • 🎸 add sync api (29c035a)
  • 🎸 add sync api (16d6600)
  • 🎸 add timeout to spin lock (1e2fc72)
  • 🎸 add timeout to spin lock (48e8e74)
  • 🎸 add truncateSync() and ftruncateSync() methods (4caf28b)
  • 🎸 add truncateSync() and ftruncateSync() methods (2b77619)
  • 🎸 add typed array view support to volume (a8bee73)
  • 🎸 add typed array view support to volume (7c8439f)
  • 🎸 add unlinkSync() method (4b3444d)
  • 🎸 add unlinkSync() method (417f911)
  • 🎸 add writev() method (17b0446)
  • 🎸 add writev() method (8190bfd)
  • 🎸 create FSA types folder ([c1...
Read more

v4.1.0

20 Jun 22:01
Compare
Choose a tag to compare
v4.1.0 Pre-release
Pre-release

4.1.0 (2023-06-20)

Bug Fixes

  • πŸ› allow readin into various kinds of buffers (e9c70e9)
  • πŸ› allow to seek in file (b363689)
  • πŸ› do not allow empty children names (43da1d6)
  • πŸ› handle root folder better (76de780)
  • πŸ› throw "ENOENT" and "ENOTDIR" when folder or file 404 (ddd5d56)

Features

  • 🎸 add .truncate() method (085335c)
  • 🎸 add ability to close files (d3828a8)
  • 🎸 add ability to create sub directories (528c807)
  • 🎸 add ability to remove all files (566e29b)
  • 🎸 add appendFileSync() method (27411e4)
  • 🎸 add basenem() utility (43354e5)
  • 🎸 add copyFile() method (5e207c4)
  • 🎸 add copyFileSync() method (5fc1bac)
  • 🎸 add createSwapFile() method (b07ce79)
  • 🎸 add existsSync() method (073ec6b)
  • 🎸 add fstatSync() method (6b1597a)
  • 🎸 add initial writign implementation (6a50382)
  • 🎸 add lstat() and fstat() methods (e147d58)
  • 🎸 add mkdirSync() method (bcad970)
  • 🎸 add mkdtempSync() method (68033dd)
  • 🎸 add options to promises.rmdir() method (0628d56)
  • 🎸 add pathToLocation() utility (cb92a99)
  • 🎸 add read/write mode separation (60a65c1)
  • 🎸 add readdirSync() method (3689abd)
  • 🎸 add readlinkSync() method (8d243a0)
  • 🎸 add readSync() method (3729cd0)
  • 🎸 add realpathSync() method (75890e0)
  • 🎸 add renameSync() method (5b1cd63)
  • 🎸 add rm() method (29a7dc8)
  • 🎸 add rmdirSync() method (695b62a)
  • 🎸 add rmSync() method (aa9acb3)
  • 🎸 add some common objects (c89744d)
  • 🎸 add sync api (16d6600)
  • 🎸 add timeout to spin lock (48e8e74)
  • 🎸 add truncateSync() and ftruncateSync() methods (2b77619)
  • 🎸 add typed array view support to volume (7c8439f)
  • 🎸 add unlinkSync() method (417f911)
  • 🎸 add writev() method (8190bfd)
  • 🎸 create FSA types folder (bb0c75a)
  • 🎸 create Node fs api tyeps (4db1321)
  • 🎸 explose FSA from index file (77696f5)
  • 🎸 implement .getDirectoryHandle() method (090980c)
  • 🎸 implement .getFile() method (17015a3)
  • 🎸 implement .getFileHandle() method (40bdc13)
  • 🎸 implement .isSameEntry() method (438806b)
  • 🎸 implement .mkdir method (be1525a)
  • 🎸 implement .mkdtemp() method (2db4cd0)
  • 🎸 implement .removeEntry() method (dca57a2)
  • 🎸 implement .resolve() method (9d5669c)
  • 🎸 implement .values() and .entries() (177010a)
  • 🎸 implement .write() for FSA (6a2fa2d)
  • 🎸 implement access() method (c72390b)
  • 🎸 implement accessSync() method (719a19f)
  • 🎸 implement basic readdir (685bc7e)
  • 🎸 implement basic rename() method, only for files (4769314)
  • 🎸 implement basic state() method (4039d64)
  • 🎸 implement closeSync() method (646efaf)
  • 🎸 implement Dirent listings (5d6f976)
  • 🎸 implement exists() method (0753937)
  • 🎸 implement first version of readFile() method (629f22a)
  • 🎸 implement first version of worker (caf8394)
  • 🎸 implement FSA ReadStream (53784d9)
  • 🎸 implement initial version of .open() mehtod (cb363b5)
  • 🎸 implement initial version of appendFile() method (65580aa)
  • 🎸 implement initial version of writeFile() method (e2b2bfd)
  • 🎸 implement keys() method (b8e8a4c)
  • 🎸 implement openSync() method (4b7eddd)
  • 🎸 implement read() method (7357c14)
  • 🎸 implement readFileSync() method (953d276)
  • 🎸 implement readFileSync() method (bb803e2)
  • 🎸 implement realpath() method (99b12dc)
  • 🎸 implement rmdir() method (973af0a)
  • 🎸 implement sync messenger (d221870)
  • 🎸 implement sync write method (22047da)
  • 🎸 implement truncation (d4469d1)
  • 🎸 implement unlink() method (6bd3e75)
  • 🎸 implement writeSync() method ([12a8b3f](https://github.c...
Read more

v4.0.0

16 Jun 08:31
Compare
Choose a tag to compare
v4.0.0 Pre-release
Pre-release

4.0.0 (2023-06-16)

Features

  • 🎸 add File System Access API TypeScript types (3ea8641)

BREAKING CHANGES

  • 🧨 no breaking changes in this commit, but bumping to get this to v4 in NPM