Skip to content

Breaking: upgrade to abstract-level 3 #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions .airtap.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
providers:
- airtap-sauce
- airtap-playwright

browsers:
- name: chrome
- name: chromium
- name: firefox
- name: safari
version: 12..latest
- name: ios_saf
version: 12..latest
- name: chrome for android
version: 6..latest
- name: msedge
- name: webkit

presets:
local:
providers:
- airtap-playwright
browsers:
- name: chromium
- name: firefox
- name: webkit
# Until airtap switches to rollup
browserify:
- transform: babelify
global: true
presets: ["@babel/preset-env"]
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ updates:
ignore:
- dependency-name: standard
- dependency-name: ts-standard
- dependency-name: voxpelli/tsconfig
- dependency-name: typescript
- dependency-name: hallmark
- dependency-name: "@babel/preset-env"
- dependency-name: babelify
- package-ecosystem: github-actions
directory: /
schedule:
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/sauce.yml

This file was deleted.

21 changes: 20 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]
permissions:
contents: read
jobs:
test:
node:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -26,3 +26,22 @@ jobs:
uses: codecov/codecov-action@v3
with:
file: coverage/lcov.info
browsers:
name: Browsers
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install
run: npm install --ignore-scripts
- name: Install Playwright dependencies
run: npx --no-install playwright install-deps
- name: Install Playwright
run: npx --no-install playwright install
- name: Test
run: npm run test-browsers
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**In-memory [`abstract-level`][abstract-level] database for Node.js and browsers, backed by a [fully persistent red-black tree](https://www.npmjs.com/package/functional-red-black-tree).** The successor to [`memdown`](https://github.com/Level/memdown) and [`level-mem`](https://github.com/Level/mem).

> :pushpin: Which module should I use? What is `abstract-level`? Head over to the [FAQ](https://github.com/Level/community#faq).
> :pushpin: Wondering what happened to `levelup`? Visit [Frequently Asked Questions](https://github.com/Level/community#faq).

[![level badge][level-badge]](https://github.com/Level/awesome)
[![npm](https://img.shields.io/npm/v/memory-level.svg)](https://www.npmjs.com/package/memory-level)
Expand Down Expand Up @@ -38,10 +38,6 @@ for await (const [key, value] of db.iterator({ gt: 'a' })) {
}
```

<!-- ## Browser support

[![Sauce Test Status](https://app.saucelabs.com/browser-matrix/level-ci.svg)](https://app.saucelabs.com/u/level-ci) -->

## API

The API of `memory-level` follows that of [`abstract-level`](https://github.com/Level/abstract-level) with a one additional constructor option (see below). The `createIfMissing` and `errorIfExists` options of `abstract-level` are not relevant here. Data is discarded when the last reference to the database is released (i.e. `db = null`). Closing or reopening the database has no effect on the data. Data is _not_ copied: when storing a Buffer value for example, subsequent mutations to that Buffer will affect the stored data too.
Expand All @@ -68,12 +64,6 @@ npm install memory-level

See the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details.

<!-- ## Big Thanks

Cross-browser Testing Platform and Open Source ♥ Provided by [Sauce Labs](https://saucelabs.com).

[![Sauce Labs logo](./sauce-labs.svg)](https://saucelabs.com) -->

## License

[MIT](LICENSE)
Expand Down
4 changes: 4 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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).

## 3.0.0

This release upgrades to `abstract-level` 3. Please see its [upgrade guide](https://github.com/Level/abstract-level/blob/v3.0.0/UPGRADING.md) (note that `memory-level` already dropped Node.js 16).

## 2.0.0

This release upgrades to `abstract-level` 2.0.0 which adds [hooks](https://github.com/Level/abstract-level#hooks) and drops callbacks, not-found errors and support of Node.js < 16. Please refer to the [upgrade guide of `abstract-level`](https://github.com/Level/abstract-level/blob/v2.0.0/UPGRADING.md). The only thing to add is that `memory-level` also drops Node.js 16.
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"scripts": {
"test": "standard && hallmark && (nyc -s node test.js | tap-arc) && nyc report",
"test-pessimistic": "node test.js | tap-arc -pv",
"test-browsers": "airtap --coverage --verbose test.js",
"test-browsers-local": "airtap --coverage -p local test.js",
"test-browsers": "airtap --coverage test.js",
"coverage": "nyc report -r lcovonly"
},
"files": [
Expand All @@ -20,15 +19,16 @@
"CHANGELOG.md"
],
"dependencies": {
"abstract-level": "^2.0.1",
"abstract-level": "^3.0.0",
"functional-red-black-tree": "^1.0.1",
"module-error": "^1.0.1"
},
"devDependencies": {
"@babel/preset-env": "^7.26.0",
"@voxpelli/tsconfig": "^15.0.0",
"airtap": "^4.0.3",
"airtap": "^5.0.0",
"airtap-playwright": "^1.0.1",
"airtap-sauce": "^1.1.0",
"babelify": "^10.0.0",
"buffer": "^6.0.3",
"hallmark": "^5.0.1",
"nyc": "^17.1.0",
Expand Down
81 changes: 0 additions & 81 deletions sauce-labs.svg

This file was deleted.

Loading