1.8.0
- Added
LazyFile
- This is not used at the moment by any backends, though it will in a future release
- Added
FileSystem.read
andFileSystem.write
- Added
StatsCommon.toJSON
- Reduce default max byte length to 1 MiB (#168)
- Added
FileReadResult
type that uses built-inArrayBufferView
- Removed
PortFile
,file
RPC, and RPC scopes - Fixed
StoreFS.loadIndex
(+Sync
) not committing the transaction - Fixed files trying to call
FileSystem.sync
on read-only file systems - Reworked
Port
error passing - Changed the default value of
length
inFile.read
andFile.write
(+Sync
)- From
this.stats.size
tobuffer.byteLength - offset
- This now has the same behavior as the relevant Node.js APIs
- From
- Fixed
PreloadFile
's handling of a buffer and stats size mismatch PortFS.sync
now converts metadata to a plain object- Fixed
PortFile.read
not copying to buffer - Changed
utimes
to use numbers internally - Tweaked
Fetch.baseUrl
trailing slash behavior - Fixed backend options type checking
- Changed
FetchFS
to extendStoreFS
- Added
StoreFS
methods for working withIndex
:loadIndex
loadIndexSync
toIndex
toIndexSync
- Deprecated
IndexFS
- You can use
StoreFS
and callloadIndex
/loadIndexSync
with your index
- You can use
- Changed inode and data IDs from
bigint
tonumber
- Rewrote
Index
andIndexFS
to be read/write - Added
while
canaries- This should prevent any infinite locks due to
while
loops
- This should prevent any infinite locks due to
- Fixed
StoreFS
not using creation options - Improved internal
_open
options - Added directory file type checks
- Added
PureCreationOptions
Testing:
- Updated the
npm test
script - Improved
Fetch
testing StoreFS
usingIndex
is now run through the full FS test suitePort
(includingAsync
) is now run through the full FS test suite- Removed
Async
-specific common test suite - Simplified temporary coverage directory removal
- Failing tests will now give an exit code of 1
- Reduced tests
wait
times zenfs-test
s output is now much prettier. It has colors and fancy formatting and such.- Added
zenfs-test
flags:--clean
will remove cached coverage data--report
will report any cached coverage data, then remove it--preserve
will run tests but will not remove the coverage data or report on it
- Deprecated APIs are no longer considered when calculating coverage
- CI/CD tests now display output about test suites