All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Note: unreleased changes are added here.
- Serve archives over http (#160)
- Resolve dat links over http (#159)
- Bump hyperdrive to fix delete bug in append-tree (https://github.com/mafintosh/append-tree/commit/7e1f3cc9998be4ca7dabe0560b1a1ec1502ac186)
- Replication Stream should be true for writable archives
- Use regular sleep storage if
opts.latest
is false
- Importing - Ignore directories option, true by default
- Upgrade hyperdrive with breaking change.
Big new release! Hyperdrive version 8 upgrades to our SLEEP file format. The hyperdrive release improves import, transfer speed, and metadata access. It includes a new API much like the node fs API. Lots of cool things!
We've tried to keep the dat-node API changes to a minimum. But we've moved away from using leveldb to storing the metadata, using a flat file format instead. This means the 2.0 release will be incompatible with exiting dat archives.
If you have any old archives, we definitely recommend you upgrade. Any upgrade time will be made up for with more speed!
The major API differences are listed below, we probably forgot some minor changes as several of the underlying modules have changes options or APIs.
- Using
mirror-folder
for importing files - this comes with a new event emitter for importing and different options. - Storage is a lot different! You can specify a directory or a storage function, e.g.
Dat(ram, cb)
now instead of the database.
opts.db
option - no more database! You can specify a variety of storage formats as the first argument instead.dat.owner
- this is nowdat.writable
.stats
events - we are still in the process of upgrading hyperdrive-stats. Hypercore will also support more stats internally now and we will be transitioning to those soon.- Import options -
mirror-folder
has fewer options on import.
- Pass network
opts
through to discovery-swarm.
.datignore
support for ignoring files- Callback on
joinNetwork
after first round of discovery - Initial
pause
andresume
API aliased tojoin
andleave
stats.peers
API with new peer counts
- Better leave network, also closes swarm.
- Clone options passed to initArchive
- Set
opts.file
for archive owner without length createIfMissing
passed to level optionsdat.close()
twice sync errors- Fix import without options
- (hyperdrive fix) sparse content archives
- Remove automatic finalize for snapshot imports
- Close archive after bad key on init.
- Rollback temporary changes from 1.3.6
- Set length on file option
- Remove hyperdrive version pin
- Temporary changes for critical replication bugs
- Pin hyperdrive to
7.13.2
- Remove length option in
raf
- Do not allow owner to download
- Do not set file option for owner
- Key regression on resume
- Call back with error if
opts.key
mismatches keys in database - Fix options casting and improve errors
- Improve key handling for archive databases + debug info
- Call back with error object on init archive
- Do not mutate input args
- Call unreplicate on close to make sure data replication stops
- Throw error if close is called more than once
- Real error message for
createIfMissing
createIfMissing
anderrorIfExists
options
resume
option
- fix regression in resuming archives without content by opening them first.
- Learning things about
npm
versions!
- Dowloaded file could have old bytes that weren't removed with updates. Issue #79.
- Bug where opening archive on bad key returned without callback. Added timeout on open archive to make sure other key is tried before exiting.
- Read existing keys directly from hyperdrive instead of using the db. Allows for better resuming in any application.
- Count files much faster on import
- Add
opts.indexing
and default to true for whensource
=dest
.
- Support for
drive
as first argument and multidrive support dat.leaveNetwork
- leave the network for this archive key.- Added
dir
option to importer. - Made it easier to require Dat as a module, without creating archive.
- Close archive after other things are closed
- Use discoveryKey for stats database (security)
- Expose discovery swarm instance on
dat.network
instead ofdat.network.swarm
.
- Resolve the path and untildify before creating archive
- Use
opts.indexing
for importing.
- dat-node released with a new API. Read about changes from the old API.
- Populate
dat.key
after archive opened (#43)
- Use hyperdiscovery instead of hyperdrive-archive-swarm (#45)
Released dat-js
4.0 as dat-node
0.1.
dat-node 0.1.0 === dat-js 4.0.0
This will be the last major version of dat-js. This library will be moving to dat-fs, with a similar API.
- webrtc support (
opts.webrtc
,opts.signalhub
) opts.upload
changed toopts.discovery.upload
(deprecated in 3.4.0)
- Error message for trying to download a dat to folder with existing dat.
- Check type of keys on db resume
- Progress incorrectly showing 100% with 0 bytes
- Expose
dat.owner
,dat.key
,dat.peers
- Support buffer keys
- Forward
db.open
errors
- Guard
archive.close
ondat.close
- Create entryDone function once for downloads
- Download file count for duplicate files
stats.bytesProgress
on downloads
- Upgrade to hyperdrive 7.5.0
- Use archive.blocks for stats on download with new hyperdrive functions.
signalhub
option.
opts.ignoreHidden
ignores hidden directories by default.
- Accept object for discovery:
{upload: true, download: true}
.
upload
option (moved todiscovery.upload
). Will be removed in 4.0.0.
- Emit
files-counted
event on Dat instance - Include
stats
object onfile-counted
event
- Add
webrtc
option
- Upload option.
upload=false
will not upload data (allows download only option)
- User
opts.ignore
extends default opts.
- Default ignore does not ignore files with .dat in them.
- Default ignore config to ignore only
.dat
folder and files inside.
- Fix hyperdrive-import-files bug on sharing directories
dat.open()
function to initialize the.dat
folder
dat.on('ready')
event for initialization
- Port
lib/dat.js
file from the Dat CLI library.
- Use hyperdrive-import-files to import files on share