diff --git a/.github/dependabot.yml b/.github/dependabot.yml index de46e32..0bc3b42 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,5 +4,8 @@ updates: directory: "/" schedule: interval: daily - time: "11:00" + time: "10:00" open-pull-requests-limit: 10 + commit-message: + prefix: "deps" + prefix-development: "deps(dev)" diff --git a/LICENSE b/LICENSE index b0b237f..20ce483 100644 --- a/LICENSE +++ b/LICENSE @@ -1,2 +1,4 @@ +This project is dual licensed under MIT and Apache-2.0. + MIT: https://www.opensource.org/licenses/mit -Apache-2.0: https://www.apache.org/licenses/license-2.0 \ No newline at end of file +Apache-2.0: https://www.apache.org/licenses/license-2.0 diff --git a/LICENSE-MIT b/LICENSE-MIT index 749aa1e..72dc60d 100644 --- a/LICENSE-MIT +++ b/LICENSE-MIT @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file +THE SOFTWARE. diff --git a/README.md b/README.md index 498dc72..2f75fab 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,35 @@ -# js-blockstore-core +# blockstore-core -[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io) -[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/) -[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io) +[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs) +[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs) [![codecov](https://img.shields.io/codecov/c/github/ipfs/js-blockstore-core.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-blockstore-core) -[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ipfs/js-blockstore-core/ci?label=ci&style=flat-square)](https://github.com/ipfs/js-blockstore-core/actions?query=branch%3Amaster+workflow%3Aci+) +[![CI](https://img.shields.io/github/workflow/status/ipfs/js-blockstore-core/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-blockstore-core/actions/workflows/js-test-and-release.yml) -> Contains various implementations of the API contract described in [interface-blockstore](https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-blockstore) +> Contains various implementations of the API contract described in interface-blockstore -## Table of Contents +## Table of contents -- [Implementations](#implementations) - [Install](#install) +- [Implementations](#implementations) - [Usage](#usage) - [BaseBlockstore](#baseblockstore) - [MemoryBlockstore](#memoryblockstore) - [Contribute](#contribute) - [License](#license) +- [Contribute](#contribute-1) + +## Install + +```console +$ npm i blockstore-core +``` ## Implementations - Base: [`src/base`](src/base.js) - Memory: [`src/memory`](src/memory.js) -## Install - -``` -$ npm install blockstore-core -``` - ## Usage ### BaseBlockstore @@ -71,4 +72,15 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c ## License -[Apache-2.0](LICENSE-APACHE) OR [MIT](LICENSE-MIT) +Licensed under either of + +- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / ) +- MIT ([LICENSE-MIT](LICENSE-MIT) / ) + +## Contribute + +Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs-importer/issues)! + +This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md). + +[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md) diff --git a/package.json b/package.json index 8c2be90..03cc063 100644 --- a/package.json +++ b/package.json @@ -2,38 +2,65 @@ "name": "blockstore-core", "version": "1.0.2", "description": "Contains various implementations of the API contract described in interface-blockstore", - "main": "src/index.js", + "author": "Alex Potsides ", + "license": "Apache-2.0 OR MIT", + "homepage": "https://github.com/ipfs/js-blockstore-core#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/ipfs/js-blockstore-core.git" + }, + "bugs": { + "url": "https://github.com/ipfs/js-blockstore-core/issues" + }, + "keywords": [ + "datastore", + "interface", + "ipfs", + "key-value" + ], + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + }, "type": "module", - "types": "types/src/index.d.ts", + "types": "./dist/src/index.d.ts", "typesVersions": { "*": { "*": [ - "types/*", - "types/src/*" + "*", + "dist/*", + "dist/src/*", + "dist/src/*/index" ], - "types/*": [ - "types/*", - "types/*" + "src/*": [ + "*", + "dist/*", + "dist/src/*", + "dist/src/*/index" ] } }, "files": [ - "*", - "!**/*/browser-test", - "!**/*/node-test", + "src", + "dist", + "!dist/test", "!**/*.tsbuildinfo" ], "exports": { ".": { + "types": "./dist/src/index.d.ts", "import": "./src/index.js" }, "./base": { + "types": "./src/base.d.ts", "import": "./src/base.js" }, "./errors": { + "types": "./src/errors.d.ts", "import": "./src/errors.js" }, "./memory": { + "types": "./src/memory.d.ts", "import": "./src/memory.js" } }, @@ -70,15 +97,15 @@ "release": "patch" }, { - "type": "chore", + "type": "docs", "release": "patch" }, { - "type": "docs", + "type": "test", "release": "patch" }, { - "type": "test", + "type": "deps", "release": "patch" }, { @@ -108,7 +135,11 @@ }, { "type": "docs", - "section": "Trivial Changes" + "section": "Documentation" + }, + { + "type": "deps", + "section": "Dependencies" }, { "type": "test", @@ -119,53 +150,24 @@ } ], "@semantic-release/changelog", - [ - "@semantic-release/npm", - { - "pkgRoot": "dist" - } - ], + "@semantic-release/npm", "@semantic-release/github", "@semantic-release/git" ] }, "scripts": { - "clean": "rimraf dist types", - "prepare": "aegir build --no-bundle && cp -R types dist", - "lint": "aegir ts -p check && aegir lint", - "build": "aegir build --esm-tests", - "release": "semantic-release", - "test": "aegir test", - "test:node": "aegir test -t node", - "test:chrome": "aegir test -t browser", + "clean": "aegir clean", + "lint": "aegir lint", + "build": "aegir build", + "release": "aegir release", + "test": "aegir test -t node -t browser -t webworker -t electron-main", + "test:node": "aegir test -t node --cov", + "test:chrome": "aegir test -t browser --cov", "test:chrome-webworker": "aegir test -t webworker", "test:firefox": "aegir test -t browser -- --browser firefox", "test:firefox-webworker": "aegir test -t webworker -- --browser firefox", - "test:electron-main": "aegir test -t electron-main -f dist/cjs/node-test/*js", - "test:electron-renderer": "aegir test -t electron-renderer -f dist/cjs/node-test/*js", - "dep-check": "aegir dep-check -i rimraf -i interface-blockstore -i interface-store -i aegir -i util" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/ipfs/js-blockstore-core.git" - }, - "keywords": [ - "interface", - "key-value", - "ipfs", - "datastore" - ], - "author": "Alex Potsides ", - "license": "(Apache-2.0 OR MIT)", - "bugs": { - "url": "https://github.com/ipfs/js-blockstore-core/issues" - }, - "homepage": "https://github.com/ipfs/js-blockstore-core#readme", - "devDependencies": { - "@types/debug": "^4.1.5", - "aegir": "^36.1.2", - "interface-blockstore-tests": "^2.0.1", - "util": "^0.12.4" + "test:electron-main": "aegir test -t electron-main", + "dep-check": "aegir dep-check" }, "dependencies": { "err-code": "^3.0.1", @@ -176,5 +178,9 @@ "it-filter": "^1.0.2", "it-take": "^1.0.1", "multiformats": "^9.4.7" + }, + "devDependencies": { + "aegir": "^37.5.1", + "interface-blockstore-tests": "^2.0.1" } } diff --git a/tsconfig.json b/tsconfig.json index 376ad55..8708ca6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { - "outDir": "types" + "outDir": "dist", + "emitDeclarationOnly": true }, "include": [ "src",