Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.
/ encoding-down Public archive

Commit 9ec82f7

Browse files
committed
Update metadata and add release workflow
1 parent 4038a30 commit 9ec82f7

File tree

6 files changed

+92
-89
lines changed

6 files changed

+92
-89
lines changed

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Release
2+
on:
3+
push:
4+
tags: ['*']
5+
permissions:
6+
contents: write
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
- name: Create GitHub release
15+
uses: docker://antonyurchenko/git-release:v4
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## [7.0.0] - 2021-04-09
44

5+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
6+
57
### Changed
68

79
- **Breaking:** drop node 6 and 8 ([Level/community#98](https://github.com/Level/community/issues/98)) ([`5c6752f`](https://github.com/Level/encoding-down/commit/5c6752f)) (Vincent Weevers)
@@ -70,6 +72,8 @@
7072

7173
## [6.0.0] - 2018-12-25
7274

75+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
76+
7377
### Changed
7478

7579
- Prefer `const` over `var` in README ([**@ralphtheninja**](https://github.com/ralphtheninja))
@@ -120,6 +124,8 @@
120124

121125
## [5.0.0] - 2018-05-13
122126

127+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
128+
123129
### Added
124130

125131
- Add 10 to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja))
@@ -141,6 +147,8 @@
141147

142148
## [4.0.0] - 2018-02-12
143149

150+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
151+
144152
### Added
145153

146154
- Add 9 to Travis ([**@ralphtheninja**](https://github.com/ralphtheninja))
@@ -166,6 +174,8 @@
166174

167175
## [3.0.0] - 2017-11-11
168176

177+
_If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
178+
169179
### Added
170180

171181
- README: add node badge (>= 4) ([**@vweevers**](https://github.com/vweevers))
@@ -336,78 +346,78 @@
336346

337347
:seedling: Initial release.
338348

339-
[7.0.0]: https://github.com/Level/encoding-down/compare/v6.3.0...v7.0.0
349+
[7.0.0]: https://github.com/Level/encoding-down/releases/tag/v7.0.0
340350

341-
[6.3.0]: https://github.com/Level/encoding-down/compare/v6.2.0...v6.3.0
351+
[6.3.0]: https://github.com/Level/encoding-down/releases/tag/v6.3.0
342352

343-
[6.2.0]: https://github.com/Level/encoding-down/compare/v6.1.0...v6.2.0
353+
[6.2.0]: https://github.com/Level/encoding-down/releases/tag/v6.2.0
344354

345-
[6.1.0]: https://github.com/Level/encoding-down/compare/v6.0.2...v6.1.0
355+
[6.1.0]: https://github.com/Level/encoding-down/releases/tag/v6.1.0
346356

347-
[6.0.2]: https://github.com/Level/encoding-down/compare/v6.0.1...v6.0.2
357+
[6.0.2]: https://github.com/Level/encoding-down/releases/tag/v6.0.2
348358

349-
[6.0.1]: https://github.com/Level/encoding-down/compare/v6.0.0...v6.0.1
359+
[6.0.1]: https://github.com/Level/encoding-down/releases/tag/v6.0.1
350360

351-
[6.0.0]: https://github.com/Level/encoding-down/compare/v5.0.4...v6.0.0
361+
[6.0.0]: https://github.com/Level/encoding-down/releases/tag/v6.0.0
352362

353-
[5.0.4]: https://github.com/Level/encoding-down/compare/v5.0.3...v5.0.4
363+
[5.0.4]: https://github.com/Level/encoding-down/releases/tag/v5.0.4
354364

355-
[5.0.3]: https://github.com/Level/encoding-down/compare/v5.0.2...v5.0.3
365+
[5.0.3]: https://github.com/Level/encoding-down/releases/tag/v5.0.3
356366

357-
[5.0.2]: https://github.com/Level/encoding-down/compare/v5.0.1...v5.0.2
367+
[5.0.2]: https://github.com/Level/encoding-down/releases/tag/v5.0.2
358368

359-
[5.0.1]: https://github.com/Level/encoding-down/compare/v5.0.0...v5.0.1
369+
[5.0.1]: https://github.com/Level/encoding-down/releases/tag/v5.0.1
360370

361-
[5.0.0]: https://github.com/Level/encoding-down/compare/v4.0.1...v5.0.0
371+
[5.0.0]: https://github.com/Level/encoding-down/releases/tag/v5.0.0
362372

363-
[4.0.1]: https://github.com/Level/encoding-down/compare/v4.0.0...v4.0.1
373+
[4.0.1]: https://github.com/Level/encoding-down/releases/tag/v4.0.1
364374

365-
[4.0.0]: https://github.com/Level/encoding-down/compare/v3.0.1...v4.0.0
375+
[4.0.0]: https://github.com/Level/encoding-down/releases/tag/v4.0.0
366376

367-
[3.0.1]: https://github.com/Level/encoding-down/compare/v3.0.0...v3.0.1
377+
[3.0.1]: https://github.com/Level/encoding-down/releases/tag/v3.0.1
368378

369-
[3.0.0]: https://github.com/Level/encoding-down/compare/v2.3.4...v3.0.0
379+
[3.0.0]: https://github.com/Level/encoding-down/releases/tag/v3.0.0
370380

371-
[2.3.4]: https://github.com/Level/encoding-down/compare/v2.3.3...v2.3.4
381+
[2.3.4]: https://github.com/Level/encoding-down/releases/tag/v2.3.4
372382

373-
[2.3.3]: https://github.com/Level/encoding-down/compare/v2.3.2...v2.3.3
383+
[2.3.3]: https://github.com/Level/encoding-down/releases/tag/v2.3.3
374384

375-
[2.3.2]: https://github.com/Level/encoding-down/compare/v2.3.1...v2.3.2
385+
[2.3.2]: https://github.com/Level/encoding-down/releases/tag/v2.3.2
376386

377-
[2.3.1]: https://github.com/Level/encoding-down/compare/v2.3.0...v2.3.1
387+
[2.3.1]: https://github.com/Level/encoding-down/releases/tag/v2.3.1
378388

379-
[2.3.0]: https://github.com/Level/encoding-down/compare/v2.2.1...v2.3.0
389+
[2.3.0]: https://github.com/Level/encoding-down/releases/tag/v2.3.0
380390

381-
[2.2.1]: https://github.com/Level/encoding-down/compare/v2.2.0...v2.2.1
391+
[2.2.1]: https://github.com/Level/encoding-down/releases/tag/v2.2.1
382392

383-
[2.2.0]: https://github.com/Level/encoding-down/compare/v2.1.5...v2.2.0
393+
[2.2.0]: https://github.com/Level/encoding-down/releases/tag/v2.2.0
384394

385-
[2.1.5]: https://github.com/Level/encoding-down/compare/v2.1.4...v2.1.5
395+
[2.1.5]: https://github.com/Level/encoding-down/releases/tag/v2.1.5
386396

387-
[2.1.4]: https://github.com/Level/encoding-down/compare/v2.1.3...v2.1.4
397+
[2.1.4]: https://github.com/Level/encoding-down/releases/tag/v2.1.4
388398

389-
[2.1.3]: https://github.com/Level/encoding-down/compare/v2.1.2...v2.1.3
399+
[2.1.3]: https://github.com/Level/encoding-down/releases/tag/v2.1.3
390400

391-
[2.1.2]: https://github.com/Level/encoding-down/compare/v2.1.1...v2.1.2
401+
[2.1.2]: https://github.com/Level/encoding-down/releases/tag/v2.1.2
392402

393-
[2.1.1]: https://github.com/Level/encoding-down/compare/v2.1.0...v2.1.1
403+
[2.1.1]: https://github.com/Level/encoding-down/releases/tag/v2.1.1
394404

395-
[2.1.0]: https://github.com/Level/encoding-down/compare/v2.0.8...v2.1.0
405+
[2.1.0]: https://github.com/Level/encoding-down/releases/tag/v2.1.0
396406

397-
[2.0.8]: https://github.com/Level/encoding-down/compare/v2.0.7...v2.0.8
407+
[2.0.8]: https://github.com/Level/encoding-down/releases/tag/v2.0.8
398408

399-
[2.0.7]: https://github.com/Level/encoding-down/compare/v2.0.6...v2.0.7
409+
[2.0.7]: https://github.com/Level/encoding-down/releases/tag/v2.0.7
400410

401-
[2.0.6]: https://github.com/Level/encoding-down/compare/v2.0.5...v2.0.6
411+
[2.0.6]: https://github.com/Level/encoding-down/releases/tag/v2.0.6
402412

403-
[2.0.5]: https://github.com/Level/encoding-down/compare/v2.0.4...v2.0.5
413+
[2.0.5]: https://github.com/Level/encoding-down/releases/tag/v2.0.5
404414

405-
[2.0.4]: https://github.com/Level/encoding-down/compare/v2.0.3...v2.0.4
415+
[2.0.4]: https://github.com/Level/encoding-down/releases/tag/v2.0.4
406416

407-
[2.0.3]: https://github.com/Level/encoding-down/compare/v2.0.2...v2.0.3
417+
[2.0.3]: https://github.com/Level/encoding-down/releases/tag/v2.0.3
408418

409-
[2.0.2]: https://github.com/Level/encoding-down/compare/v2.0.1...v2.0.2
419+
[2.0.2]: https://github.com/Level/encoding-down/releases/tag/v2.0.2
410420

411-
[2.0.1]: https://github.com/Level/encoding-down/compare/v2.0.0...v2.0.1
421+
[2.0.1]: https://github.com/Level/encoding-down/releases/tag/v2.0.1
412422

413-
[2.0.0]: https://github.com/Level/encoding-down/compare/v1.0.0...v2.0.0
423+
[2.0.0]: https://github.com/Level/encoding-down/releases/tag/v2.0.0

CONTRIBUTORS.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

LICENSE.md renamed to LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# The MIT License (MIT)
1+
The MIT License (MIT)
22

3-
**Copyright © 2012-present [Contributors](CONTRIBUTORS.md).**
3+
Copyright © 2012 The contributors to encoding-down.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 25 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@
33
> An [`abstract-leveldown`][abstract-leveldown] implementation that wraps another store to encode keys and values.
44
55
[![level badge][level-badge]](https://github.com/Level/awesome)
6-
[![npm](https://img.shields.io/npm/v/encoding-down.svg?label=&logo=npm)](https://www.npmjs.com/package/encoding-down)
6+
[![npm](https://img.shields.io/npm/v/encoding-down.svg)](https://www.npmjs.com/package/encoding-down)
77
[![Node version](https://img.shields.io/node/v/encoding-down.svg)](https://www.npmjs.com/package/encoding-down)
8-
[![Test](https://github.com/Level/encoding-down/actions/workflows/test.yml/badge.svg)](https://github.com/Level/encoding-down/actions/workflows/test.yml)
9-
[![Coverage Status](https://codecov.io/gh/Level/encoding-down/branch/master/graph/badge.svg)](https://codecov.io/gh/Level/encoding-down)
10-
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
11-
[![npm](https://img.shields.io/npm/dm/encoding-down.svg?label=dl)](https://www.npmjs.com/package/encoding-down)
12-
[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers)
13-
[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors)
8+
[![Test](https://img.shields.io/github/workflow/status/Level/encoding-down/Test?label=test)](https://github.com/Level/encoding-down/actions/workflows/test.yml)
9+
[![Coverage](https://img.shields.io/codecov/c/github/Level/encoding-down?label=&logo=codecov&logoColor=fff)](https://codecov.io/gh/Level/encoding-down)
10+
[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript&logoColor=fff)](https://standardjs.com)
11+
[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)
12+
[![Donate](https://img.shields.io/badge/donate-orange?logo=open-collective&logoColor=fff)](https://opencollective.com/level)
1413

1514
## Introduction
1615

@@ -23,11 +22,11 @@ Stores like [`leveldown`][leveldown] can only store strings and Buffers. Other t
2322
Without any options, `encoding-down` defaults to the `utf8` encoding.
2423

2524
```js
26-
var levelup = require('levelup')
27-
var leveldown = require('leveldown')
28-
var encode = require('encoding-down')
25+
const levelup = require('levelup')
26+
const leveldown = require('leveldown')
27+
const encode = require('encoding-down')
2928

30-
var db = levelup(encode(leveldown('./db1')))
29+
const db = levelup(encode(leveldown('./db1')))
3130

3231
db.put('example', Buffer.from('encoding-down'), function (err) {
3332
db.get('example', function (err, value) {
@@ -39,7 +38,7 @@ db.put('example', Buffer.from('encoding-down'), function (err) {
3938
Can we store objects? Yes!
4039

4140
```js
42-
var db = levelup(encode(leveldown('./db2'), { valueEncoding: 'json' }))
41+
const db = levelup(encode(leveldown('./db2'), { valueEncoding: 'json' }))
4342

4443
db.put('example', { awesome: true }, function (err) {
4544
db.get('example', function (err, value) {
@@ -52,7 +51,7 @@ db.put('example', { awesome: true }, function (err) {
5251
How about storing Buffers, but getting back a hex-encoded string?
5352

5453
```js
55-
var db = levelup(encode(leveldown('./db3'), { valueEncoding: 'hex' }))
54+
const db = levelup(encode(leveldown('./db3'), { valueEncoding: 'hex' }))
5655

5756
db.put('example', Buffer.from([0, 255]), function (err) {
5857
db.get('example', function (err, value) {
@@ -64,7 +63,7 @@ db.put('example', Buffer.from([0, 255]), function (err) {
6463
What if we previously stored binary data?
6564

6665
```js
67-
var db = levelup(encode(leveldown('./db4'), { valueEncoding: 'binary' }))
66+
const db = levelup(encode(leveldown('./db4'), { valueEncoding: 'binary' }))
6867

6968
db.put('example', Buffer.from([0, 255]), function (err) {
7069
db.get('example', function (err, value) {
@@ -81,7 +80,7 @@ db.put('example', Buffer.from([0, 255]), function (err) {
8180
And what about keys?
8281

8382
```js
84-
var db = levelup(encode(leveldown('./db5'), { keyEncoding: 'json' }))
83+
const db = levelup(encode(leveldown('./db5'), { keyEncoding: 'json' }))
8584

8685
db.put({ awesome: true }, 'example', function (err) {
8786
db.get({ awesome: true }, function (err, value) {
@@ -91,7 +90,7 @@ db.put({ awesome: true }, 'example', function (err) {
9190
```
9291

9392
```js
94-
var db = levelup(encode(leveldown('./db6'), { keyEncoding: 'binary' }))
93+
const db = levelup(encode(leveldown('./db6'), { keyEncoding: 'binary' }))
9594

9695
db.put(Buffer.from([0, 255]), 'example', function (err) {
9796
db.get('00ff', { keyEncoding: 'hex' }, function (err, value) {
@@ -105,8 +104,8 @@ db.put(Buffer.from([0, 255]), 'example', function (err) {
105104
The [`level`][level] module conveniently bundles `encoding-down` and passes its `options` to `encoding-down`. This means you can simply do:
106105

107106
```js
108-
var level = require('level')
109-
var db = level('./db7', { valueEncoding: 'json' })
107+
const level = require('level')
108+
const db = level('./db7', { valueEncoding: 'json' })
110109

111110
db.put('example', 42, function (err) {
112111
db.get('example', function (err, value) {
@@ -132,11 +131,11 @@ Both encodings default to `'utf8'`. They can be a string (builtin `level-codec`
132131
Please refer to [`level-codec` documentation][encoding-format] for a precise description of the format. Here's a quick example with `level` and `async/await` just for fun:
133132

134133
```js
135-
var level = require('level')
136-
var lexint = require('lexicographic-integer')
134+
const level = require('level')
135+
const lexint = require('lexicographic-integer')
137136

138137
async function main () {
139-
var db = level('./db8', {
138+
const db = level('./db8', {
140139
keyEncoding: {
141140
type: 'lexicographic-integer',
142141
encode: (n) => lexint.pack(n, 'hex'),
@@ -158,10 +157,10 @@ main()
158157
With an npm-installed encoding (modularity ftw!) we can reduce the above to:
159158

160159
```js
161-
var level = require('level')
162-
var lexint = require('lexicographic-integer-encoding')('hex')
160+
const level = require('level')
161+
const lexint = require('lexicographic-integer-encoding')('hex')
163162

164-
var db = level('./db8', {
163+
const db = level('./db8', {
165164
keyEncoding: lexint
166165
})
167166
```
@@ -176,19 +175,11 @@ See the [Contribution Guide](https://github.com/Level/community/blob/master/CONT
176175

177176
## Donate
178177

179-
To sustain [`Level`](https://github.com/Level) and its activities, become a backer or sponsor on [Open Collective](https://opencollective.com/level). Your logo or avatar will be displayed on our 28+ [GitHub repositories](https://github.com/Level) and [npm](https://www.npmjs.com/) packages. 💖
180-
181-
### Backers
182-
183-
[![Open Collective backers](https://opencollective.com/level/backers.svg?width=890)](https://opencollective.com/level)
184-
185-
### Sponsors
186-
187-
[![Open Collective sponsors](https://opencollective.com/level/sponsors.svg?width=890)](https://opencollective.com/level)
178+
Support us with a monthly donation on [Open Collective](https://opencollective.com/level) and help us continue our work.
188179

189180
## License
190181

191-
[MIT](LICENSE.md) © 2012-present [Contributors](CONTRIBUTORS.md).
182+
[MIT](LICENSE)
192183

193184
[level-badge]: https://leveljs.org/img/badge.svg
194185

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
"files": [
1616
"index.js",
1717
"CHANGELOG.md",
18-
"CONTRIBUTORS.md",
19-
"LICENSE.md",
2018
"UPGRADING.md"
2119
],
2220
"dependencies": {
@@ -30,15 +28,11 @@
3028
"airtap-playwright": "^1.0.1",
3129
"dependency-check": "^3.3.0",
3230
"hallmark": "^3.1.0",
33-
"level-community": "^3.0.0",
3431
"memdown": "^6.1.0",
3532
"nyc": "^15.1.0",
3633
"standard": "^16.0.3",
3734
"tape": "^5.0.1"
3835
},
39-
"hallmark": {
40-
"community": "level-community"
41-
},
4236
"repository": "Level/encoding-down",
4337
"homepage": "https://github.com/Level/encoding-down",
4438
"keywords": [

0 commit comments

Comments
 (0)