github zen-fs/core v2.4.2
2.4.2

latest releases: v2.4.4, v2.4.3
2 months ago
  • 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

Don't miss a new core release

NewReleases is sending notifications on new releases.