Skip to content

1.8.0

Compare
Choose a tag to compare
@james-pre james-pre released this 14 Jan 02:53
· 14 commits to main since this release
v1.8.0
d4e71cf
  • Added LazyFile
    • This is not used at the moment by any backends, though it will in a future release
  • Added FileSystem.read and FileSystem.write
  • Added StatsCommon.toJSON
  • Reduce default max byte length to 1 MiB (#168)
  • Added FileReadResult type that uses built-in ArrayBufferView
  • 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 in File.read and File.write (+Sync)
    • From this.stats.size to buffer.byteLength - offset
    • This now has the same behavior as the relevant Node.js APIs
  • 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 extend StoreFS
  • Added StoreFS methods for working with Index:
    • loadIndex
    • loadIndexSync
    • toIndex
    • toIndexSync
  • Deprecated IndexFS
    • You can use StoreFS and call loadIndex/loadIndexSync with your index
  • Changed inode and data IDs from bigint to number
  • Rewrote Index and IndexFS to be read/write
  • Added while canaries
    • This should prevent any infinite locks due to while loops
  • 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 using Index is now run through the full FS test suite
  • Port (including Async) 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-tests 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