Releases: zen-fs/core
Releases · zen-fs/core
0.3.2
- Changed
FileSystem.metadata
from a getter to a function.- Since Typescript would lose track of the accessor information, convert it to a
readonly
property, then give an error when a class defined it as a getter.
- Since Typescript would lose track of the accessor information, convert it to a
- Renamed
AsyncMirror.Options
toAsyncMirrorOptions
- Renamed
AsyncStoreFileSystemOptions
toAsyncStoreOptions
- Renamed
SyncStoreFileSystemOptions
toSyncStoreOptions
- Renamed
AsyncStoreFileSystem
toAsyncStoreFS
- Renamed
SyncStoreFileSystem
toSyncStoreFS
0.3.1
Fixed the generated return types for Sync
, Async
, and Readonly
(the mixins) being merged with FileSystem
, which meant that Typescript incorrectly thought that any file system extending the returned class had all of the members implemented, even if it did not.
0.3.0
- Added mixins for adding implementations for various use cases:
Sync
: Implements async methods using the sync methodsAsync
: Implements sync methods to throwENOTSUP
Readonly
: Implements methods that makes changes to throwEROFS
- They are used in the extends clause by wrapping any base file system, like so:
class MyFS extends Readonly(Sync(FileSystem)) { /* ... */ }
- Note that decorators are not used since they can not modify the resulting type.
- Removed
SyncFileSystem
,AsyncFileSystem
,ReadonlySyncFileSystem
, andReadonlyAsyncFileSystem
(use mixins) - Changed
LockedFS
to named export - Narrowed usage of
no-unused-vars
infilesytem.ts
- Removed
isIndexDirInode
andisIndexFileInode
(bloat) - Renamed
IndexInode.isDir
toIndexInode.isDirectory
- Exported
ListingQueueNode
- Removed
FileSystem.Name
- Added
public
modifier toFileSystem
members that were missing it. - Readded
FileIndex
- Added
FileIndexFS
,SyncFileIndexFS
, andAsyncFileIndexFS
0.2.3
0.2.2
- Fixed
resolveBackendConfig
not checking options - Removed old
_InMemory
- Removed
getMount
andgetMounts
- Exported
mounts
- Removed
FileIndex
(moved to dom) - Fixed
Overlay
options being options - Renamed
OverlayFS.ts
toOverlay.ts
- Changed
AsyncStoreFileSystem
to allow passing in anAsyncStore
not wrapped in a promise - Fixed
metadata
getter onSyncStore
andAsyncStore
- Added
ReadonlyAsyncFileSystem
andReadonlySyncFileSystem
0.2.1
- Changed
AsyncStoreFileSystem
to support async stores better - Changed
AsyncStoreFileSystem
to use an object for the options - Fixed
AsyncStoreFileSystem._ready
to be set toAsyncStoreFileSystem._initialize()
in constructor. - Added
AsyncStoreFileSystemOptions
- Renamed
SyncFileSystemOptions
toSyncStoreFileSystemOptions
0.2.0
- Added support for symlinks
- Removed callback support in
configure
andinitialize
- Added support for
Backend
inconfigure
- Greatly simplified
FileSystem
- Removed methods from Internal API:
access
,open
,truncate
,readFile
,writeFile
,appendFile
,chmod
,chown
,utimes
,symlink
,readlink
, 'realpath' - Combined
BaseFileSystem
intoFileSystem
(removed default ENOTSUP implementations and marked them as abstract) - Changed from an
interface
to anabstract class
- Renamed
FileSystem.whenReady
toFileSystem.ready
- Added
AsyncFileSystem
(adds default ENOTSUP implementations for synch methods) - Removed
metadata.supportsLinks
- Removed methods from Internal API:
- Changes to
SyncStore
andAsyncStore
and their FSes- Added support for hard links
- Updated
SimpleSyncRWTransaction
to useMap
andSet
instead of normal objects and arrays - Removed "KeyValue" from Sync* and Async* names
- Renamed
del
toremove
on transaction classes
- Reworked backends
- Renamed
BackendContructor
toBackend
- Separated backends from FS classes
- Changed to using
createBackend(backend)
instead of bindingcreateBackend
to the backend - Added
isBackend
andisBackendConfig
- Renamed
getFileSystem
toresolveBackendConfig
- Removed callback support
createBackend
- Renamed
- Changes to the emulation layer
- Fixed the options for many functions
- Added
FileHandle
- Fixed
fs.promises
functions that use aFileHandle
instead of numeric descriptor - Removed some
fs.promises
functions that do not exist on the Node API - Added type checks with the Node API using
satisfies
on each method instead of a single intersection type assignment - Added
writeFileSync
data check
- Reworked
LRUCache
- Fully and correctly implemented
encode
anddecode
- Improved
File
- Changed from an
interface
to anabstract class
- Combined
BaseFile
intoFile
(removed default ENOTSUP implementations and marked them as abstract) - Added
File.path
- Changed
File.get*
methods to getters - Fixed
File.readSync
's behavior when reading past the end of the file
- Changed from an
- Added setters to
Stats.*time
- Improved
Inode
- Changed the data members to be accessors that modify the underlying buffer directly
- Removed
serialize
andDeserialize
- Changed
Inode.update
to acceptReadonly<Stats>
- Added
data
getter which returns the buffer - Changed
Inode
to named instead of default export
- Changes to
ApiError
- Renamed
ApiError.FileError
toApiError.OnPath
- Removed
ApiError.Deserialize
andApiError.serialize
- Renamed
- Tests
- Restructured tests directory
- Changed tests to not use multiple backends since they would not work at all with the multi-backend setup.
- Fixed many of the tests
- Added tests for encoding
0.1.0
- Fixed
Uint8Array.toString
being used incorrectly - Improve stat implementations
- Fixed
fixPaths
handling of undefined parameter - Fixed
fixError
handling of undefined parameter - Updated stats variants to use
satisfies
- Updated build target to es2020
- Added
satisfies
checks to sync functions - Added
PathLike
type - Simplified exported fs type
- Removed old types in comments
- Added
BufferToUint8Array
type