Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

feat!: publish as ESM-only #45

Merged
merged 1 commit into from
Aug 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
4 changes: 3 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Apache-2.0: https://www.apache.org/licenses/license-2.0
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
Expand Up @@ -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.
THE SOFTWARE.
42 changes: 27 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
# js-blockstore-core <!-- omit in toc -->
# blockstore-core <!-- omit in toc -->

[![](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 <!-- omit in toc -->
## Table of contents <!-- omit in toc -->

- [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
Expand Down Expand Up @@ -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) / <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/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)
112 changes: 59 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <alex.potsides@protocol.ai>",
"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"
}
},
Expand Down Expand Up @@ -70,15 +97,15 @@
"release": "patch"
},
{
"type": "chore",
"type": "docs",
"release": "patch"
},
{
"type": "docs",
"type": "test",
"release": "patch"
},
{
"type": "test",
"type": "deps",
"release": "patch"
},
{
Expand Down Expand Up @@ -108,7 +135,11 @@
},
{
"type": "docs",
"section": "Trivial Changes"
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
Expand All @@ -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 <alex.potsides@protocol.ai>",
"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",
Expand All @@ -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"
}
}
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "aegir/src/config/tsconfig.aegir.json",
"compilerOptions": {
"outDir": "types"
"outDir": "dist",
"emitDeclarationOnly": true
},
"include": [
"src",
Expand Down