Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.

Commit 39e2afe

Browse files
author
Lars-Magnus Skog
authored
Add UPGRADING.md (#51)
* Add UPGRADING.md * level -> level-browserify
1 parent 4f5e3d9 commit 39e2afe

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Use this package to avoid having to explicitly install `leveldown`/`level-js` wh
1919

2020
In node.js you get `leveldown`, while in the browser you get `level-js` (through use of browserify's `browser` field setting in `package.json`).
2121

22+
**If you are upgrading:** please see [`UPGRADING.md`](UPGRADING.md).
23+
2224
## Table of Contents
2325

2426
* [Usage](#usage)

UPGRADING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Upgrade Guide
2+
3+
This document describes breaking changes and how to upgrade. For a complete list of changes including minor and patch releases, please refer to the [changelog](CHANGELOG.md).
4+
5+
## v2
6+
7+
Dropped support for node 4.
8+
9+
The parts that make up `level-browserify` have been refactored to increase modularity. This is an upgrade to `leveldown@^4.0.0`, `level-js@^3.0.0` and `level-packager@~3.1.0`, which in turn upgraded to `levelup@^3.0.0`. The responsibility of encoding keys and values moved from [`levelup`](https://github.com/Level/levelup) to [`encoding-down`](https://github.com/Level/encoding-down), which comes bundled with [`level-packager`](https://github.com/Level/packager).
10+
11+
Also, upgrading `leveldown` and `level-js` means upgrading to `abstract-leveldown@~5.0.0` which in turn contains breaking changes to [`.batch()`](https://github.com/Level/abstract-leveldown/commit/a2621ad70571f6ade9d2be42632ece042e068805). Though this is negated by `levelup`, we decided to release a new major version in the event of dependents reaching down into `db.db`.
12+
13+
Being a convenience package, `level-browserify` glues the parts back together to form a drop-in replacement for the users of `levelup@1`, while staying fully compatible with `level-browserify@1`. One thing we do get for free, is native Promise support.
14+
15+
```js
16+
const db = level('db')
17+
await db.put('foo', 'bar')
18+
console.log(await db.get('foo'))
19+
```
20+
21+
This does not affect the existing callback API, functionality-wise or performance-wise.
22+
23+
For more information please check the corresponding `CHANGELOG.md` for:
24+
25+
* [`levelup`](https://github.com/Level/levelup/blob/master/CHANGELOG.md)
26+
* [`leveldown`](https://github.com/Level/leveldown/blob/master/CHANGELOG.md)
27+
* [`level-js`](https://github.com/Level/level-js/blob/master/CHANGELOG.md)
28+
* [`level-packager`](https://github.com/Level/packager/blob/master/CHANGELOG.md)

0 commit comments

Comments
 (0)