Skip to content

Release v4 #926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 458 commits into from
Jun 26, 2023
Merged

Release v4 #926

merged 458 commits into from
Jun 26, 2023

Conversation

streamich
Copy link
Owner

@streamich streamich commented Jun 22, 2023

  • 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.
  • File System Access API
    • Node fs to File System Access API adapter was added.
    • File System Access API to Node fs adapter was added.
      • In browser, support for synchronous fs methods was added through WebWorker.
  • 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.

streamich added 30 commits June 21, 2023 01:07
semantic-release-bot and others added 2 commits June 22, 2023 09:48
# [4.1.0-next.3](v4.1.0-next.2...v4.1.0-next.3) (2023-06-22)

### Bug Fixes

* 🐛 correctly handle directory paths ([ea909e8](ea909e8))
* 🐛 improve file opening and closing logic ([403c271](403c271))

### Features

* 🎸 add missing callback API methods and some sycn API ones ([956533a](956533a))
* 🎸 add missing promisees API types ([f6727f3](f6727f3))
* 🎸 add missing synchronous method types ([ac38b5d](ac38b5d))
* 🎸 implement crudfs on top of fs ([cb7ac4d](cb7ac4d))
* 🎸 make promises methods bound ([3010141](3010141))
* 🎸 setup NodeCrud implementation ([39073ce](39073ce))
@G-Rath
Copy link
Collaborator

G-Rath commented Jun 23, 2023

@streamich nothing springs to mind other than checking if we want to change the min. node version? Just as I'm not sure if we're completely compatible with Node 4 any more

@streamich
Copy link
Owner Author

streamich commented Jun 23, 2023

@G-Rath cool, will merge it on Monday then.

  • Do not downlevel async/await

streamich and others added 22 commits June 25, 2023 11:26
# [4.1.0-next.4](v4.1.0-next.3...v4.1.0-next.4) (2023-06-25)

### Features

* 🎸 add .toTree() to Volume ([2d5c4cb](2d5c4cb))
* 🎸 add sumlink printing support ([1850dae](1850dae))
* 🎸 implement toTreeSync() method ([09c9770](09c9770))
# [4.1.0-next.5](v4.1.0-next.4...v4.1.0-next.5) (2023-06-25)

### Bug Fixes

* 🐛 add support for unknown nodes ([77786f1](77786f1))

### Features

* 🎸 add binary serialization to snapshots ([c1cd615](c1cd615))
* 🎸 add json encoding for snapshots ([41f9b8c](41f9b8c))
* 🎸 add snapshot creation utilities ([9fc8f13](9fc8f13))
* 🎸 implement async verions of snapshotting ([18912bf](18912bf))
@streamich
Copy link
Owner Author

I've bumped compile target to es2017, as that emits native async/await.

@streamich
Copy link
Owner Author

streamich commented Jun 26, 2023

Not sure how to test with which Node version memfs is compatible. It is tested on CI for v18, and v20. Maybe it is better to remove that engine setting altogether.

Regarding older versions, the only change that should require higher Node.js versions is the TypeScript build target change from es5 to es2017. I don't think there were any other changes that would require higher Node.js versions for the existing code. (Maybe BigInt removal.)

The new code added in v4 release, is imported through a separate path; big part of it requires the latest Node v20 to run; or a browser environment.

@streamich streamich merged commit 32dd55a into master Jun 26, 2023
@G-Rath G-Rath deleted the next branch February 17, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants