Skip to content

Releases: zen-fs/core

2.4.4

17 Nov 19:49
v2.4.4
4a20881

Choose a tag to compare

  • Fixed incorrect path resolution when inside a context with a non-root PWD (#263)
  • Fixed bindContext copying from the created child context instead of assigning to it
  • Fixed resolveMount not resolving paths using the context's PWD
  • normalizePath now passes through this to path.resolve
  • Anti-regression tests now have the issue number in the test name instead of as a comment
  • Contexts are now more secure at runtime, with readonly members being made non-writable and non-configurable
  • Added internal contextOf and createChildContext
  • V_Context is now unknown for better compatibility with Node.js
  • bindContext now checks if the specified root is a directory and exists
  • Fixed incorrect example for bindContext in documentation

2.4.3

06 Nov 00:57
v2.4.3
1e86238

Choose a tag to compare

  • Fixed SingleBuffer metadata block corruption (#277, thanks @lvcabral)
  • Cleaned up hex string formatting in SingleBuffer
  • Added debug message when SingleBuffer metadata blocks are rotated
  • Fixed backends requiring entries in options when extending SharedConfig

2.4.2

09 Oct 03:06
v2.4.2
80d32c4

Choose a tag to compare

  • Changed path resolution to be more efficient and faster by internal functions (resolveMount/resolve) instead of realpath from the Node.js compatibility layer
  • Fixed incorrect behavior in read when passing 0 for position
  • Fixed passthrough needing __promisify__/native
  • Fixed incorrect Dirent.parentPath returned by readdir
  • The VFS now compares file systems based on their UUID instead of the object identity
    • For example if you create two instances of the same SingleBuffer backend, the VFS treats them as equal and you won't get EXDEV
  • The Node.js compatibility code and the VFS code have been organized into two different source directories: node and vfs. This is more readable and maintainable.
  • VFS <-> Backend error handling is now handled in one place (withExceptionContext) and returned by resolveMount for convience
    • For contributors: this means calling FileSystem methods like fs.touch(...) will automatically do all the path conversion. You no longer need to wrap these calls with wrap or a try/catch
  • Added missing contexts.ts export to internal/index.js
  • Added a proper NodeFS type for the node:fs API without node-specific bits like __promisiy__
  • Added VFS Dirent class
  • Added exports from readline, constants
  • Renamed AsyncHandle to Handle and merged it with sync handle/methods [internal]
  • Deprecated Inode.toStats() [internal]

Testing

  • Added -d/--debug flag to zenfs-test (dumps commands)
  • Added --profile to zenfs-test
  • Added test for different working directory with context (#263, marked as todo to not cause failures)
  • Fixed directory test
  • Changed tests to import from @zenfs/core instead of ../dist, ../../dist, etc.

Documentation

  • Added dedicated documentation page for devices
  • Fixed fs functions not being listed under the fs namespace in documentation
  • Fixed some outdated documentation
  • Updated Memium since beforehand it broke Typedoc
  • Switched to Typedoc's built-in excludeReferences instead of a plugin
  • Updated readme: fixed typos and added backends from other @zenfs packages
  • Added a note to contributing guidelines for issue vs discussion
  • Removed Dirent-specific tests (i.e. ones that used new Dirent()

Development

  • Issues now use GitHub Issue forms, which should help maintainers (me) triage faster
  • npm scripts are now type checked
  • Changed to using the built-in styleText for npm scripts
  • Updated license identifier in index.ts so it is included by bundlers
  • Moved license guide to copying
  • Improved the .gitignore file

2.4.1

02 Oct 17:43
v2.4.1
21e06e0

Choose a tag to compare

This patch cherry picks a bug fix for path.join from the next minor release, which is still a work in progress.

2.4.0

01 Sep 20:04
v2.4.0
12cb94f

Choose a tag to compare

  • Added support for Node v24.7.0
    • Added autoClose option to FileHandle.readableWebStream
    • Made Dir disposers idempotent
    • Added fs.mkdtempDisposableSync and fs.promises.mkdtempDisposable
  • Added "default" directories along with Configuration.defaultDirectories.
    When set, configure will automatically create common directories from the Linux Filesystem Hierarchy.
    This includes /tmp, /var, and /etc
  • Re-licensed under the LGPL. Most projects will not need to do anything, though any forks and patches (not dependents) of ZenFS must also use the LGPL in order to update. This does not extend to the rest of your code. Just like with the MIT license, distributing ZenFS requires inclusion of the license.
  • Fixed incorrect iterator return result type for fs.watch
  • Updated dependencies

2.3.11

31 Aug 00:02
v2.3.11
96c74ea

Choose a tag to compare

  • Fixed IndexFS.rename and IndexFS.renameSync not behaving correctly.
    • Items are now correctly removed bottom up and re-created top down
  • Fixed mkdir in derived file systems not being compatible with Async(IndexFS)
    • Added internal IndexFS._mkdir and _mkdirSync, which are called by IndexFS when creating new directories and renaming existing ones
  • Added timeout argument to _MutexedFS.lock()
  • --test-force-exit is no longer used when testing, which means more bugs should be caught

2.3.10

30 Aug 20:39
v2.3.10
c70f6e9

Choose a tag to compare

  • Added sync convenience function, which calls all currently mounted filesystems' sync method
  • Added sync method to AsyncMixin
  • Fixed cache de-sync in Async() by always running the sync operation first
  • Fixed race conditions in Async() by changing _async to accept a thunk
    • Note you will need to sync() after a synchronous write before you can reliably do a synchronous read
  • Fixed RPC handlers for web workers not being attached due to identity discontinuity
  • Fixed checkOptions not working with regular functions
  • Fixed IndexFS.rmdir using readdirSync to check if empty
  • Fixed configureSingle not working with file system instances
  • Fixed PortFS.sync not calling super.sync()
  • Du-duplicated call loop detection in Async()._patchAsync
  • Un-deprecated AsyncMixin.ready
  • Increased RPC message ID length by 5 to reduce collision chance
  • Unhandled rejections in tests are now logged
  • Some async methods are no longer patched by Async(): read, readdir, stat, exists
  • Changed EIO/RPC Failed to ETIMEDOUT/RPC request timed out, which is more descriptive
  • sync() is now run before each Port test and in between specific read/writes

2.3.9

29 Aug 15:32
v2.3.9
d0de752

Choose a tag to compare

The --skip option for zenfs-test has been made more robust:

  • It now accepts multiple arguments, so you can do something like -s A -s B
  • It also now escapes the pattern using single quotes

2.3.8

19 Aug 01:20
v2.3.8
e16a8c6

Choose a tag to compare

null is now used instead of undefined in successful callbacks (#255, thanks @EnoahNetzach)

2.3.7

08 Aug 16:01
v2.3.7
ff030ef

Choose a tag to compare

This release makes the validator for the port passed to the Port backend more robust, ensuring it accepts service workers. (#252)