Skip to content

Releases: zen-fs/core

1.11.4

24 Feb 20:10
v1.11.4
d5f493d
Compare
Choose a tag to compare

Add streamRead and streamWrite to File (#192, thanks @mcandeia)

1.11.3

23 Feb 20:05
v1.11.3
b4776b6
Compare
Choose a tag to compare
  • emitChange now works correctly when watching the file itself (fixes #191)
  • Tweaked watch test to prevent regression
  • Some internal function no longer open files and read directly instead, which should improve performance.

1.11.2

18 Feb 21:17
v1.11.2
d46bf21
Compare
Choose a tag to compare

This release adds an explicit reference to @types/node, which ensures the ambient types will always be loaded before the ambient declaration for readable-stream. This should fix edge cases where Typescript fails to include @types/node even though it is installed.

1.11.1

18 Feb 20:08
v1.11.1
842f04f
Compare
Choose a tag to compare
  • ReadableStream from node:streams/web is used as the return type of readableWebStream, since the normal ReadableStream type cause problems with some installations.
  • The types directory is now included in the exports of package.json.
  • Updated the version of Node.js in engines from >= 16 to >= 18.

1.11.0

18 Feb 01:33
v1.11.0
686908d
Compare
Choose a tag to compare

This release adds streams to the internal API, which allows streaming directly to and from the file system.

  • Added streamRead and streamWrite to FileSystem along with default implementations
  • streamRead is used by readableWebStream in FileHandle
  • Rewrote ReadStream and WriteStream to use streamRead and streamWrite
  • streamWrite for Async writes to both the synchronous and asynchronous file systems
  • Calling streamWrite on ReadonlyFS throws EROFS
  • Streaming a write to CopyOnWrite will stream to the writable file system
  • Added a test for readableWebStream

There are also a some other minor changes:

  • Fixed write on Fetch not updating the index metadata
  • Fixed readdir for CopyOnWriteFS
  • Updated an import from readline to node:readline
  • Fixed CSS log formats
  • CopyOnWrite now handles nested mount configuration resolution
  • Fixed attribute logging in mount
  • Deprecated FileType as it was already unused
  • Updated documentation for mode in StatsCommon

1.10.4

15 Feb 20:34
v1.10.4
1bb11ba
Compare
Choose a tag to compare
  • LazyFile is no longer marked as dirty when created
  • The size mismatch error in PreloadFile is now logged
  • readdir will no longer throw if an entry is deleted

1.10.3

13 Feb 21:48
v1.10.3
8703532
Compare
Choose a tag to compare

The journal option of CopyOnWriteOptions from last release was not finished or finalized. This release fixes that and adds CopyOnWrite and SingleBuffer tests to the CI workflow.

1.10.2

13 Feb 21:04
v1.10.2
ea962dd
Compare
Choose a tag to compare

Refactored Overlay (now CopyOnWrite)

  • Renamed to CopyOnWrite for clarity (all of the old names are still available but deprecated)
  • Rewrote CopyOnWrite to use a journal
  • Added a new internal API for journaling
  • Fixed readdir not tracking deletions correctly
  • Moved journal initialization logic to create
  • Fixed the CoW test setup and enabled CoW tests
  • Cleaned up directory tests
  • Removed an incorrect directory test for permissions

Fixes to Streams

  • createReadStream now supports the start and end options (#175)
  • createWriteStream now supports the start option
  • Removed the problematic @types/readable-stream dependency
    • The types for Readable and Writable are now pulled from @types/node
    • You should not install @types/readable-stream alongside ZenFS!
  • Added tests for start and end with createReadStream
  • Cleaned up the createWriteStream and readableWebStream methods of FileHandle
  • Cleaned up the createWriteStream function
  • Cleaned up streams tests

Other changes

  • Removed incorrect modification of AsyncIterableIterator (#158)
  • Corrected the return type of fs.promises.watch from AsyncIterableIterator to AsyncIteratorObject
  • Improved error messages test to check for ENOENT on missing items
  • Polyfills now log warnings and aren't considered in test coverage
  • Fixed Async#_patchAsync calling the sync method recursively
  • Removed trailing period on many log/error messages
  • Fixed Async never updating the sync cache when a sync method is called
  • Async#_patchAsync now gets the keys dynamically
  • Fixed FileHandle.write's behavior when the encoding was null

1.10.1

12 Feb 17:58
v1.10.1
255578f
Compare
Choose a tag to compare
  • Added two new built-in log formats: css_level and css_message, which style text using CSS for usage with the Console API in browsers
  • The format in a LogConfiguration can now return a string[] (in addition to a string)
  • The output in a LogConfiguration is now passed an array of strings

1.10.0

11 Feb 22:04
v1.10.0
381a43e
Compare
Choose a tag to compare

New backend: SingleBuffer (#162)

This release adds the SingleBuffer backend, which allows you to work with a file system contained within a single buffer. This is very useful for synchronous multi-threaded file system interaction using SharedArrayBuffer. Please note there is no built-in concurrent access prevention.

Usage statistics

All of the core backends now include usage statistics. This includes Passthrough, Fetch (IndexFS), Overlay, InMemory. Additionally, the optional usage method was added to Store.

baseUrl in Fetch options

You are now required to pass an explicit baseUrl parameter to Fetch. This is primarily a security change to avoid misconfigurations. Additionally, the change prevents an issue where a missing baseUrl resulted in an attempt to create an invalid URL.