Releases: zen-fs/core
1.11.4
1.11.3
1.11.2
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
ReadableStream
fromnode:streams/web
is used as the return type ofreadableWebStream
, since the normalReadableStream
type cause problems with some installations.- The
types
directory is now included in theexports
of package.json. - Updated the version of Node.js in
engines
from>= 16
to>= 18
.
1.11.0
This release adds streams to the internal API, which allows streaming directly to and from the file system.
- Added
streamRead
andstreamWrite
toFileSystem
along with default implementations streamRead
is used byreadableWebStream
inFileHandle
- Rewrote
ReadStream
andWriteStream
to usestreamRead
andstreamWrite
streamWrite
forAsync
writes to both the synchronous and asynchronous file systems- Calling
streamWrite
onReadonlyFS
throwsEROFS
- 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
onFetch
not updating the index metadata - Fixed
readdir
forCopyOnWriteFS
- Updated an import from
readline
tonode: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
inStatsCommon
1.10.4
1.10.3
1.10.2
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 thestart
andend
options (#175)createWriteStream
now supports thestart
option- Removed the problematic
@types/readable-stream
dependency- The types for
Readable
andWritable
are now pulled from@types/node
- You should not install
@types/readable-stream
alongside ZenFS!
- The types for
- Added tests for
start
andend
withcreateReadStream
- Cleaned up the
createWriteStream
andreadableWebStream
methods ofFileHandle
- 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
fromAsyncIterableIterator
toAsyncIteratorObject
- 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 wasnull
1.10.1
- Added two new built-in log formats:
css_level
andcss_message
, which style text using CSS for usage with theConsole
API in browsers - The
format
in aLogConfiguration
can now return astring[]
(in addition to astring
) - The
output
in aLogConfiguration
is now passed an array of strings
1.10.0
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
.