leveldown
Advanced tools
Comparing version 5.6.0 to 6.0.0
@@ -0,1 +1,3 @@ | ||
'use strict' | ||
const util = require('util') | ||
@@ -2,0 +4,0 @@ const AbstractChainedBatch = require('abstract-leveldown').AbstractChainedBatch |
@@ -5,2 +5,17 @@ # Changelog | ||
## [6.0.0] - 2021-04-10 | ||
### Changed | ||
- **Breaking:** bump `abstract-leveldown` ([`15d5a9e`](https://github.com/Level/leveldown/commit/15d5a9e)) (Vincent Weevers) | ||
- **Breaking:** drop node 6 and 8 ([Level/community#98](https://github.com/Level/community/issues/98)) ([`8502b34`](https://github.com/Level/leveldown/commit/8502b34)) (Vincent Weevers) | ||
- Bump `node-gyp` from 6.x to 7.x ([`8bc5696`](https://github.com/Level/leveldown/commit/8bc5696)) (Vincent Weevers) | ||
- Bump `standard` from 14.x to 16.x ([`d39e232`](https://github.com/Level/leveldown/commit/d39e232), [`39e3ca3`](https://github.com/Level/leveldown/commit/39e3ca3)) (Vincent Weevers) | ||
- Bump `node-gyp-build` from 4.1.x to 4.2.x ([#708](https://github.com/Level/leveldown/issues/708)) ([`91711fa`](https://github.com/Level/leveldown/commit/91711fa)) (Vincent Weevers) | ||
- Skip stack exhaustion test ([`55a33b1`](https://github.com/Level/leveldown/commit/55a33b1)) (Vincent Weevers) | ||
### Removed | ||
- Remove default export ([Level/community#87](https://github.com/Level/community/issues/87)) ([`686d685`](https://github.com/Level/leveldown/commit/686d685)) (Vincent Weevers) | ||
## [5.6.0] - 2020-03-27 | ||
@@ -797,3 +812,3 @@ | ||
- Upgrade to `nan@0.6` for Node@0.11.6 support, `v8::Local<T>::New(val)` rewritten to `NanNewLocal<T>(val)` ([**@rvagg**](https://github.com/rvagg)) | ||
- Upgrade to `nan@0.6` for Node 0.11.6 support, `v8::Local<T>::New(val)` rewritten to `NanNewLocal<T>(val)` ([**@rvagg**](https://github.com/rvagg)) | ||
@@ -1088,2 +1103,4 @@ **Historical Note** From this release and onward, tags in git start with the prefix `v`, i.e. this release corresponds to the tag `v0.10.1`. | ||
[6.0.0]: https://github.com/Level/leveldown/compare/v5.6.0...v6.0.0 | ||
[5.6.0]: https://github.com/Level/leveldown/compare/v5.5.1...v5.6.0 | ||
@@ -1090,0 +1107,0 @@ |
@@ -0,1 +1,3 @@ | ||
'use strict' | ||
const util = require('util') | ||
@@ -26,4 +28,2 @@ const AbstractIterator = require('abstract-leveldown').AbstractIterator | ||
Iterator.prototype._next = function (callback) { | ||
var that = this | ||
if (this.cache && this.cache.length) { | ||
@@ -34,8 +34,8 @@ process.nextTick(callback, null, this.cache.pop(), this.cache.pop()) | ||
} else { | ||
binding.iterator_next(this.context, function (err, array, finished) { | ||
binding.iterator_next(this.context, (err, array, finished) => { | ||
if (err) return callback(err) | ||
that.cache = array | ||
that.finished = finished | ||
that._next(callback) | ||
this.cache = array | ||
this.finished = finished | ||
this._next(callback) | ||
}) | ||
@@ -42,0 +42,0 @@ } |
@@ -0,1 +1,3 @@ | ||
'use strict' | ||
const util = require('util') | ||
@@ -153,2 +155,2 @@ const AbstractLevelDOWN = require('abstract-leveldown').AbstractLevelDOWN | ||
module.exports = LevelDOWN.default = LevelDOWN | ||
module.exports = LevelDOWN |
{ | ||
"name": "leveldown", | ||
"version": "5.6.0", | ||
"version": "6.0.0", | ||
"description": "A low-level Node.js LevelDB binding", | ||
@@ -27,5 +27,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"abstract-leveldown": "~6.2.1", | ||
"abstract-leveldown": "^7.0.0", | ||
"napi-macros": "~2.0.0", | ||
"node-gyp-build": "~4.1.0" | ||
"node-gyp-build": "~4.2.1" | ||
}, | ||
@@ -35,23 +35,23 @@ "devDependencies": { | ||
"coveralls": "^3.0.2", | ||
"cross-env": "^6.0.0", | ||
"cross-env": "^7.0.3", | ||
"delayed": "^2.0.0", | ||
"dependency-check": "^4.1.0", | ||
"du": "^1.0.0", | ||
"electron": "^8.0.0", | ||
"electron": "^12.0.2", | ||
"faucet": "^0.0.1", | ||
"glob": "^7.1.3", | ||
"hallmark": "^2.0.0", | ||
"hallmark": "^3.0.0", | ||
"level-community": "^3.0.0", | ||
"level-concat-iterator": "^2.0.0", | ||
"level-concat-iterator": "^3.0.0", | ||
"mkfiletree": "^2.0.0", | ||
"node-gyp": "^6.0.0", | ||
"node-gyp": "^7.1.2", | ||
"nyc": "^15.0.0", | ||
"prebuildify": "^3.0.0", | ||
"prebuildify": "^4.1.0", | ||
"prebuildify-ci": "^1.0.4", | ||
"prebuildify-cross": "github:prebuild/prebuildify-cross#v4.0.0", | ||
"prebuildify-cross": "^4.0.0", | ||
"readfiletree": "^1.0.0", | ||
"rimraf": "^3.0.0", | ||
"standard": "^14.0.0", | ||
"tape": "^4.10.0", | ||
"tempy": "^0.3.0" | ||
"standard": "^16.0.3", | ||
"tape": "^5.0.1", | ||
"tempy": "^1.0.1" | ||
}, | ||
@@ -72,4 +72,4 @@ "hallmark": { | ||
"engines": { | ||
"node": ">=8.6.0" | ||
"node": ">=10.12.0" | ||
} | ||
} |
@@ -21,8 +21,44 @@ # leveldown | ||
- [Supported Platforms](#supported-platforms) | ||
- [Notes](#notes) | ||
- [API](#api) | ||
- [`db = leveldown(location)`](#db--leveldownlocation) | ||
- [`db.open([options, ]callback)`](#dbopenoptions-callback) | ||
- [`options`](#options) | ||
- [`db.close(callback)`](#dbclosecallback) | ||
- [`db.put(key, value[, options], callback)`](#dbputkey-value-options-callback) | ||
- [`options`](#options-1) | ||
- [`db.get(key[, options], callback)`](#dbgetkey-options-callback) | ||
- [`options`](#options-2) | ||
- [`db.del(key[, options], callback)`](#dbdelkey-options-callback) | ||
- [`options`](#options-3) | ||
- [`db.batch(operations[, options], callback)` _(array form)_](#dbbatchoperations-options-callback-array-form) | ||
- [`db.batch()` _(chained form)_](#dbbatch-chained-form) | ||
- [`db.approximateSize(start, end, callback)`](#dbapproximatesizestart-end-callback) | ||
- [`db.compactRange(start, end, callback)`](#dbcompactrangestart-end-callback) | ||
- [`db.getProperty(property)`](#dbgetpropertyproperty) | ||
- [`db.iterator([options])`](#dbiteratoroptions) | ||
- [`db.clear([options, ]callback)`](#dbclearoptions-callback) | ||
- [`chainedBatch`](#chainedbatch) | ||
- [`chainedBatch.put(key, value)`](#chainedbatchputkey-value) | ||
- [`chainedBatch.del(key)`](#chainedbatchdelkey) | ||
- [`chainedBatch.clear()`](#chainedbatchclear) | ||
- [`chainedBatch.write([options, ]callback)`](#chainedbatchwriteoptions-callback) | ||
- [`chainedBatch.db`](#chainedbatchdb) | ||
- [`iterator`](#iterator) | ||
- [`iterator.next(callback)`](#iteratornextcallback) | ||
- [`iterator.seek(key)`](#iteratorseekkey) | ||
- [`iterator.end(callback)`](#iteratorendcallback) | ||
- [`iterator.db`](#iteratordb) | ||
- [`leveldown.destroy(location, callback)`](#leveldowndestroylocation-callback) | ||
- [`leveldown.repair(location, callback)`](#leveldownrepairlocation-callback) | ||
- [Safety](#safety) | ||
- [Database State](#database-state) | ||
- [Snapshots](#snapshots) | ||
- [Getting Support](#getting-support) | ||
- [Contributing](#contributing) | ||
- [Git Submodules](#git-submodules) | ||
- [Publishing](#publishing) | ||
- [Donate](#donate) | ||
- [Backers](#backers) | ||
- [Sponsors](#sponsors) | ||
- [License](#license) | ||
@@ -42,3 +78,3 @@ | ||
We aim to support _at least_ Active LTS and Current Node.js releases, Electron 4.0.0, as well as any future Node.js and Electron releases thanks to [N-API](https://nodejs.org/api/n-api.html). The minimum node version for `leveldown` is `8.6.0`. Conversely, for node >= 12, the minimum `leveldown` version is `5.0.0`. | ||
We aim to support _at least_ Active LTS and Current Node.js releases, Electron 5.0.0, as well as any future Node.js and Electron releases thanks to [N-API](https://nodejs.org/api/n-api.html). The minimum node version for `leveldown` is `10.12.0`. Conversely, for node >= 12, the minimum `leveldown` version is `5.0.0`. | ||
@@ -280,4 +316,2 @@ The `leveldown` npm package ships with prebuilt binaries for popular 64-bit platforms as well as ARM, Android and Alpine (musl) and is known to work on: | ||
- `start, end` legacy ranges - instead use `gte, lte` | ||
- `reverse` _(boolean, default: `false`)_: a boolean, set to `true` if you want the stream to go in reverse order. Beware that due to the way LevelDB works, a reverse seek will be slower than a forward seek. | ||
@@ -462,3 +496,3 @@ | ||
5. Optionally verify loading a prebuild: `npm run test-prebuild` | ||
6. Optionally verify which files npm will include: `irish-pub` | ||
6. Optionally verify which files npm will include: `canadian-pub` | ||
7. Add changelog to the GitHub release | ||
@@ -465,0 +499,0 @@ 8. Finally: `npm publish` |
@@ -5,4 +5,20 @@ # Upgrade Guide | ||
## v5 | ||
## 6.0.0 | ||
Legacy range options have been removed ([Level/community#86](https://github.com/Level/community/issues/86)). If you previously did: | ||
```js | ||
db.iterator({ start: 'a', end: 'z' }) | ||
``` | ||
An error would now be thrown and you must instead do: | ||
```js | ||
db.iterator({ gte: 'a', lte: 'z' }) | ||
``` | ||
This release also drops support of Node.js 6 and 8 ([Level/community#98](https://github.com/Level/community/issues/98)). | ||
## 5.0.0 | ||
This is a rewrite to N-API - which is a huge milestone, achieved without an impact on write performance - and an upgrade to `abstract-leveldown` v6, which solves long-standing issues around serialization and type support. | ||
@@ -62,11 +78,11 @@ | ||
## v4 | ||
## 4.0.0 | ||
Dropped support for node 4. No other breaking changes. | ||
## v3.0.1 | ||
## 3.0.1 | ||
If you're using node v10 you'll need at least `leveldown@2.0.1` to successfully compile. In addition, if you want prebuilt binaries you'll need at least `leveldown@3.0.1`. | ||
## v3 | ||
## 3.0.0 | ||
@@ -73,0 +89,0 @@ #### `.batch(array)` enforces objects |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
5139729
185
516
+ Addedabstract-leveldown@7.2.0(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addedcatering@2.1.1(transitive)
+ Addedis-buffer@2.0.5(transitive)
+ Addedlevel-concat-iterator@3.1.0(transitive)
+ Addedlevel-supports@2.1.0(transitive)
+ Addednode-gyp-build@4.2.3(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
- Removedabstract-leveldown@6.2.3(transitive)
- Removedbuffer@5.7.1(transitive)
- Removedimmediate@3.3.0(transitive)
- Removedlevel-concat-iterator@2.0.1(transitive)
- Removedlevel-supports@1.0.1(transitive)
- Removednode-gyp-build@4.1.1(transitive)
- Removedxtend@4.0.2(transitive)
Updatedabstract-leveldown@^7.0.0
Updatednode-gyp-build@~4.2.1