Skip to content
Permalink
Browse files

Prepare v5.0.0 (#604)

  • Loading branch information...
vweevers committed Mar 29, 2019
1 parent 1fbfe37 commit 104dea26500fbc48bd8ec22a11fbc3354391422a
Showing with 54 additions and 10 deletions.
  1. +31 −3 CHANGELOG.md
  2. +1 −1 CONTRIBUTORS.md
  3. +4 −2 README.md
  4. +18 −4 UPGRADING.md
@@ -1,7 +1,11 @@
# Changelog

_**If you are upgrading:** please see [`UPGRADING.md`](UPGRADING.md)._

## [Unreleased][unreleased]

## [5.0.0] - 2019-03-29

### Changed

- Rewrite as N-API addon ([#540](https://github.com/level/leveldown/issues/540), [#559](https://github.com/level/leveldown/issues/559)) ([**@ralphtheninja**](https://github.com/ralphtheninja))
@@ -27,11 +31,14 @@
- Document new platform support and prebuilt binaries ([#558](https://github.com/level/leveldown/issues/558), [#563](https://github.com/level/leveldown/issues/563)) ([**@vweevers**](https://github.com/vweevers))
- Replace `remark-cli` with `hallmark` ([#548](https://github.com/level/leveldown/issues/548)) ([**@vweevers**](https://github.com/vweevers))
- Update `.npmignore` ([**@vweevers**](https://github.com/vweevers))
- Apply common project tweaks ([#580](https://github.com/Level/leveldown/issues/580), [#582](https://github.com/Level/leveldown/issues/582), [`1c90e8f`](https://github.com/Level/leveldown/commit/1c90e8f)) ([**@vweevers**](https://github.com/vweevers), [**@ralphtheninja**](https://github.com/ralphtheninja))
- Introduce `override` and `final` keywords following C++ Core Guidelines ([#600](https://github.com/Level/leveldown/issues/600)) ([**@vweevers**](https://github.com/vweevers))

### Added

- Add `linux-armv7`, `linux-arm64`, `android-armv7` and `android-arm64` prebuilds ([#584](https://github.com/Level/leveldown/issues/584), [#585](https://github.com/Level/leveldown/issues/585), [#587](https://github.com/Level/leveldown/issues/587)) ([**@ralphtheninja**](https://github.com/ralphtheninja), [**@vweevers**](https://github.com/vweevers))
- Add segfault tests ([#514](https://github.com/level/leveldown/issues/514)) ([**@vweevers**](https://github.com/vweevers))
- Add `nyc` and `coveralls` for code coverage ([#497](https://github.com/level/leveldown/issues/497)) ([**@ralphtheninja**](https://github.com/ralphtheninja))
- Add `nyc` and `coveralls` for code coverage ([#497](https://github.com/level/leveldown/issues/497), [#591](https://github.com/Level/leveldown/issues/591)) ([**@ralphtheninja**](https://github.com/ralphtheninja), [**@vweevers**](https://github.com/vweevers))
- Copy type checks of `approximateSize()` to `compactRange()` ([#517](https://github.com/level/leveldown/issues/517)) ([**@vweevers**](https://github.com/vweevers))
- Document that value may not be `null` or `undefined` ([#511](https://github.com/level/leveldown/issues/511)) ([**@vweevers**](https://github.com/vweevers))
- Document `batch()` (array and chained form), `sync` option and `db` references ([#556](https://github.com/level/leveldown/issues/556)) ([**@vweevers**](https://github.com/vweevers))
@@ -50,11 +57,28 @@
- Moved seek tests to `abstract-leveldown` ([#508](https://github.com/level/leveldown/issues/508)) ([**@vweevers**](https://github.com/vweevers))
- Remove unused `iota-array` and `lexicographic-integer` devDependencies ([#508](https://github.com/level/leveldown/issues/508)) ([**@vweevers**](https://github.com/vweevers))
- Remove `xcacheSize` and `xmaxOpenFiles` from leak tests ([#569](https://github.com/level/leveldown/issues/569)) ([**@ralphtheninja**](https://github.com/ralphtheninja))
- Remove legacy `bindings` dependency ([#583](https://github.com/Level/leveldown/issues/583)) ([**@peakji**](https://github.com/peakji))

### Fixed

- Serialize `compactRange()` arguments ([#517](https://github.com/level/leveldown/issues/517)) ([**@vweevers**](https://github.com/vweevers))
- Prevent segfault when calling `iterator()` on non-open db ([#514](https://github.com/level/leveldown/issues/514)) ([**@vweevers**](https://github.com/vweevers))
- Prevent segfault: when calling `iterator()` on non-open db ([#514](https://github.com/level/leveldown/issues/514)) ([**@vweevers**](https://github.com/vweevers))
- Prevent segfault: add `PriorityWorker` to defer closing until `put` is done ([#597](https://github.com/Level/leveldown/issues/597)) ([**@vweevers**](https://github.com/vweevers))
- Prevent segfault: keep persistent references to iterators until they are ended ([#597](https://github.com/Level/leveldown/issues/597)) ([**@vweevers**](https://github.com/vweevers))
- Gitignore Debug builds of LevelDB and Snappy ([#597](https://github.com/Level/leveldown/issues/597)) ([**@vweevers**](https://github.com/vweevers))
- Fix subtests by adding `t.plan()` ([#594](https://github.com/Level/leveldown/issues/594)) ([**@vweevers**](https://github.com/vweevers))

## [4.0.2] - 2019-03-02

### Changed

- Upgrade `nan` from `~2.10.0` to `~2.12.1` ([#596](https://github.com/Level/leveldown/pull/596)) ([**@vweevers**](https://github.com/vweevers))
- Upgrade `prebuild-install` from `^4.0.0` to `~5.2.4` ([#596](https://github.com/Level/leveldown/pull/596)) ([**@vweevers**](https://github.com/vweevers))
- Upgrade `prebuild` devDependency from `^7.0.0` to `^8.1.2` ([#596](https://github.com/Level/leveldown/pull/596)) ([**@vweevers**](https://github.com/vweevers))

### Added

- Add Node.js 11 to Travis and AppVeyor ([#596](https://github.com/Level/leveldown/pull/596)) ([**@vweevers**](https://github.com/vweevers))

## [4.0.1] - 2018-05-22

@@ -882,7 +906,11 @@

:seedling: First release. Extracted from `levelup` as a stand-alone package ([**@rvagg**](https://github.com/rvagg))

[unreleased]: https://github.com/level/leveldown/compare/v4.0.1...HEAD
[unreleased]: https://github.com/level/leveldown/compare/v5.0.0...HEAD

[5.0.0]: https://github.com/level/leveldown/compare/v4.0.2...v5.0.0

[4.0.2]: https://github.com/level/leveldown/compare/v4.0.1...v4.0.2

[4.0.1]: https://github.com/level/leveldown/compare/v4.0.0...v4.0.1

@@ -4,8 +4,8 @@
| :------------------------- | :----------------------------------------------------- | :----------------------------------------------------------------------- |
| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) |
| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) |
| **David Björklund** | [**@kesla**](https://github.com/kesla) | [**@david_bjorklund@twitter**](https://twitter.com/david_bjorklund) |
| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) |
| **David Björklund** | [**@kesla**](https://github.com/kesla) | [**@david_bjorklund@twitter**](https://twitter.com/david_bjorklund) |
| **Julian Gruber** | [**@juliangruber**](https://github.com/juliangruber) | [**@juliangruber@twitter**](https://twitter.com/juliangruber) |
| **Yichao 'Peak' Ji** | [**@peakji**](https://github.com/peakji) | |
| **Mathias Buus** | [**@mafintosh**](https://github.com/mafintosh) | [**@mafintosh@twitter**](https://twitter.com/mafintosh) |
@@ -39,20 +39,22 @@ See the section on <a href="#safety">safety</a> below for details of known unsaf

We aim to support _at least_ Active LTS and Current Node.js releases, Electron 3.0.0, as well as any future Node.js and Electron releases thanks to [N-API](https://nodejs.org/api/n-api.html). Because N-API has an experimental status in node 6 and early 8.x releases, the minimum node version for `leveldown` is `8.6.0`.

The `leveldown` npm package ships with prebuilt binaries for popular 64-bit platforms and is known to work on:
The `leveldown` npm package ships with prebuilt binaries for popular 64-bit platforms as well as ARM and Android and is known to work on:

- **Linux** (including ARM platforms such as Raspberry Pi _and Kindle!_)
- **Mac OS**
- **Solaris** (SmartOS & Nodejitsu)
- **FreeBSD**
- **Windows**

When installing `leveldown`, [`node-gyp-build`](https://github.com/mafintosh/node-gyp-build) will check if a compatible binary exists and fallback to a compile step if it doesn't. In that case you'll need a [valid `node-gyp` installation](https://github.com/nodejs/node-gyp#installation).
When installing `leveldown`, [`node-gyp-build`](https://github.com/prebuild/node-gyp-build) will check if a compatible binary exists and fallback to a compile step if it doesn't. In that case you'll need a [valid `node-gyp` installation](https://github.com/nodejs/node-gyp#installation).

If you don't want to use the prebuilt binary for the platform you are installing on, specify the `--build-from-source` flag when you install. If you are working on `leveldown` itself and want to re-compile the C++ code it's enough to do `npm install`.

## API

**If you are upgrading:** please see [`UPGRADING.md`](UPGRADING.md).

- <a href="#ctor"><code><b>leveldown()</b></code></a>
- <a href="#leveldown_open"><code>db.<b>open()</b></code></a>
- <a href="#leveldown_close"><code>db.<b>close()</b></code></a>
@@ -4,19 +4,17 @@ This document describes breaking changes and how to upgrade. For a complete list

## v5

_Currently available as prerelease: `npm i leveldown@next`._

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.

### N-API rewrite

N-API is the latest interface for native addons in Node.js. Main benefit is that `leveldown` became independent of the V8 version, which means it will be compatible with future versions of Node.js. As long as the native code doesn't change, it doesn't need to be recompiled as new versions of Node.js are released. This helps greatly with both maintenance and when delivering code to consumers.

Because N-API has an experimental status in node 6 and early 8.x releases, support of node 6 has been dropped and the minimum node version for `leveldown` is now 8.6.0.
Because N-API has an experimental status in node 6 and early 8.x releases, support of node 6 has been dropped and the minimum node version for `leveldown` is now 8.6.0. Conversely, for node >= 12, `leveldown@5` is the minimum version.

### Prebuilt binaries are now shipped in npm package

Previously, they were downloaded from GitHub by an npm `postinstall` script.
Previously, they were downloaded from GitHub by an npm `postinstall` script. In addition, `leveldown` now includes prebuilt binaries for Linux ARMv7, Linux ARM64, Android ARMv7 and Android ARM64. The latter target node core (rather than the formerly needed [`nodejs-mobile`](https://github.com/janeasystems/nodejs-mobile) fork).

### Range options are now serialized

@@ -44,6 +42,22 @@ Though this was already the case, `abstract-leveldown` has replaced the behavior

The `sync` option has moved to `chainedBatch.write(options)`. Previously, `sync` was half-documented and half-implemented.

### Various segmentation faults have been fixed

It is now safe to call `db.close()` before `db.put()` completes, to call `db.iterator()` on a non-open db and to call `db.close()` having created many iterators regardless of their state (idle, nexting, ending or ended). To achieve this, `leveldown` waits for pending operations before closing:

```js
db.put('key', 'value', function (err) {
console.log('this happens first')
})
db.close(function (err) {
console.log('this happens second')
})
```

A future release will do the same for other operations like `get` and `batch`.

## v4

Dropped support for node 4. No other breaking changes.

0 comments on commit 104dea2

Please sign in to comment.
You can’t perform that action at this time.