Socket
Socket
Sign inDemoInstall

level-supports

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.1 to 5.0.0

9

CHANGELOG.md
# Changelog
## [5.0.0] - 2022-11-09
### Changed
- **Breaking:** remove properties that were already true since `abstract-level@1` ([`43ba6b7`](https://github.com/Level/supports/commit/43ba6b7)) (Vincent Weevers)
- Use promise API of `db.open()` and `close()` in tests ([`f2ad373`](https://github.com/Level/supports/commit/f2ad373)) (Vincent Weevers)
## [4.0.1] - 2022-03-06

@@ -79,2 +86,4 @@

[5.0.0]: https://github.com/Level/supports/releases/tag/v5.0.0
[4.0.1]: https://github.com/Level/supports/releases/tag/v4.0.1

@@ -81,0 +90,0 @@

55

index.d.ts

@@ -36,43 +36,2 @@ /**

/**
* Does the database support `db.clear()`? Always true since `abstract-level@1`.
*/
clear: boolean
/**
* Does the database support `db.getMany()`? Always true since `abstract-level@1`.
*/
getMany: boolean
/**
* Does the database have a `keys([options])` method that returns a key iterator?
* Always true since `abstract-level@1`.
*/
keyIterator: boolean
/**
* Does the database have a `values([options])` method that returns a key iterator?
* Always true since `abstract-level@1`.
*/
valueIterator: boolean
/**
* Do iterators have a `nextv(size[, options][, callback])` method? Always true since
* `abstract-level@1`.
*/
iteratorNextv: boolean
/**
* Do iterators have a `all([options][, callback])` method? Always true since
* `abstract-level@1`.
*/
iteratorAll: boolean
/**
* Does the database have a
* [`status`](https://github.com/Level/abstract-level/#dbstatus) property? Always true
* since `abstract-level@1`.
*/
status: boolean
/**
* Does `db.open()` and the database constructor support this option?

@@ -100,16 +59,2 @@ */

/**
* Do all database methods (that don't otherwise have a return value) support promises,
* in addition to callbacks? Such that, when a callback argument is omitted, a promise
* is returned:
*
* ```js
* db.put('key', 'value', callback)
* await db.put('key', 'value')
* ```
*
* Always true since `abstract-level@1`.
*/
promises: boolean
/**
* Does database have the methods `createReadStream`, `createKeyStream` and

@@ -116,0 +61,0 @@ * `createValueStream`, following the API documented in `levelup`? For `abstract-level`

@@ -10,13 +10,5 @@ 'use strict'

seek: manifest.seek || false,
clear: manifest.clear || false,
getMany: manifest.getMany || false,
keyIterator: manifest.keyIterator || false,
valueIterator: manifest.valueIterator || false,
iteratorNextv: manifest.iteratorNextv || false,
iteratorAll: manifest.iteratorAll || false,
status: manifest.status || false,
createIfMissing: manifest.createIfMissing || false,
errorIfExists: manifest.errorIfExists || false,
deferredOpen: manifest.deferredOpen || false,
promises: manifest.promises || false,
streams: manifest.streams || false,

@@ -23,0 +15,0 @@ encodings: Object.assign({}, manifest.encodings),

16

package.json
{
"name": "level-supports",
"version": "4.0.1",
"version": "5.0.0",
"description": "Create a manifest describing the abilities of an abstract-level database",
"license": "MIT",
"scripts": {
"test": "standard && ts-standard *.ts && hallmark && (nyc -s node test/self.js | faucet) && nyc report",
"test": "standard && hallmark && (nyc -s node test/self.js | tap-arc) && nyc report",
"test-pessimistic": "node test/self.js | tap-arc -pv",
"test-browsers-local": "airtap --coverage test/self.js && nyc report",

@@ -20,13 +21,10 @@ "coverage": "nyc report -r lcovonly",

"devDependencies": {
"@types/node": "^17.0.6",
"@voxpelli/tsconfig": "^3.1.0",
"@voxpelli/tsconfig": "^4.0.0",
"airtap": "^4.0.4",
"airtap-playwright": "^1.0.1",
"faucet": "^0.0.1",
"hallmark": "^4.0.0",
"nyc": "^15.1.0",
"standard": "^16.0.3",
"tape": "^5.4.0",
"ts-standard": "^11.0.0",
"typescript": "^4.5.4"
"standard": "^17.0.0",
"tap-arc": "^0.3.5",
"tape": "^5.4.0"
},

@@ -33,0 +31,0 @@ "repository": {

@@ -137,36 +137,2 @@ # level-supports

#### `clear` (boolean)
Does the database support `db.clear()`? Always true since `abstract-level@1`.
<details>
<summary>Support matrix</summary>
See also [Level/community#79](https://github.com/Level/community/issues/79).
| Module | Support | Optimized |
| :------------------------------ | :------ | :-------- |
| `abstract-level` and dependents | ✅ 1.0.0 | ✅ 1.0.0 |
| `abstract-leveldown` | ✅ 6.1.0 | n/a |
| `leveldown` | ✅ 5.2.0 | ✅ 6.0.3 |
| `rocksdb` | ✅ 4.1.0 | ✅ 5.2.0 |
| `memdown` | ✅ 5.0.0 | ✅ 6.1.1 |
| `level-js` | ✅ 5.0.0 | ✅ 5.0.0 |
| `encoding-down` | ✅ 6.2.0 | n/a |
| `deferred-leveldown` | ✅ 5.2.0 | n/a |
| `levelup` | ✅ 4.2.0 | n/a |
| `level-packager` | ✅ 5.0.3 | n/a |
| `level` | ✅ 6.0.0 | ✅ 7.0.1 |
| `level-mem` | ✅ 5.0.1 | ✅ 6.0.1 |
| `level-rocksdb` | ✅ 5.0.0 | ✅ 5.0.0 |
| `subleveldown` | ✅ 4.2.1 | ✅ 4.2.1 |
| `multileveldown` | ✅ 5.0.0 | ✅ 5.0.0 |
| `level-party` | ✅ 5.1.0 | ✅ 5.1.0 |
</details>
### `status` (boolean)
Does the database have a [`status`](https://github.com/Level/abstract-level/#dbstatus) property? Always true since `abstract-level@1`.
### `deferredOpen` (boolean)

@@ -203,31 +169,2 @@

### `promises` (boolean)
Do all database methods (that don't otherwise have a return value) support promises, in addition to callbacks? Such that, when a callback argument is omitted, a promise is returned:
```js
db.put('key', 'value', callback)
await db.put('key', 'value')
```
Always true since `abstract-level@1`.
<details>
<summary>Support matrix</summary>
| Module | Support |
| :---------------------------------- | :------------------- |
| `abstract-level` and dependents | ✅ |
| `abstract-leveldown` and dependents | ❌ (except iterators) |
| `levelup` | ✅ |
| `level-packager` | ✅ |
| `level` | ✅ |
| `level-mem` | ✅ |
| `level-rocksdb` | ✅ |
| `subleveldown` | ✅ |
| `multileveldown` | ✅ |
| `level-party` | ✅ |
</details>
### `events` (object)

@@ -319,45 +256,2 @@

### `getMany` (boolean)
Does the database support `db.getMany()`? Always true since `abstract-level@1`.
<details>
<summary>Support matrix</summary>
| Module | Support |
| :------------------------------ | :------ |
| `abstract-level` and dependents | ✅ 1.0.0 |
| `abstract-leveldown` | ✅ 7.2.0 |
| `leveldown` | ✅ 6.1.0 |
| `rocksdb` | ✅ 5.2.0 |
| `memdown` | ✅ |
| `level-js` | ✅ 6.1.0 |
| `encoding-down` | ✅ 7.1.0 |
| `deferred-leveldown` | ✅ 7.0.0 |
| `levelup` | ✅ 5.1.0 |
| `level` | ✅ 7.0.1 |
| `level-mem` | ✅ 6.0.1 |
| `level-rocksdb` | ✅ 5.0.0 |
| `subleveldown` | ✅ 6.0.0 |
| `multileveldown` | ✅ 5.0.0 |
| `level-party` | ✅ 5.1.0 |
</details>
### `keyIterator` (boolean)
Does the database have a `keys([options])` method that returns a key iterator? Always true since `abstract-level@1`.
### `valueIterator` (boolean)
Does the database have a `values([options])` method that returns a key iterator? Always true since `abstract-level@1`.
### `iteratorNextv` (boolean)
Do iterators have a `nextv(size[, options][, callback])` method? Always true since `abstract-level@1`.
### `iteratorAll` (boolean)
Do iterators have a `all([options][, callback])` method? Always true since `abstract-level@1`.
### `additionalMethods` (object)

@@ -364,0 +258,0 @@

@@ -7,3 +7,3 @@ 'use strict'

module.exports = function suite (test, testCommon) {
test('db has manifest', function (t) {
test('db has manifest', async function (t) {
const db = testCommon.factory()

@@ -19,13 +19,8 @@ const manifest = db.supports

db.open(function (err) {
t.ifError(err, 'no open error')
t.same(db.supports, before, 'manifest did not change after open')
await db.open()
t.same(db.supports, before, 'manifest did not change after open')
db.close(function (err) {
t.ifError(err, 'no close error')
t.same(db.supports, before, 'manifest did not change after close')
t.end()
})
})
await db.close()
t.same(db.supports, before, 'manifest did not change after close')
})
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc