Skip to content

Commit

Permalink
Add to FAQ: how do I upgrade to abstract-level?
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Dec 11, 2021
1 parent c3ea26b commit 2026545
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,48 @@ Enter [`abstract-level`](https://github.com/Level/abstract-level). This module m

### How do I upgrade to `abstract-level`?

_This section will explain how to replace old modules (that are based on `levelup` and `abstract-leveldown`) with new `abstract-level` based modules. At the time of writing, no `abstract-level` implementation has been published yet._
_This section is a work in progress that will explain how to replace old modules (that are based on `levelup` and `abstract-leveldown`) with new `abstract-level` based modules. At the time of writing, no `abstract-level` implementation has been published yet._

We've put together several upgrade guides for different modules. For example, if you're currently using `level@7` and no other modules (ignoring transitive dependencies of `level`) then it will suffice to read the upgrade guide of `level@8` (_not yet available_).

Naming-wise, databases generally use an npm package name in the form of `*-level` while utilities and plugins are called `level-*`. This replaces the [down versus up](https://github.com/Level/abstract-level/issues/6) naming scheme. Similarly, while it was previously helpful to distinguish between "database" and its "underlying store", now you will mostly just encounter the term "database" in documentation.

**If you are upgrading:**

<!-- - From `level@7` to `level@8`: see `level@8` (_not yet available_) -->

<!-- - From `leveldown` to `leveldb-level`: see `leveldb-level@1` (_not yet available_) -->

<!-- - From `memdown` to `memory-level`: see `memory-level@1` (_not yet available_) -->

<!-- - From `level-mem` to `memory-level`: see `memory-level@1` (_not yet available_) -->

<!-- - From `level-js` to `indexeddb-level`: see `indexeddb-level@1` (_not yet available_) -->

<!-- - From `rocksdb` to `rocks-level`: see `rocks-level` (_not yet available_) -->

<!-- - From `level-rocksdb` to `rocks-level`: see `rocks-level` (_not yet available_) -->

<!-- - From `subleveldown` to `prefix-level`: see `prefix-level@1` (_not yet available_) -->

<!-- - From `multileveldown` to TBD: see TBD (_not yet available_) -->

<!-- - From `level-party` to `rave-level`: see `rave-level@1` (_not yet available_) -->

- From [`abstract-leveldown`](https://github.com/Level/abstract-leveldown) to `abstract-level`: see [`abstract-level@1`](https://github.com/Level/abstract-level/blob/main/UPGRADING.md#100)
- From [`levelup`](https://github.com/Level/levelup): if the module that you're wrapping with `levelup` is listed here, then that, else see [`abstract-level@1`](https://github.com/Level/abstract-level/blob/main/UPGRADING.md#100)
- From an [`abstract-leveldown`](https://github.com/Level/abstract-leveldown) implementation that upgraded to `abstract-level` but has no upgrade guide itself: see [`abstract-level@1`](https://github.com/Level/abstract-level/blob/main/UPGRADING.md#100). That guide may talk about internals that don't directly apply to you.

<!-- If you use a combination of the above, you must upgrade all to their `abstract-level` equivalent. E.g. the old `level@7` cannot be combined with `prefix-level@1` and the old `encoding-down` can't be combined with anything. -->

The following modules are or will be deprecated: `leveldown`, `memdown`, `level-mem`, `rocksdb`, `rocksdb-level`, `subleveldown`, `level-party`, `multileveldown`. The same goes for `levelup`, `deferred-leveldown`, `encoding-down` and [`level-packager`](https://github.com/Level/packager), which in addition have no replacements as their functionality was merged into `abstract-level`.

Lastly, there are new and replaced utilities. Most folks don't need direct access to these modules except for the first:

- For Node.js streams, use [`level-read-stream@1`](https://github.com/Level/read-stream/blob/main/UPGRADING.md#100)
- Replace (direct) use of [`level-codec`](https://github.com/Level/codec) with [`level-transcoder@1`](https://github.com/Level/transcoder/blob/main/UPGRADING.md#100)
- For creating [errors](https://github.com/Level/abstract-level/#errors), use [`module-error`](https://github.com/vweevers/module-error) or similar instead of [`level-errors`](https://github.com/Level/errors)
- For normalizing manifests, use [`level-supports`](https://github.com/Level/supports) >= 3.

### Where can I get support?

Expand Down

0 comments on commit 2026545

Please sign in to comment.