This is the changelog for lazy-file
. It follows semantic versioning.
- Handle stream errors in
lazy-file/fs
'writeFile
. When there is an error in the stream, callwriteStream.end()
on the underlying file stream before rejecting the promise.
- Add CommonJS build
- Export
OpenFileOptions
fromlazy-file/fs
- Add writeFile method to
lazy-file/fs
and renamegetFile
=>openFile
- Accept an open file descriptor or file handle in
writeFile(fd)
- BREAKING: Do not accept regular string argument to
LazyFile
. This more closely matchesFile
behavior - BREAKING: Move 4th
LazyFile()
argumentrange
intooptions.range
- BREAKING: Renamed
LazyFileContent
interface toLazyContent
andcontent.read()
=>content.stream()
- Added
LazyBlob
(Blob
subclass) as a complement toLazyFile
- Added
LazyBlobOptions
andLazyFileOptions
interfaces (endings
is not supported) - Return a
name
-lessBlob
fromfile.slice()
to more closely match nativeFile
behavior
- Added support for
getFile(, { lastModified })
to overridefile.lastModified
- Export
GetFileOptions
interface fromlazy-file/fs
- Added
getFile
helper tolazy-file/fs
export for reading files from the local filesystem
- BREAKING: Do not automatically propagate
name
andlastModified
infile.slice()
. This matches the behavior ofFile
more closely - BREAKING: Remove
LazyFile[Symbol.asyncIterator]
to match the behavior ofFile
more closely - In
slice(start, end)
makeend
default tosize
instead ofInfinity
. This more closely matches theFile
spec - Small perf improvement when streaming content arrays with Blobs in them and ending early
- Add ability to initialize a LazyFile with
BlobPart[]
, just like a normalFile
- Add async iterator support to LazyFile
- Initial release