From 75e90bf048e357ee89789730d70975f6f95d4497 Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Fri, 1 Oct 2021 19:08:51 +0200 Subject: [PATCH] Update metadata and add release workflow --- .github/workflows/release.yml | 17 ++++++++++++++ CHANGELOG.md | 34 +++++++++++++-------------- LICENSE.md => LICENSE | 4 ++-- README.md | 43 ++++++++++++++--------------------- package.json | 9 ++++---- 5 files changed, 58 insertions(+), 49 deletions(-) create mode 100644 .github/workflows/release.yml rename LICENSE.md => LICENSE (91%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..53cd4bd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release +on: + push: + tags: ['*'] +permissions: + contents: write +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Create GitHub release + uses: docker://antonyurchenko/git-release:v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 0382b37..7044bdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -141,36 +141,36 @@ No changes. Initial release :seedling:. -[5.0.0]: https://github.com/Level/party/compare/v4.0.0...v5.0.0 +[5.0.0]: https://github.com/Level/party/releases/tag/v5.0.0 -[4.0.0]: https://github.com/Level/party/compare/v3.0.4...v4.0.0 +[4.0.0]: https://github.com/Level/party/releases/tag/v4.0.0 -[3.0.4]: https://github.com/Level/party/compare/v3.0.3...v3.0.4 +[3.0.4]: https://github.com/Level/party/releases/tag/v3.0.4 -[3.0.3]: https://github.com/Level/party/compare/v3.0.2...v3.0.3 +[3.0.3]: https://github.com/Level/party/releases/tag/v3.0.3 -[3.0.2]: https://github.com/Level/party/compare/v3.0.1...v3.0.2 +[3.0.2]: https://github.com/Level/party/releases/tag/v3.0.2 -[3.0.1]: https://github.com/Level/party/compare/v3.0.0...v3.0.1 +[3.0.1]: https://github.com/Level/party/releases/tag/v3.0.1 -[3.0.0]: https://github.com/Level/party/compare/v2.1.2...v3.0.0 +[3.0.0]: https://github.com/Level/party/releases/tag/v3.0.0 -[2.1.2]: https://github.com/Level/party/compare/v2.1.1...v2.1.2 +[2.1.2]: https://github.com/Level/party/releases/tag/v2.1.2 -[2.1.1]: https://github.com/Level/party/compare/v2.1.0...v2.1.1 +[2.1.1]: https://github.com/Level/party/releases/tag/v2.1.1 -[2.1.0]: https://github.com/Level/party/compare/v2.0.0...v2.1.0 +[2.1.0]: https://github.com/Level/party/releases/tag/v2.1.0 -[2.0.0]: https://github.com/Level/party/compare/1.0.1...v2.0.0 +[2.0.0]: https://github.com/Level/party/releases/tag/v2.0.0 -[1.0.1]: https://github.com/Level/party/compare/1.0.0...1.0.1 +[1.0.1]: https://github.com/Level/party/releases/tag/1.0.1 -[1.0.0]: https://github.com/Level/party/compare/0.0.4...1.0.0 +[1.0.0]: https://github.com/Level/party/releases/tag/1.0.0 -[0.0.4]: https://github.com/Level/party/compare/0.0.3...0.0.4 +[0.0.4]: https://github.com/Level/party/releases/tag/0.0.4 -[0.0.3]: https://github.com/Level/party/compare/0.0.2...0.0.3 +[0.0.3]: https://github.com/Level/party/releases/tag/0.0.3 -[0.0.2]: https://github.com/Level/party/compare/0.0.1...0.0.2 +[0.0.2]: https://github.com/Level/party/releases/tag/0.0.2 -[0.0.1]: https://github.com/Level/party/compare/0.0.0...0.0.1 +[0.0.1]: https://github.com/Level/party/releases/tag/0.0.1 diff --git a/LICENSE.md b/LICENSE similarity index 91% rename from LICENSE.md rename to LICENSE index eac33c2..0f56d51 100644 --- a/LICENSE.md +++ b/LICENSE @@ -1,6 +1,6 @@ -# The MIT License (MIT) +The MIT License (MIT) -**Copyright © 2014-present James Halliday and contributors.** +Copyright © 2014 James Halliday and the contributors to level-party. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 5619114..ad7cd1c 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,13 @@ Open a leveldb handle multiple times, transparently upgrading to use [`multileveldown`](https://npmjs.org/package/multileveldown) when more than 1 process try to use the same leveldb data directory at once and re-electing a new master when the primary unix socket goes down. [![level badge][level-badge]](https://github.com/Level/awesome) -[![npm](https://img.shields.io/npm/v/level-party.svg?label=&logo=npm)](https://www.npmjs.com/package/level-party) +[![npm](https://img.shields.io/npm/v/level-party.svg)](https://www.npmjs.com/package/level-party) [![Node version](https://img.shields.io/node/v/level-party.svg)](https://www.npmjs.com/package/level-party) -[![Test](https://github.com/Level/party/actions/workflows/test.yml/badge.svg)](https://github.com/Level/party/actions/workflows/test.yml) -[![codecov](https://codecov.io/gh/Level/party/branch/master/graph/badge.svg)](https://codecov.io/gh/Level/party) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) -[![npm](https://img.shields.io/npm/dm/level-party.svg?label=dl)](https://www.npmjs.com/package/level-party) -[![Backers on Open Collective](https://opencollective.com/level/backers/badge.svg?color=orange)](#backers) -[![Sponsors on Open Collective](https://opencollective.com/level/sponsors/badge.svg?color=orange)](#sponsors) +[![Test](https://img.shields.io/github/workflow/status/Level/party/Test?label=test)](https://github.com/Level/party/actions/workflows/test.yml) +[![Coverage](https://img.shields.io/codecov/c/github/Level/party?label=&logo=codecov&logoColor=fff)](https://codecov.io/gh/Level/party) +[![Standard](https://img.shields.io/badge/standard-informational?logo=javascript&logoColor=fff)](https://standardjs.com) +[![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org) +[![Donate](https://img.shields.io/badge/donate-orange?logo=open-collective&logoColor=fff)](https://opencollective.com/level) ## Example @@ -33,8 +32,8 @@ directory transparently. This means that if you have 2 programs, 1 that gets: ```js -var level = require('level-party') -var db = level(__dirname + '/data', { valueEncoding: 'json' }) +const level = require('level-party') +const db = level(__dirname + '/data', { valueEncoding: 'json' }) setInterval(function () { db.get('a', function (err, value) { @@ -46,10 +45,10 @@ setInterval(function () { And 1 that puts: ```js -var level = require('level-party') -var db = level(__dirname + '/data', { valueEncoding: 'json' }) +const level = require('level-party') +const db = level(__dirname + '/data', { valueEncoding: 'json' }) -var n = Math.floor(Math.random() * 100000) +const n = Math.floor(Math.random() * 100000) setInterval(function () { db.put('a', n + 1) @@ -88,19 +87,19 @@ Hooray! level-party does seamless failover. This means that if you create a read-stream and the leader goes down while you are reading that stream level-party will resume your stream on the new leader. -[**This disables leveldb snapshotting**](https://github.com/level/leveldown#snapshots) so if your app relies on this you should disable this by setting `opts.retry = false` +[**This disables leveldb snapshotting**](https://github.com/level/leveldown#snapshots) so if your app relies on this you should disable this by setting `opts.retry = false`: ```js -var db = level('./data', { retry: false }) // will not retry streams / gets / puts if the leader goes down +const db = level('./data', { retry: false }) // will not retry streams / gets / puts if the leader goes down ``` ## Windows support -`level-party` works on windows as well using named pipes. +`level-party` works on Windows as well using named pipes. ## API -### `var db = level(...)` +### `db = level(...)` The arguments are exactly the same as [`level`](https://npmjs.org/package/level). You will sometimes get a real leveldb handle and sometimes get a `multileveldown` handle back in the response. @@ -122,18 +121,10 @@ See the [Contribution Guide](https://github.com/Level/community/blob/master/CONT ## Donate -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. 💖 - -### Backers - -[![Open Collective backers](https://opencollective.com/level/backers.svg?width=890)](https://opencollective.com/level) - -### Sponsors - -[![Open Collective sponsors](https://opencollective.com/level/sponsors.svg?width=890)](https://opencollective.com/level) +Support us with a monthly donation on [Open Collective](https://opencollective.com/level) and help us continue our work. ## License -[MIT](LICENSE.md) © 2014-present James Halliday and contributors. +[MIT](LICENSE) [level-badge]: https://leveljs.org/img/badge.svg diff --git a/package.json b/package.json index 24c1a7e..a5a49d3 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,11 @@ "dependency-check": "dependency-check --no-dev . test/*.js", "prepublishOnly": "npm run dependency-check" }, + "files": [ + "example", + "index.js", + "CHANGELOG.md" + ], "dependencies": { "level": "^7.0.0", "multileveldown": "^5.0.0", @@ -25,16 +30,12 @@ "bytewise": "^1.1.0", "dependency-check": "^4.1.0", "hallmark": "^3.1.0", - "level-community": "^3.0.0", "nyc": "^15.1.0", "osenv": "~0.1.0", "standard": "^16.0.3", "subleveldown": "^6.0.0", "tape": "^5.0.1" }, - "hallmark": { - "community": "level-community" - }, "repository": { "type": "git", "url": "https://github.com/Level/party.git"