From 371eb0ef9e9a650415debe2884ad049f4d4dbb9d Mon Sep 17 00:00:00 2001 From: Vincent Weevers Date: Sun, 12 Sep 2021 15:22:49 +0200 Subject: [PATCH] Move to GitHub Actions and update metadata Ref https://github.com/Level/community/issues/99 --- .github/dependabot.yml | 13 +++++++++++++ .github/workflows/release.yml | 17 +++++++++++++++++ .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 11 ----------- CHANGELOG.md | 1 + CONTRIBUTORS.md | 17 ----------------- LICENSE.md => LICENSE | 4 ++-- README.md | 25 ++++++++----------------- package.json | 11 +++++------ 9 files changed, 74 insertions(+), 53 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml create mode 100644 CHANGELOG.md delete mode 100644 CONTRIBUTORS.md rename LICENSE.md => LICENSE (91%) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..941f1dd --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + schedule: + interval: monthly + ignore: + - dependency-name: dependency-check + - dependency-name: standard + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly 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/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..cddc49a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: Test +on: [push, pull_request] +permissions: + contents: read +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + node: [6, 8, 10] + name: Node ${{ matrix.node }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Use node ${{ matrix.node }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node }} + - name: Install + run: npm install + - name: Test + run: npm test + - name: Coverage + run: npm run coverage + - name: Codecov + uses: codecov/codecov-action@v2 + with: + file: coverage/lcov.info diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bfe1509..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: node_js - -node_js: - - 6 - - 8 - - 10 - -after_success: npm run coverage - -notifications: - email: false diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..825c32f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1 @@ +# Changelog diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md deleted file mode 100644 index 185152b..0000000 --- a/CONTRIBUTORS.md +++ /dev/null @@ -1,17 +0,0 @@ -## Contributors - -| Name | GitHub | Social | -| :-------------------------- | :----------------------------------------------------- | :-------------------------------------------------------------- | -| **Lars-Magnus Skog** | [**@ralphtheninja**](https://github.com/ralphtheninja) | [**@ralph@social.weho.st**](https://social.weho.st/@ralph) | -| **Rod Vagg** | [**@rvagg**](https://github.com/rvagg) | [**@rvagg@twitter**](https://twitter.com/rvagg) | -| **Josh Duff** | [**@TehShrike**](https://github.com/TehShrike) | | -| **Matteo Collina** | [**@mcollina**](https://github.com/mcollina) | [**@matteocollina@twitter**](https://twitter.com/matteocollina) | -| **Dean Landolt** | [**@deanlandolt**](https://github.com/deanlandolt) | | -| **Vincent Weevers** | [**@vweevers**](https://github.com/vweevers) | [**@vweevers@twitter**](https://twitter.com/vweevers) | -| **Mathias Buus** | [**@mafintosh**](https://github.com/mafintosh) | [**@mafintosh@twitter**](https://twitter.com/mafintosh) | -| **José F. Romaniello** | | | -| **Max Ogden** | [**@maxogden**](https://github.com/maxogden) | [**@maxogden@twitter**](https://twitter.com/maxogden) | -| **Marcos Vinicius Bérgamo** | [**@thebergamo**](https://github.com/thebergamo) | | -| **ACJDG** | | | -| **Alexandru Vlăduţu** | [**@alessioalex**](https://github.com/alessioalex) | | -| **Nicholas Kinsey** | | | diff --git a/LICENSE.md b/LICENSE similarity index 91% rename from LICENSE.md rename to LICENSE index 1e78cf8..bd58966 100644 --- a/LICENSE.md +++ b/LICENSE @@ -1,6 +1,6 @@ -# The MIT License (MIT) +The MIT License (MIT) -**Copyright © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md).** +Copyright © 2013 Rod Vagg and the contributors to level-ttl. 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 3b01533..5296223 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,13 @@ > Add a `ttl` (time-to-live) option to [`levelup`][levelup] for `put()` and `batch()`. [![level badge][level-badge]](https://github.com/Level/awesome) -[![npm](https://img.shields.io/npm/v/level-ttl.svg?label=&logo=npm)](https://www.npmjs.com/package/level-ttl) +[![npm](https://img.shields.io/npm/v/level-ttl.svg)](https://www.npmjs.com/package/level-ttl) [![Node version](https://img.shields.io/node/v/level-ttl.svg)](https://www.npmjs.com/package/level-ttl) -[![Travis](https://img.shields.io/travis/com/Level/level-ttl.svg?logo=travis&label=)](https://travis-ci.com/Level/level-ttl) -[![Coverage Status](https://coveralls.io/repos/github/Level/level-ttl/badge.svg)](https://coveralls.io/github/Level/level-ttl) -[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) -[![npm](https://img.shields.io/npm/dm/level-ttl.svg?label=dl)](https://www.npmjs.com/package/level-ttl) -[![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/level-ttl/Test?label=test)](https://github.com/Level/level-ttl/actions/workflows/test.yml) +[![Coverage](https://img.shields.io/codecov/c/github/Level/level-ttl?label=&logo=codecov&logoColor=fff)](https://codecov.io/gh/Level/level-ttl) +[![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) ## Table of Contents @@ -133,19 +132,11 @@ 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) © 2013-present Rod Vagg and [Contributors](CONTRIBUTORS.md). +[MIT](LICENSE) [level-badge]: https://leveljs.org/img/badge.svg diff --git a/package.json b/package.json index 8ca0b3b..ab4936b 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,15 @@ "main": "./level-ttl.js", "scripts": { "test": "standard && hallmark && (nyc -s node test.js | faucet) && nyc report", - "coverage": "nyc report --reporter=text-lcov | coveralls", + "coverage": "nyc report -r lcovonly", "hallmark": "hallmark --fix", "dependency-check": "dependency-check . test.js", "prepublishOnly": "npm run dependency-check" }, + "files": [ + "encoding.js", + "level-ttl.js" + ], "dependencies": { "after": "~0.8.2", "lock": "~1.1.0", @@ -21,11 +25,9 @@ }, "devDependencies": { "bytewise": ">=0.8", - "coveralls": "^3.0.2", "dependency-check": "^3.3.0", "faucet": "^0.0.1", "hallmark": "^2.0.0", - "level-community": "^3.0.0", "level-concat-iterator": "^2.0.0", "level-test": "^6.0.0", "nyc": "^14.0.0", @@ -35,9 +37,6 @@ "tape": "^4.3.0" }, "peerDependencies": {}, - "hallmark": { - "community": "level-community" - }, "repository": { "type": "git", "url": "https://github.com/Level/level-ttl.git"