[Pkg-javascript-commits] [node-leveldown] 02/07: Imported Upstream version 1.0.6+dfsg

Andrew Kelley andrewrk-guest at moszumanska.debian.org
Mon May 18 21:09:25 UTC 2015


This is an automated email from the git hooks/post-receive script.

andrewrk-guest pushed a commit to branch master
in repository node-leveldown.

commit 8cdb30478b7a005c3abc857f0ccaf796c74f6aa8
Author: Andrew Kelley <superjoe30 at gmail.com>
Date:   Sat May 16 22:54:10 2015 +0000

    Imported Upstream version 1.0.6+dfsg
---
 .dntrc                                 |  4 ++-
 .travis.yml                            | 38 +++++++++++++++------
 CHANGELOG.md                           | 12 +++++++
 README.md                              | 20 +++++++----
 bench/db-bench.js                      | 62 ++++++++++++++++------------------
 bench/write-random.js                  |  6 +---
 bench/write-sorted.js                  |  6 +---
 iterator.js                            |  4 +--
 package.json                           | 20 ++++++-----
 src/async.h                            |  6 ++--
 src/batch_async.cc                     |  6 ++--
 src/batch_async.h                      |  6 ++--
 src/database.cc                        |  7 ++--
 src/database.h                         |  6 ++--
 src/database_async.cc                  |  6 ++--
 src/database_async.h                   |  6 ++--
 src/iterator.cc                        |  6 ++--
 src/iterator.h                         |  6 ++--
 src/iterator_async.cc                  |  6 ++--
 src/iterator_async.h                   |  6 ++--
 src/leveldown.cc                       |  6 ++--
 src/leveldown.h                        |  6 ++--
 src/leveldown_async.cc                 |  6 ++--
 src/leveldown_async.h                  |  6 ++--
 test/approximate-size-test.js          |  5 ++-
 test/batch-test.js                     |  5 ++-
 test/chained-batch-test.js             |  5 ++-
 test/cleanup-hanging-iterators-test.js |  4 +--
 test/close-test.js                     |  5 ++-
 test/del-test.js                       |  5 ++-
 test/destroy-test.js                   |  4 +--
 test/get-test.js                       |  5 ++-
 test/getproperty-test.js               |  4 +--
 test/iterator-recursion-test.js        | 25 +++++++-------
 test/iterator-test.js                  |  5 ++-
 test/leveldown-test.js                 |  5 ++-
 test/{make-test.js => make.js}         |  4 +--
 test/open-test.js                      |  5 ++-
 test/port-libuv-fix-test.js            |  2 +-
 test/put-get-del-test.js               |  5 ++-
 test/put-test.js                       |  5 ++-
 test/ranges-test.js                    |  5 ++-
 test/repair-test.js                    |  6 ++--
 43 files changed, 194 insertions(+), 178 deletions(-)

diff --git a/.dntrc b/.dntrc
index 3f20ae2..a956f18 100644
--- a/.dntrc
+++ b/.dntrc
@@ -2,10 +2,12 @@
 ## see https://github.com/rvagg/dnt
 
 NODE_VERSIONS="\
-  v0.8.28      \
   v0.10.31     \
   v0.11.13     \
 "
+IOJS_VERSIONS="\
+  v1.0.1-release \
+"
 OUTPUT_PREFIX="leveldown-"
 TEST_CMD="\
   cd /dnt/ &&                                                    \
diff --git a/.travis.yml b/.travis.yml
index 2dc68bc..d928457 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,30 @@
-language: node_js
-node_js:
-  - "0.10"
-branches:
-  only:
-    - master
-notifications:
-  email:
-    - rod at vagg.org
-script: npm test
+language: c
 
 before_install:
-  - npm install -g npm at latest
+  - rm -rf ~/.nvm
+  - wget https://raw.githubusercontent.com/visionmedia/n/master/bin/n -qO n
+  - chmod +x n
+  - sudo cp n /usr/local/bin/n
+  - sudo chmod -R a+xw /usr/local
+  - n --version
+
+script:
+  - n 0.10
+  - node -v; which node; npm -v; which npm
+  - JOBS=max npm install
+  - npm test && rm -rf node_modules/
+
+  - n latest
+  - node -v; which node; npm -v; which npm
+  - JOBS=max npm install
+  - npm test && rm -rf node_modules/
 
+  - n io latest
+  - iojs -v; which iojs; npm -v; which npm
+  - JOBS=max npm install
+  - npm test
+
+notifications:
+  email:
+    - rod at vagg.org
+    - ralphtheninja at riseup.net
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a01aa84..246d275 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,15 @@
+### 1.0.2 Apr 26 2015
+  * [[`8470a63678`](https://github.com/level/leveldown/commit/8470a63678)] - s/rvagg\/node-/level\// (Lars-Magnus Skog)
+  * [[`9cbf592bea`](https://github.com/level/leveldown/commit/9cbf592bea)] - add documentation about snapshots (Max Ogden)
+  * [[`b57827cd29`](https://github.com/level/leveldown/commit/b57827cd29)] - use n instead of nvm for working iojs support (Lars-Magnus Skog)
+  * [[`a19927667a`](https://github.com/level/leveldown/commit/a19927667a)] - abstract-leveldown ~2.1.0 (ralphtheninja)
+  * [[`95ccdf0850`](https://github.com/level/leveldown/commit/95ccdf0850)] - update logo and copyright (Lars-Magnus Skog)
+  * [[`09e89d7abb`](https://github.com/level/leveldown/commit/09e89d7abb)] - updated my email (ralphtheninja)
+
+### 1.0.1 Jan 16 2015
+  * [[`6df3ecd6f5`](https://github.com/level/leveldown/commit/6df3ecd6f5)] - nan 1.5 for io.js support (Rod Vagg)
+  * [[`5198231a88`](https://github.com/level/leveldown/commit/5198231a88)] - Fix LevelDB builds for modern gcc versions (Sharvil Nanavati)
+
 ### 1.0.0 Aug 26 2014
   * NAN at 1.3 for Node 0.11.13+ support (@rvagg)
   * Allow writing empty values: null, undefined, '', [] and Buffer(0). Entries come out as '' or Buffer(0) (@ggreer, @juliangruber, @rvagg)
diff --git a/README.md b/README.md
index a5c7853..a79f0cd 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,16 @@
 LevelDOWN
 =========
 
-![LevelDB Logo](https://twimg0-a.akamaihd.net/profile_images/3360574989/92fc472928b444980408147e5e5db2fa_bigger.png)
+<img alt="LevelDB Logo" height="100" src="http://leveldb.org/img/logo.svg">
 
 A Low-level Node.js LevelDB binding
 -------------------------
 
-[![Build Status](https://secure.travis-ci.org/rvagg/node-leveldown.png)](http://travis-ci.org/rvagg/node-leveldown)
+[![Build Status](https://secure.travis-ci.org/Level/leveldown.png)](http://travis-ci.org/Level/leveldown)
 
 [![NPM](https://nodei.co/npm/leveldown.png?stars&downloads&downloadRank)](https://nodei.co/npm/leveldown/) [![NPM](https://nodei.co/npm-dl/leveldown.png?months=6&height=3)](https://nodei.co/npm/leveldown/)
 
-LevelDOWN was extracted from [LevelUP](https://github.com/rvagg/node-levelup) and now serves as a stand-alone binding for LevelDB.
+LevelDOWN was extracted from [LevelUP](https://github.com/level/levelup) and now serves as a stand-alone binding for LevelDB.
 
 It is **strongly recommended** that you use LevelUP in preference to LevelDOWN unless you have measurable performance reasons to do so. LevelUP is optimised for usability and safety. Although we are working to improve the safety of the LevelDOWN interface it is still easy to crash your Node process if you don't do things in just the right way.
 
@@ -25,7 +25,7 @@ Tested & supported platforms
   * **Solaris** (SmartOS & Nodejitsu)
   * **FreeBSD**
   * **Windows**
-    * Node 0.10 and above only, see [issue #5](https://github.com/rvagg/node-levelup/issues/5) for more info
+    * Node 0.10 and above only, see [issue #5](https://github.com/level/levelup/issues/5) for more info
     * See installation instructions for *node-gyp* dependencies [here](https://github.com/TooTallNate/node-gyp#installation), you'll need these (free) components from Microsoft to compile and run any native Node add-on in Windows.
 
 <a name="api"></a>
@@ -148,7 +148,7 @@ The `callback` function will be called with no arguments if the operation is suc
 ### leveldown#batch(operations[, options], callback)
 <code>batch()</code> is an instance method on an existing database object. Used for very fast bulk-write operations (both *put* and *delete*). The `operations` argument should be an `Array` containing a list of operations to be executed sequentially, although as a whole they are performed as an atomic operation inside LevelDB. Each operation is contained in an object having the following properties: `type`, `key`, `value`, where the *type* is either `'put'` or `'del'`. In the case of `'d [...]
 
-See [LevelUP](https://github.com/rvagg/node-levelup#batch) for full documentation on how this works in practice.
+See [LevelUP](https://github.com/level/levelup#batch) for full documentation on how this works in practice.
 
 #### `options`
 
@@ -265,6 +265,12 @@ Currently LevelDOWN does not track the state of the underlying LevelDB instance.
 
 LevelUP currently tracks and manages state and will prevent out-of-state operations from being send to LevelDOWN. If you use LevelDOWN directly then you must track and manage state for yourself.
 
+<a name="snapshots"></a>
+Snapshots
+---------------
+
+LevelDOWN exposes a feature of LevelDB called [snapshots](http://leveldb.googlecode.com/git-history/f779e7a5d89f853fc5224f9eb8103ca2b8f2f555/doc/index.html). This means that when you do e.g. `createReadStream` and `createWriteStream` at the same time, any data modified by the write stream will not affect data emitted from the read stream. In other words, a LevelDB Snapshot captures the latest state at the time the snapshot was created, enabling the snapshot to iterate or read the data wi [...]
+
 <a name="support"></a>
 Getting support
 ---------------
@@ -283,7 +289,7 @@ LevelDOWN is an **OPEN Open Source Project**. This means that:
 
 > Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
 
-See the [CONTRIBUTING.md](https://github.com/rvagg/node-leveldown/blob/master/CONTRIBUTING.md) file for more details.
+See the [CONTRIBUTING.md](https://github.com/level/leveldown/blob/master/CONTRIBUTING.md) file for more details.
 
 ### Contributors
 
@@ -314,7 +320,7 @@ A large portion of the Windows support comes from code by [Krzysztof Kowalczyk](
 License & copyright
 -------------------
 
-Copyright (c) 2012-2014 LevelDOWN contributors (listed above).
+Copyright (c) 2012-2015 LevelDOWN contributors (listed above).
 
 LevelDOWN is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.
 
diff --git a/bench/db-bench.js b/bench/db-bench.js
index e81ac66..0f15515 100755
--- a/bench/db-bench.js
+++ b/bench/db-bench.js
@@ -1,40 +1,36 @@
 #!/usr/bin/env node
 
-const leveldown = require('../')
-    , fs        = require('fs')
-    , du        = require('du')
-    , rimraf    = require('rimraf')
+const leveldown    = require('../')
+    , fs           = require('fs')
+    , du           = require('du')
+    , rimraf       = require('rimraf')
 
-    , argv      = require('optimist').argv
+    , argv         = require('optimist').argv
 
-    , options   = {
+    , options      = {
           benchmark        : argv.benchmark
         , useExisting      : argv.use_existing
-        , db               : argv.db
+        , db               : argv.db              || __dirname + '/db'
         , num              : argv.num             || 1000000
         , concurrency      : argv.concurrency     || 4
         , cacheSize        : argv.cacheSize       || 8
         , writeBufferSize  : argv.writeBufferSize || 4
         , valueSize        : argv.valueSize       || 100
-        , timingOutput     : argv.timingOutput
+        , timingOutput     : argv.timingOutput    || __dirname + '/timingOutput'
         , throughputOutput : argv.throughputOutput
       }
 
-    , randomData = require('./random-data')()
-    , keyTmpl = '0000000000000000'
+    , randomString = require('slump').string
+    , keyTmpl      = '0000000000000000'
 
 if (!options.useExisting) {
   leveldown.destroy(options.db, function () {})
 }
 
 var db          = leveldown(options.db)
-  , timesStream = options.timingOutput
-        && fs.createWriteStream(options.timingOutput, 'utf8')
-//  , throughputStream = options.throughputOutput
-//        && fs.createWriteStream(options.throughputOutput, 'utf8')
+  , timesStream = fs.createWriteStream(options.timingOutput, 'utf8')
 
-// make a 16 char padded key
-function makeKey () {
+function make16CharPaddedKey () {
   var r = Math.floor(Math.random() * options.num)
     , k = keyTmpl + r
   return k.substr(k.length - 16)
@@ -42,17 +38,7 @@ function makeKey () {
 
 timesStream.write('Elapsed (ms), Entries, Bytes, Last 1000 Avg Time, MB/s\n')
 
-setTimeout(function () {
-  db.open({
-        errorIfExists   : false
-      , createIfMissing : true
-      , cacheSize       : options.cacheSize << 20
-      , writeBufferSize : options.writeBufferSize << 20
-  }, function (err) {
-
-  if (err)
-    throw err
-
+function start () {
   var inProgress  = 0
     , totalWrites = 0
     , totalBytes  = 0
@@ -103,19 +89,16 @@ setTimeout(function () {
         + ',' + (Math.floor(((totalBytes / 1048576) / (elapsed / 1000)) * 100) / 100)
         + '\n')
       timesAccum = 0
-      //timesStream.write(writeBuf)
-      //writeBuf = ''
     }
 
     var time = process.hrtime()
 
-    db.put(makeKey(), randomData.generate(options.valueSize), function (err) {
+    db.put(make16CharPaddedKey(), randomString({ length: options.valueSize }), function (err) {
       if (err)
         throw err
 
       totalBytes += keyTmpl.length + options.valueSize
       timesAccum += process.hrtime(time)[1]
-      //writeBuf += (Date.now() - startTime) + ',' + process.hrtime(time)[1] + '\n'
       inProgress--
       process.nextTick(write)
     })
@@ -123,4 +106,19 @@ setTimeout(function () {
 
   for (var i = 0; i < options.concurrency; i++)
     write()
-})}, 500)
+}
+
+setTimeout(function () {
+  db.open({
+        errorIfExists   : false
+      , createIfMissing : true
+      , cacheSize       : options.cacheSize << 20
+      , writeBufferSize : options.writeBufferSize << 20
+  }, function (err) {
+    if (err)
+      throw err
+
+    start()
+
+  })
+}, 500)
diff --git a/bench/write-random.js b/bench/write-random.js
index a8d419f..a56a321 100644
--- a/bench/write-random.js
+++ b/bench/write-random.js
@@ -1,4 +1,4 @@
-const leveldown   = require('../../lmdb/')
+const leveldown   = require('../')
     , crypto      = require('crypto')
     , fs          = require('fs')
     , du          = require('du')
@@ -31,15 +31,12 @@ db.open(function (err) {
   var inProgress  = 0
     , totalWrites = 0
     , startTime   = Date.now()
-    //, timesTotal  = 0
     , writeBuf    = ''
 
   function write() {
     if (totalWrites % 100000 == 0) console.log(inProgress, totalWrites)
 
     if (totalWrites % 1000 == 0) {
-      //timesStream.write((Date.now() - startTime) + ',' + Math.floor(timesTotal / 1000) + '\n')
-      //timesTotal = 0
       timesStream.write(writeBuf)
       writeBuf = ''
     }
@@ -56,7 +53,6 @@ db.open(function (err) {
     db.put(uuid.v4(), data, function (err) {
       if (err)
         throw err
-      //timesTotal += process.hrtime(time)[1]
       writeBuf += (Date.now() - startTime) + ',' + process.hrtime(time)[1] + '\n'
       inProgress--
       process.nextTick(write)
diff --git a/bench/write-sorted.js b/bench/write-sorted.js
index 766c2d4..74b0a15 100644
--- a/bench/write-sorted.js
+++ b/bench/write-sorted.js
@@ -31,15 +31,12 @@ db.open({ errorIfExists: true, createIfMissing: true }, function (err) {
   var inProgress  = 0
     , totalWrites = 0
     , startTime   = Date.now()
-    //, timesTotal  = 0
     , writeBuf    = ''
 
   function write() {
     if (totalWrites % 100000 == 0) console.log(inProgress, totalWrites)
 
     if (totalWrites % 1000 == 0) {
-      //timesStream.write((Date.now() - startTime) + ',' + Math.floor(timesTotal / 1000) + '\n')
-      //timesTotal = 0
       timesStream.write(writeBuf)
       writeBuf = ''
     }
@@ -56,7 +53,6 @@ db.open({ errorIfExists: true, createIfMissing: true }, function (err) {
     db.put(timestamp(), data, function (err) {
       if (err)
         throw err
-      //timesTotal += process.hrtime(time)[1]
       writeBuf += (Date.now() - startTime) + ',' + process.hrtime(time)[1] + '\n'
       inProgress--
       process.nextTick(write)
@@ -66,4 +62,4 @@ db.open({ errorIfExists: true, createIfMissing: true }, function (err) {
   }
 
   write()
-})
\ No newline at end of file
+})
diff --git a/iterator.js b/iterator.js
index 202c6d4..f3f5c1e 100644
--- a/iterator.js
+++ b/iterator.js
@@ -3,7 +3,7 @@ const util             = require('util')
 
 
 function Iterator (db, options) {
-  AbstractIterator.call(this, options)
+  AbstractIterator.call(this, db)
 
   this.binding    = db.binding.iterator(options)
   this.cache      = null
@@ -51,4 +51,4 @@ Iterator.prototype._end = function (callback) {
 }
 
 
-module.exports = Iterator
\ No newline at end of file
+module.exports = Iterator
diff --git a/package.json b/package.json
index c7a0116..3d6d03e 100644
--- a/package.json
+++ b/package.json
@@ -1,14 +1,14 @@
 {
   "name": "leveldown",
   "description": "A Node.js LevelDB binding, primary backend for LevelUP",
-  "version": "1.0.0",
+  "version": "1.0.6",
   "contributors": [
     "Rod Vagg <r at va.gg> (https://github.com/rvagg)",
     "John Chesley <john at chesl.es> (https://github.com/chesles/)",
     "Jake Verbaten <raynos2 at gmail.com> (https://github.com/raynos)",
     "Dominic Tarr <dominic.tarr at gmail.com> (https://github.com/dominictarr)",
     "Max Ogden <max at maxogden.com> (https://github.com/maxogden)",
-    "Lars-Magnus Skog <lars.magnus.skog at gmail.com> (https://github.com/ralphtheninja)",
+    "Lars-Magnus Skog <ralphtheninja at riseup.net> (https://github.com/ralphtheninja)",
     "David Björklund <david.bjorklund at gmail.com> (https://github.com/kesla)",
     "Julian Gruber <julian at juliangruber.com> (https://github.com/juliangruber)",
     "Paolo Fragomeni <paolo at async.ly> (https://github.com/hij1nx)",
@@ -19,31 +19,35 @@
   ],
   "repository": {
     "type": "git",
-    "url": "https://github.com/rvagg/node-leveldown.git"
+    "url": "https://github.com/level/leveldown.git"
   },
-  "homepage": "https://github.com/rvagg/node-leveldown",
+  "homepage": "https://github.com/level/leveldown",
   "keywords": [
     "leveldb",
     "level"
   ],
   "main": "leveldown.js",
   "dependencies": {
-    "abstract-leveldown": "~2.0.0",
+    "abstract-leveldown": "~2.1.0",
     "bindings": "~1.2.1",
     "fast-future": "~1.0.0",
-    "nan": "~1.3.0"
+    "nan": "~1.8.4"
   },
   "devDependencies": {
     "du": "~0.1.0",
+    "faucet": "0.0.1",
     "mkfiletree": "~0.0.1",
     "monotonic-timestamp": "~0.0.8",
     "node-gyp": "~1.0.1",
+    "node-uuid": "~1.4.3",
+    "optimist": "~0.6.1",
     "readfiletree": "~0.0.1",
     "rimraf": "~2.2.8",
-    "tap": "~0.4.12"
+    "slump": "~2.0.0",
+    "tape": "~4.0.0"
   },
   "scripts": {
-    "test": "tap test/*-test.js --stderr"
+    "test": "tape test/*-test.js | faucet"
   },
   "license": "MIT",
   "gypfile": true
diff --git a/src/async.h b/src/async.h
index 1be7ca2..54bf40c 100644
--- a/src/async.h
+++ b/src/async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #ifndef LD_ASYNC_H
diff --git a/src/batch_async.cc b/src/batch_async.cc
index 92d911d..c386319 100644
--- a/src/batch_async.cc
+++ b/src/batch_async.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 
diff --git a/src/batch_async.h b/src/batch_async.h
index 5323d1a..218591f 100644
--- a/src/batch_async.h
+++ b/src/batch_async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #ifndef LD_BATCH_ASYNC_H
diff --git a/src/database.cc b/src/database.cc
index bb5702a..2f6497a 100644
--- a/src/database.cc
+++ b/src/database.cc
@@ -1,7 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License
- * <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #include <node.h>
diff --git a/src/database.h b/src/database.h
index c466a7b..2517d09 100644
--- a/src/database.h
+++ b/src/database.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #ifndef LD_DATABASE_H
diff --git a/src/database_async.cc b/src/database_async.cc
index 96943c0..5ed674e 100644
--- a/src/database_async.cc
+++ b/src/database_async.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #include <node.h>
diff --git a/src/database_async.h b/src/database_async.h
index 3d8c040..60b7d1b 100644
--- a/src/database_async.h
+++ b/src/database_async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #ifndef LD_DATABASE_ASYNC_H
diff --git a/src/iterator.cc b/src/iterator.cc
index 180de6d..005c274 100644
--- a/src/iterator.cc
+++ b/src/iterator.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #include <node.h>
diff --git a/src/iterator.h b/src/iterator.h
index d8ed5f2..ae2b353 100644
--- a/src/iterator.h
+++ b/src/iterator.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #ifndef LD_ITERATOR_H
diff --git a/src/iterator_async.cc b/src/iterator_async.cc
index f3db790..fffbbd4 100644
--- a/src/iterator_async.cc
+++ b/src/iterator_async.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #include <node.h>
diff --git a/src/iterator_async.h b/src/iterator_async.h
index edb8f4d..9d6c7a3 100644
--- a/src/iterator_async.h
+++ b/src/iterator_async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #ifndef LD_ITERATOR_ASYNC_H
diff --git a/src/leveldown.cc b/src/leveldown.cc
index 20baf3d..2a4ed31 100644
--- a/src/leveldown.cc
+++ b/src/leveldown.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #include <node.h>
diff --git a/src/leveldown.h b/src/leveldown.h
index cdeee4f..a704c06 100644
--- a/src/leveldown.h
+++ b/src/leveldown.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 #ifndef LD_LEVELDOWN_H
 #define LD_LEVELDOWN_H
diff --git a/src/leveldown_async.cc b/src/leveldown_async.cc
index 5872659..675a234 100644
--- a/src/leveldown_async.cc
+++ b/src/leveldown_async.cc
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #include <leveldb/db.h>
diff --git a/src/leveldown_async.h b/src/leveldown_async.h
index eb1b844..689342d 100644
--- a/src/leveldown_async.h
+++ b/src/leveldown_async.h
@@ -1,6 +1,6 @@
-/* Copyright (c) 2012-2014 LevelDOWN contributors
- * See list at <https://github.com/rvagg/node-leveldown#contributing>
- * MIT License <https://github.com/rvagg/node-leveldown/blob/master/LICENSE.md>
+/* Copyright (c) 2012-2015 LevelDOWN contributors
+ * See list at <https://github.com/level/leveldown#contributing>
+ * MIT License <https://github.com/level/leveldown/blob/master/LICENSE.md>
  */
 
 #ifndef LD_LEVELDOWN_ASYNC_H
diff --git a/test/approximate-size-test.js b/test/approximate-size-test.js
index 788d10e..31038a4 100644
--- a/test/approximate-size-test.js
+++ b/test/approximate-size-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/approximate-size-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/batch-test.js b/test/batch-test.js
index 4040eea..c93e6ef 100644
--- a/test/batch-test.js
+++ b/test/batch-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/batch-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/chained-batch-test.js b/test/chained-batch-test.js
index 562f868..cc20f9e 100644
--- a/test/chained-batch-test.js
+++ b/test/chained-batch-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/chained-batch-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/cleanup-hanging-iterators-test.js b/test/cleanup-hanging-iterators-test.js
index f811b7d..3ed394e 100644
--- a/test/cleanup-hanging-iterators-test.js
+++ b/test/cleanup-hanging-iterators-test.js
@@ -1,7 +1,7 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
-    , makeTest   = require('./make-test')
+    , makeTest   = require('./make')
 
 makeTest('test ended iterator', function (db, t, done) {
   // standard iterator with an end() properly called, easy
diff --git a/test/close-test.js b/test/close-test.js
index 3b9f9e7..ae5d3bf 100644
--- a/test/close-test.js
+++ b/test/close-test.js
@@ -1,4 +1,4 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/close-test')
@@ -19,5 +19,4 @@ module.exports.all = function (leveldown) {
   module.exports.tearDown()
 }
 
-if (require.main === module)
-  module.exports.all(leveldown)
\ No newline at end of file
+module.exports.all(leveldown)
diff --git a/test/del-test.js b/test/del-test.js
index f1b12c9..b21712b 100644
--- a/test/del-test.js
+++ b/test/del-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/del-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/destroy-test.js b/test/destroy-test.js
index aa97053..d1be840 100644
--- a/test/destroy-test.js
+++ b/test/destroy-test.js
@@ -1,11 +1,11 @@
-const test         = require('tap').test
+const test         = require('tape')
     , fs           = require('fs')
     , path         = require('path')
     , mkfiletree   = require('mkfiletree')
     , readfiletree = require('readfiletree')
     , testCommon   = require('abstract-leveldown/testCommon')
     , leveldown    = require('../')
-    , makeTest     = require('./make-test')
+    , makeTest     = require('./make')
 
 test('test argument-less destroy() throws', function (t) {
   t.throws(
diff --git a/test/get-test.js b/test/get-test.js
index 5423ea1..52270ad 100644
--- a/test/get-test.js
+++ b/test/get-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/get-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/getproperty-test.js b/test/getproperty-test.js
index db48946..46bce11 100644
--- a/test/getproperty-test.js
+++ b/test/getproperty-test.js
@@ -1,4 +1,4 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
 
@@ -54,4 +54,4 @@ test('test invalid getProperty("leveldb.sstables")', function (t) {
 
 test('tearDown', function (t) {
   db.close(testCommon.tearDown.bind(null, t))
-})
\ No newline at end of file
+})
diff --git a/test/iterator-recursion-test.js b/test/iterator-recursion-test.js
index ff2a780..db18dab 100644
--- a/test/iterator-recursion-test.js
+++ b/test/iterator-recursion-test.js
@@ -1,4 +1,4 @@
-const test          = require('tap').test
+const test          = require('tape')
     , testCommon    = require('abstract-leveldown/testCommon')
     , leveldown     = require('../')
     , child_process = require('child_process') 
@@ -32,20 +32,19 @@ test('try to create an iterator with a blown stack', function (t) {
   // Reducing the stack size down from the default 984 for the child node
   // process makes it easier to trigger the bug condition. But making it too low
   // causes the child process to die for other reasons.
-  var opts  = { execArgv: ["--stack-size=128"] }
-  ,   child = child_process.fork(__dirname + '/stack-blower.js', ["run"], opts)
+  var opts  = { execArgv: [ '--stack-size=128' ] }
+    , child = child_process.fork(__dirname + '/stack-blower.js', [ 'run' ], opts)
+
+  t.plan(2)
   
   child.on('message', function (m) {
-      t.ok(true, m)
-      child.disconnect()
-      
-      t.end()
-    })
-    .on('exit', function (code, sig) {
-      t.ok(false, "Child exited with code=" + code + " sig=" + sig)
+    t.ok(true, m)
+    child.disconnect()
+  })
 
-      t.end()
-    })
+  child.on('exit', function (code, sig) {
+    t.equal(code, 0, 'child exited normally')
+  })
 })
 
 test('iterate over a large iterator with a large watermark', function (t) {
@@ -69,4 +68,4 @@ test('iterate over a large iterator with a large watermark', function (t) {
 
 test('tearDown', function (t) {
   db.close(testCommon.tearDown.bind(null, t))
-})
\ No newline at end of file
+})
diff --git a/test/iterator-test.js b/test/iterator-test.js
index 18073f6..1c179a9 100644
--- a/test/iterator-test.js
+++ b/test/iterator-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/iterator-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/leveldown-test.js b/test/leveldown-test.js
index d65e078..11db1c3 100644
--- a/test/leveldown-test.js
+++ b/test/leveldown-test.js
@@ -1,6 +1,5 @@
-const test      = require('tap').test
+const test      = require('tape')
     , leveldown = require('../')
     , abstract  = require('abstract-leveldown/abstract/leveldown-test')
 
-if (require.main === module)
-  abstract.args(leveldown, test)
\ No newline at end of file
+abstract.args(leveldown, test)
diff --git a/test/make-test.js b/test/make.js
similarity index 94%
rename from test/make-test.js
rename to test/make.js
index 167027d..aeccf3b 100644
--- a/test/make-test.js
+++ b/test/make.js
@@ -1,4 +1,4 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , cleanup    = testCommon.cleanup
     , location   = testCommon.location
@@ -35,4 +35,4 @@ function makeTest (name, testFn) {
   })
 }
 
-module.exports = makeTest
\ No newline at end of file
+module.exports = makeTest
diff --git a/test/open-test.js b/test/open-test.js
index 4d84996..0da638a 100644
--- a/test/open-test.js
+++ b/test/open-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/open-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/port-libuv-fix-test.js b/test/port-libuv-fix-test.js
index 089f1e6..300baa7 100644
--- a/test/port-libuv-fix-test.js
+++ b/test/port-libuv-fix-test.js
@@ -1,4 +1,4 @@
-const test = require('tap').test
+const test = require('tape')
     , path = require('path')
     , fs   = require('fs')
 
diff --git a/test/put-get-del-test.js b/test/put-get-del-test.js
index 631d886..0f68858 100644
--- a/test/put-get-del-test.js
+++ b/test/put-get-del-test.js
@@ -1,4 +1,4 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , fs         = require('fs')
@@ -6,5 +6,4 @@ const test       = require('tap').test
     , testBuffer = fs.readFileSync(path.join(__dirname, 'data/testdata.bin'))
     , abstract   = require('abstract-leveldown/abstract/put-get-del-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon, testBuffer)
+abstract.all(leveldown, test, testCommon, testBuffer)
diff --git a/test/put-test.js b/test/put-test.js
index f24997f..e437f5e 100644
--- a/test/put-test.js
+++ b/test/put-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/put-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
\ No newline at end of file
+abstract.all(leveldown, test, testCommon)
diff --git a/test/ranges-test.js b/test/ranges-test.js
index 59742d4..7f16a2d 100644
--- a/test/ranges-test.js
+++ b/test/ranges-test.js
@@ -1,7 +1,6 @@
-const test       = require('tap').test
+const test       = require('tape')
     , testCommon = require('abstract-leveldown/testCommon')
     , leveldown  = require('../')
     , abstract   = require('abstract-leveldown/abstract/ranges-test')
 
-if (require.main === module)
-  abstract.all(leveldown, test, testCommon)
+abstract.all(leveldown, test, testCommon)
diff --git a/test/repair-test.js b/test/repair-test.js
index 225a3ac..17f3514 100644
--- a/test/repair-test.js
+++ b/test/repair-test.js
@@ -1,11 +1,11 @@
-const test         = require('tap').test
+const test         = require('tape')
     , fs           = require('fs')
     , path         = require('path')
     , mkfiletree   = require('mkfiletree')
     , readfiletree = require('readfiletree')
     , testCommon   = require('abstract-leveldown/testCommon')
     , leveldown    = require('../')
-    , makeTest     = require('./make-test')
+    , makeTest     = require('./make')
 
 test('test argument-less repair() throws', function (t) {
   t.throws(
@@ -27,7 +27,7 @@ test('test callback-less, 1-arg, repair() throws', function (t) {
 
 test('test repair non-existant directory returns error', function (t) {
   leveldown.repair('/1/2/3/4', function (err) {
-    t.like(/no such/i, err, 'error on callback')
+    t.ok(/no such/i.test(err), 'error on callback')
     t.end()
   })
 })

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-leveldown.git



More information about the Pkg-javascript-commits mailing list