Skip to content
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dat-ecosystem-archive/dat-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0
Choose a base ref
...
head repository: dat-ecosystem-archive/dat-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 880 additions and 400 deletions.
  1. +41 −0 .github/issue_template.md
  2. +2 −1 .gitignore
  3. +10 −3 .travis.yml
  4. +51 −1 CHANGELOG.md
  5. +142 −197 dat.js
  6. +2 −2 examples/download.js
  7. +1 −1 examples/share.js
  8. +59 −27 index.js
  9. +68 −17 lib/import-files.js
  10. +17 −13 lib/network.js
  11. +21 −0 lib/serve.js
  12. +85 −14 lib/stats.js
  13. +35 −10 lib/storage.js
  14. +24 −22 package.json
  15. +75 −30 readme.md
  16. +13 −4 test/download.js
  17. +1 −0 test/fixtures/hello.txt
  18. +4 −3 test/helpers/index.js
  19. +82 −10 test/importing.js
  20. +76 −10 test/misc.js
  21. +16 −8 test/options.js
  22. +55 −27 test/share.js
41 changes: 41 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

<!--
Thanks for opening an issue! Please help us address your bug:
- The issue tracker is only for bugs and feature requests.
- Before reporting a bug, please make sure your version of Dat updated to the latest release.
- If you have a question or need general advice, ask us in our Chat: http://chat.datproject.org (#dat on IRC, freenode)
-->

I am reporting:

- [ ] a bug or unexpected behavior
- [ ] general feedback
- [ ] feature request
- [ ] security issue <!-- see security issue note below -->

<!--
**Security Issue:**
Are you reporting a security issue that would impact general users? Please email us at security@datproject.org to report.
-->

# Bug Report

Please give us details about your installation to assist you. Run `dat -v` to see the version of Dat you are using.

* Operating system:
* Node Version:
* dat-node Version:

### Expected behavior

<!-- What do you think should happen? -->

### Actual behavior

<!-- What actually happens? -->

### Debug Logs

<!-- If it is easy to reproduce your bug, please run with the debug output so we can see what is going on. Type `DEBUG=dat* <your-command>` to print debug logs. -->
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -4,4 +4,5 @@ tmp
coverage/
npm-debug.log*
.nyc_output/
yarn.lock
yarn.lock
package-lock.json
13 changes: 10 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
language: node_js

node_js:
- "4"
- "6"
- "7"
- "12"

os:
osx
windows
linux

sudo: false

@@ -12,3 +15,7 @@ script:

after_success:
- npm i -g codecov && npm run coverage && codecov

cache:
directories:
- node_modules
52 changes: 51 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Change Log
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
@@ -10,6 +10,56 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Added, ### Changed, ### Fixed, ### Removed, ### Deprecated
-->

## 3.5.5 - 2017-06-19
### Fixed
* The stats tracking should work with much less issues now (https://github.com/datproject/dat-node/pull/175, https://github.com/datproject/dat-node/pull/176)

## 3.5.0 - 2017-06-19
### Added
* Serve archives over http (https://github.com/datproject/dat-node/pull/160)

## 3.4.0 - 2017-06-19
### Added
* Resolve dat links over http (https://github.com/datproject/dat-node/pull/159)

## 3.3.2 - 2017-05-29
### Fixed
* Bump hyperdrive to fix delete bug in append-tree (https://github.com/mafintosh/append-tree/commit/7e1f3cc9998be4ca7dabe0560b1a1ec1502ac186)

## 3.3.1 - 2017-05-16
### Fixed
* Replication Stream should be true for writable archives

### Added
* Use regular sleep storage if `opts.latest` is false

## 3.3.0 - 2017-05-10
### Added
* Importing - Ignore directories option, true by default

## 3.0.0 - 2017-04-28
### Fixed
* Upgrade hyperdrive with breaking change.

## 2.0.0 - 2017-04-13
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.

### Changed
* 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.

### Removed
* `opts.db` option - no more database! You can specify a variety of storage formats as the first argument instead.
* `dat.owner` - this is now `dat.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.

## 1.4.1 - 2017-03-17
### Fixed
* Pass network `opts` through to discovery-swarm.
Loading