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

Commit 01009f6

Browse files
authored
feat!: publish as ESM-only (#45)
BREAKING CHANGE: this module is now ESM-only
1 parent 9e7d0d6 commit 01009f6

File tree

6 files changed

+96
-72
lines changed

6 files changed

+96
-72
lines changed

.github/dependabot.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ updates:
44
directory: "/"
55
schedule:
66
interval: daily
7-
time: "11:00"
7+
time: "10:00"
88
open-pull-requests-limit: 10
9+
commit-message:
10+
prefix: "deps"
11+
prefix-development: "deps(dev)"

LICENSE

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
This project is dual licensed under MIT and Apache-2.0.
2+
13
MIT: https://www.opensource.org/licenses/mit
2-
Apache-2.0: https://www.apache.org/licenses/license-2.0
4+
Apache-2.0: https://www.apache.org/licenses/license-2.0

LICENSE-MIT

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19-
THE SOFTWARE.
19+
THE SOFTWARE.

README.md

+27-15
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
# js-blockstore-core <!-- omit in toc -->
1+
# blockstore-core <!-- omit in toc -->
22

3-
[![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](http://ipn.io)
4-
[![](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io/)
5-
[![](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
3+
[![ipfs.io](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](http://ipfs.io)
4+
[![IRC](https://img.shields.io/badge/freenode-%23ipfs-blue.svg?style=flat-square)](http://webchat.freenode.net/?channels=%23ipfs)
5+
[![Discord](https://img.shields.io/discord/806902334369824788?style=flat-square)](https://discord.gg/ipfs)
66
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-blockstore-core.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-blockstore-core)
7-
[![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+)
7+
[![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)
88

9-
> Contains various implementations of the API contract described in [interface-blockstore](https://github.com/ipfs/js-ipfs-interfaces/tree/master/packages/interface-blockstore)
9+
> Contains various implementations of the API contract described in interface-blockstore
1010
11-
## Table of Contents <!-- omit in toc -->
11+
## Table of contents <!-- omit in toc -->
1212

13-
- [Implementations](#implementations)
1413
- [Install](#install)
14+
- [Implementations](#implementations)
1515
- [Usage](#usage)
1616
- [BaseBlockstore](#baseblockstore)
1717
- [MemoryBlockstore](#memoryblockstore)
1818
- [Contribute](#contribute)
1919
- [License](#license)
20+
- [Contribute](#contribute-1)
21+
22+
## Install
23+
24+
```console
25+
$ npm i blockstore-core
26+
```
2027

2128
## Implementations
2229

2330
- Base: [`src/base`](src/base.js)
2431
- Memory: [`src/memory`](src/memory.js)
2532

26-
## Install
27-
28-
```
29-
$ npm install blockstore-core
30-
```
31-
3233
## Usage
3334

3435
### BaseBlockstore
@@ -71,4 +72,15 @@ This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/c
7172

7273
## License
7374

74-
[Apache-2.0](LICENSE-APACHE) OR [MIT](LICENSE-MIT)
75+
Licensed under either of
76+
77+
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
78+
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
79+
80+
## Contribute
81+
82+
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-ipfs-unixfs-importer/issues)!
83+
84+
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
85+
86+
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)

package.json

+59-53
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,65 @@
22
"name": "blockstore-core",
33
"version": "1.0.2",
44
"description": "Contains various implementations of the API contract described in interface-blockstore",
5-
"main": "src/index.js",
5+
"author": "Alex Potsides <alex.potsides@protocol.ai>",
6+
"license": "Apache-2.0 OR MIT",
7+
"homepage": "https://github.com/ipfs/js-blockstore-core#readme",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/ipfs/js-blockstore-core.git"
11+
},
12+
"bugs": {
13+
"url": "https://github.com/ipfs/js-blockstore-core/issues"
14+
},
15+
"keywords": [
16+
"datastore",
17+
"interface",
18+
"ipfs",
19+
"key-value"
20+
],
21+
"engines": {
22+
"node": ">=16.0.0",
23+
"npm": ">=7.0.0"
24+
},
625
"type": "module",
7-
"types": "types/src/index.d.ts",
26+
"types": "./dist/src/index.d.ts",
827
"typesVersions": {
928
"*": {
1029
"*": [
11-
"types/*",
12-
"types/src/*"
30+
"*",
31+
"dist/*",
32+
"dist/src/*",
33+
"dist/src/*/index"
1334
],
14-
"types/*": [
15-
"types/*",
16-
"types/*"
35+
"src/*": [
36+
"*",
37+
"dist/*",
38+
"dist/src/*",
39+
"dist/src/*/index"
1740
]
1841
}
1942
},
2043
"files": [
21-
"*",
22-
"!**/*/browser-test",
23-
"!**/*/node-test",
44+
"src",
45+
"dist",
46+
"!dist/test",
2447
"!**/*.tsbuildinfo"
2548
],
2649
"exports": {
2750
".": {
51+
"types": "./dist/src/index.d.ts",
2852
"import": "./src/index.js"
2953
},
3054
"./base": {
55+
"types": "./src/base.d.ts",
3156
"import": "./src/base.js"
3257
},
3358
"./errors": {
59+
"types": "./src/errors.d.ts",
3460
"import": "./src/errors.js"
3561
},
3662
"./memory": {
63+
"types": "./src/memory.d.ts",
3764
"import": "./src/memory.js"
3865
}
3966
},
@@ -70,15 +97,15 @@
7097
"release": "patch"
7198
},
7299
{
73-
"type": "chore",
100+
"type": "docs",
74101
"release": "patch"
75102
},
76103
{
77-
"type": "docs",
104+
"type": "test",
78105
"release": "patch"
79106
},
80107
{
81-
"type": "test",
108+
"type": "deps",
82109
"release": "patch"
83110
},
84111
{
@@ -108,7 +135,11 @@
108135
},
109136
{
110137
"type": "docs",
111-
"section": "Trivial Changes"
138+
"section": "Documentation"
139+
},
140+
{
141+
"type": "deps",
142+
"section": "Dependencies"
112143
},
113144
{
114145
"type": "test",
@@ -119,53 +150,24 @@
119150
}
120151
],
121152
"@semantic-release/changelog",
122-
[
123-
"@semantic-release/npm",
124-
{
125-
"pkgRoot": "dist"
126-
}
127-
],
153+
"@semantic-release/npm",
128154
"@semantic-release/github",
129155
"@semantic-release/git"
130156
]
131157
},
132158
"scripts": {
133-
"clean": "rimraf dist types",
134-
"prepare": "aegir build --no-bundle && cp -R types dist",
135-
"lint": "aegir ts -p check && aegir lint",
136-
"build": "aegir build --esm-tests",
137-
"release": "semantic-release",
138-
"test": "aegir test",
139-
"test:node": "aegir test -t node",
140-
"test:chrome": "aegir test -t browser",
159+
"clean": "aegir clean",
160+
"lint": "aegir lint",
161+
"build": "aegir build",
162+
"release": "aegir release",
163+
"test": "aegir test -t node -t browser -t webworker -t electron-main",
164+
"test:node": "aegir test -t node --cov",
165+
"test:chrome": "aegir test -t browser --cov",
141166
"test:chrome-webworker": "aegir test -t webworker",
142167
"test:firefox": "aegir test -t browser -- --browser firefox",
143168
"test:firefox-webworker": "aegir test -t webworker -- --browser firefox",
144-
"test:electron-main": "aegir test -t electron-main -f dist/cjs/node-test/*js",
145-
"test:electron-renderer": "aegir test -t electron-renderer -f dist/cjs/node-test/*js",
146-
"dep-check": "aegir dep-check -i rimraf -i interface-blockstore -i interface-store -i aegir -i util"
147-
},
148-
"repository": {
149-
"type": "git",
150-
"url": "git+https://github.com/ipfs/js-blockstore-core.git"
151-
},
152-
"keywords": [
153-
"interface",
154-
"key-value",
155-
"ipfs",
156-
"datastore"
157-
],
158-
"author": "Alex Potsides <alex.potsides@protocol.ai>",
159-
"license": "(Apache-2.0 OR MIT)",
160-
"bugs": {
161-
"url": "https://github.com/ipfs/js-blockstore-core/issues"
162-
},
163-
"homepage": "https://github.com/ipfs/js-blockstore-core#readme",
164-
"devDependencies": {
165-
"@types/debug": "^4.1.5",
166-
"aegir": "^36.1.2",
167-
"interface-blockstore-tests": "^2.0.1",
168-
"util": "^0.12.4"
169+
"test:electron-main": "aegir test -t electron-main",
170+
"dep-check": "aegir dep-check"
169171
},
170172
"dependencies": {
171173
"err-code": "^3.0.1",
@@ -176,5 +178,9 @@
176178
"it-filter": "^1.0.2",
177179
"it-take": "^1.0.1",
178180
"multiformats": "^9.4.7"
181+
},
182+
"devDependencies": {
183+
"aegir": "^37.5.1",
184+
"interface-blockstore-tests": "^2.0.1"
179185
}
180186
}

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "aegir/src/config/tsconfig.aegir.json",
33
"compilerOptions": {
4-
"outDir": "types"
4+
"outDir": "dist",
5+
"emitDeclarationOnly": true
56
},
67
"include": [
78
"src",

0 commit comments

Comments
 (0)