level-packager
Advanced tools
Comparing version 5.0.1 to 5.0.2
@@ -11,8 +11,8 @@ 'use strict' | ||
t.ok(fs.statSync(location).isDirectory(), 'sanity check, directory exists') | ||
t.ok(fs.existsSync(path.join(location, 'LOG')), 'sanity check, log exists') | ||
t.ok(fs.existsSync(path.join(location, 'CURRENT')), 'sanity check, CURRENT exists') | ||
level.destroy(location, function (err) { | ||
t.notOk(err, 'no error') | ||
t.notOk(fs.existsSync(path.join(location, 'LOG')), 'db gone (mostly)') | ||
t.notOk(fs.existsSync(path.join(location, 'CURRENT')), 'db gone (mostly)') | ||
}) | ||
}) | ||
} |
@@ -5,2 +5,19 @@ # Changelog | ||
## [5.0.2] - 2019-06-08 | ||
### Changed | ||
- Upgrade `nyc` devDependency from `^13.2.0` to `^14.0.0` ([#85](https://github.com/Level/packager/issues/85)) ([**@vweevers**](https://github.com/vweevers)) | ||
### Added | ||
- Add `.npmignore` ([`85b9a84`](https://github.com/Level/packager/commit/85b9a84)) ([**@vweevers**](https://github.com/vweevers)) | ||
### Fixed | ||
- Support variadic arguments in `destroy()` and `repair()` ([#88](https://github.com/Level/packager/issues/88)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Don't assume existence of a `LOG` file in abstract `destroy-test` ([#87](https://github.com/Level/packager/issues/87)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Fix Level badge ([`2429718`](https://github.com/Level/packager/commit/2429718)) ([**@vweevers**](https://github.com/vweevers)) | ||
- Remove link to dead website ([`d671d63`](https://github.com/Level/packager/commit/d671d63)) ([**@vweevers**](https://github.com/vweevers)) | ||
## [5.0.1] - 2019-03-31 | ||
@@ -337,4 +354,6 @@ | ||
[unreleased]: https://github.com/level/packager/compare/v5.0.1...HEAD | ||
[unreleased]: https://github.com/level/packager/compare/v5.0.2...HEAD | ||
[5.0.2]: https://github.com/level/packager/compare/v5.0.1...v5.0.2 | ||
[5.0.1]: https://github.com/level/packager/compare/v5.0.0...v5.0.1 | ||
@@ -341,0 +360,0 @@ |
@@ -7,6 +7,6 @@ # Contributors | ||
| **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) | | ||
| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) | | ||
| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) | | ||
| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) | | ||
| **Matteo Collina** | [**@mcollina**](https://github.com/mcollina) | [**@matteocollina@twitter**](https://twitter.com/matteocollina) | | ||
| **Deian Stefan** | [**@deian**](https://github.com/deian) | | | ||
| **Andrew Kelley** | [**@andrewrk**](https://github.com/andrewrk) | | |
@@ -18,4 +18,4 @@ var levelup = require('levelup') | ||
if (typeof leveldown[m] === 'function') { | ||
Level[m] = function (location, callback) { | ||
leveldown[m](location, callback || function () {}) | ||
Level[m] = function () { | ||
leveldown[m].apply(leveldown, arguments) | ||
} | ||
@@ -22,0 +22,0 @@ } |
{ | ||
"name": "level-packager", | ||
"version": "5.0.1", | ||
"version": "5.0.2", | ||
"description": "LevelUP package helper for distributing with a LevelDOWN-compatible back-end", | ||
@@ -23,3 +23,3 @@ "license": "MIT", | ||
"level-community": "^3.0.0", | ||
"nyc": "^13.2.0", | ||
"nyc": "^14.0.0", | ||
"standard": "^12.0.0", | ||
@@ -26,0 +26,0 @@ "tape": "^4.0.0" |
@@ -42,3 +42,3 @@ # level-packager | ||
To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level), [npm](https://www.npmjs.com/) packages and (soon) [our website](http://leveldb.org). 💖 | ||
To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level) and [npm](https://www.npmjs.com/) packages. 💖 | ||
@@ -57,2 +57,2 @@ ### Backers | ||
[level-badge]: http://leveldb.org/img/badge.svg | ||
[level-badge]: https://leveljs.org/img/badge.svg |
35
test.js
@@ -12,20 +12,23 @@ 'use strict' | ||
test('Level constructor relays .destroy if it exists', function (t) { | ||
t.plan(2) | ||
function Down () {} | ||
Down.destroy = function (location, cb) { | ||
t.is(location, 'location', 'location is correct') | ||
t.is(typeof cb, 'function', 'cb is set') | ||
} | ||
packager(Down).destroy('location') | ||
}) | ||
test('Level constructor relays .destroy and .repair if they exist', function (t) { | ||
t.plan(8) | ||
test('Level constructor relays .repair if it exists', function (t) { | ||
t.plan(2) | ||
function Down () {} | ||
Down.repair = function (location, cb) { | ||
t.is(location, 'location', 'location is correct') | ||
t.is(typeof cb, 'function', 'cb is set') | ||
test('destroy') | ||
test('repair') | ||
function test (method) { | ||
function Down () {} | ||
Down[method] = function () { | ||
t.same([].slice.call(arguments), args, 'supports variadic arguments') | ||
} | ||
var level = packager(Down) | ||
var args = [] | ||
for (var i = 0; i < 4; i++) { | ||
args.push(i) | ||
level[method].apply(level, args) | ||
} | ||
} | ||
packager(Down).repair('location') | ||
}) | ||
@@ -32,0 +35,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28042
15
217