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

Commit 336c7e7

Browse files
committed
feat: idb datastore
0 parents  commit 336c7e7

File tree

8 files changed

+560
-0
lines changed

8 files changed

+560
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
docs
2+
package-lock.json
3+
yarn.lock
4+
**/node_modules/
5+
**/*.log
6+
test/repo-tests*
7+
test/test-repo/datastore/*
8+
9+
# Logs
10+
logs
11+
*.log
12+
13+
coverage
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
26+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
27+
.grunt
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
build
33+
34+
# Dependency directory
35+
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
36+
node_modules
37+
38+
lib
39+
dist
40+
test/test-repo/datastore
41+
init-default
42+
datastore-test
43+
.vscode

.travis.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
language: node_js
2+
cache: npm
3+
stages:
4+
- check
5+
- test
6+
- cov
7+
8+
node_js:
9+
- '10'
10+
- '12'
11+
12+
os:
13+
- linux
14+
- osx
15+
- windows
16+
17+
script: npx nyc -s npm run test:node -- --bail
18+
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov
19+
20+
jobs:
21+
include:
22+
- stage: check
23+
script:
24+
- npx aegir commitlint --travis
25+
- npx aegir dep-check
26+
- npm run lint
27+
28+
- stage: test
29+
name: chrome
30+
addons:
31+
chrome: stable
32+
script: npx aegir test -t browser -t webworker
33+
34+
- stage: test
35+
name: firefox
36+
addons:
37+
firefox: latest
38+
script: npx aegir test -t browser -t webworker -- --browsers FirefoxHeadless
39+
40+
notifications:
41+
email: false

CHANGELOG.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<a name="0.14.1"></a>
2+
## [0.14.1](https://github.com/ipfs/js-datastore-level/compare/v0.14.0...v0.14.1) (2020-01-14)
3+
4+
5+
### Bug Fixes
6+
7+
* leveldb iterator memory leak ([#26](https://github.com/ipfs/js-datastore-level/issues/26)) ([e503c1a](https://github.com/ipfs/js-datastore-level/commit/e503c1a)), closes [/github.com/Level/leveldown/blob/d3453fbde4d2a8aa04d9091101c25c999649069b/binding.cc#L545](https://github.com//github.com/Level/leveldown/blob/d3453fbde4d2a8aa04d9091101c25c999649069b/binding.cc/issues/L545)
8+
9+
10+
### Performance Improvements
11+
12+
* optimize prefix search ([#25](https://github.com/ipfs/js-datastore-level/issues/25)) ([8efa812](https://github.com/ipfs/js-datastore-level/commit/8efa812))
13+
14+
15+
16+
<a name="0.14.0"></a>
17+
# [0.14.0](https://github.com/ipfs/js-datastore-level/compare/v0.13.0...v0.14.0) (2019-11-29)
18+
19+
20+
21+
<a name="0.13.0"></a>
22+
# [0.13.0](https://github.com/ipfs/js-datastore-level/compare/v0.12.1...v0.13.0) (2019-11-29)
23+
24+
25+
### Bug Fixes
26+
27+
* init db in overridable method for easier extending ([#21](https://github.com/ipfs/js-datastore-level/issues/21)) ([b21428c](https://github.com/ipfs/js-datastore-level/commit/b21428c))
28+
29+
30+
31+
<a name="0.12.1"></a>
32+
## [0.12.1](https://github.com/ipfs/js-datastore-level/compare/v0.12.0...v0.12.1) (2019-06-26)
33+
34+
35+
### Bug Fixes
36+
37+
* swap leveldown/level.js for level ([#20](https://github.com/ipfs/js-datastore-level/issues/20)) ([d16e212](https://github.com/ipfs/js-datastore-level/commit/d16e212))
38+
39+
40+
41+
<a name="0.12.0"></a>
42+
# [0.12.0](https://github.com/ipfs/js-datastore-level/compare/v0.11.0...v0.12.0) (2019-05-29)
43+
44+
45+
### Bug Fixes
46+
47+
* remove unused var ([74d4a36](https://github.com/ipfs/js-datastore-level/commit/74d4a36))
48+
* tests ([601599d](https://github.com/ipfs/js-datastore-level/commit/601599d))
49+
50+
51+
52+
<a name="0.11.0"></a>
53+
# [0.11.0](https://github.com/ipfs/js-datastore-level/compare/v0.10.0...v0.11.0) (2019-04-29)
54+
55+
56+
57+
<a name="0.10.0"></a>
58+
# [0.10.0](https://github.com/ipfs/js-datastore-level/compare/v0.9.0...v0.10.0) (2018-10-24)
59+
60+
61+
62+
<a name="0.9.0"></a>
63+
# [0.9.0](https://github.com/ipfs/js-datastore-level/compare/v0.8.0...v0.9.0) (2018-09-19)
64+
65+
66+
### Features
67+
68+
* add basic error codes ([02a5146](https://github.com/ipfs/js-datastore-level/commit/02a5146))
69+
70+
71+
72+
<a name="0.8.0"></a>
73+
# [0.8.0](https://github.com/ipfs/js-datastore-level/compare/v0.7.0...v0.8.0) (2018-05-29)
74+
75+
76+
### Bug Fixes
77+
78+
* add test and fix constructor ([396f657](https://github.com/ipfs/js-datastore-level/commit/396f657))
79+
* update binary encoding for levelup 2 ([a5d7378](https://github.com/ipfs/js-datastore-level/commit/a5d7378))
80+
* upgrade level libs to resolve node 10 failure ([a427eca](https://github.com/ipfs/js-datastore-level/commit/a427eca))
81+
82+
83+
84+
<a name="0.7.0"></a>
85+
# [0.7.0](https://github.com/ipfs/js-datastore-level/compare/v0.6.0...v0.7.0) (2017-11-06)
86+
87+
88+
### Bug Fixes
89+
90+
* Windows interop ([#4](https://github.com/ipfs/js-datastore-level/issues/4)) ([5d67042](https://github.com/ipfs/js-datastore-level/commit/5d67042))
91+
92+
93+
94+
<a name="0.6.0"></a>
95+
# [0.6.0](https://github.com/ipfs/js-datastore-level/compare/v0.5.0...v0.6.0) (2017-07-23)
96+
97+
98+
99+
<a name="0.5.0"></a>
100+
# [0.5.0](https://github.com/ipfs/js-datastore-level/compare/v0.4.2...v0.5.0) (2017-07-22)
101+
102+
103+
104+
<a name="0.4.2"></a>
105+
## [0.4.2](https://github.com/ipfs/js-datastore-level/compare/v0.4.0...v0.4.2) (2017-05-24)
106+
107+
108+
### Bug Fixes
109+
110+
* Object.assign is now evil and no longer is behaving as spec says when Webpacked ([5e40f3b](https://github.com/ipfs/js-datastore-level/commit/5e40f3b))
111+
* Object.assign is now evil and no longer is behaving as spec says when Webpacked ([c3f50ec](https://github.com/ipfs/js-datastore-level/commit/c3f50ec))
112+
113+
114+
115+
<a name="0.4.1"></a>
116+
## [0.4.1](https://github.com/ipfs/js-datastore-level/compare/v0.4.0...v0.4.1) (2017-05-24)
117+
118+
119+
### Bug Fixes
120+
121+
* Object.assign is now evil and no longer is behaving as spec says when Webpacked ([077bbc1](https://github.com/ipfs/js-datastore-level/commit/077bbc1))
122+
123+
124+
125+
<a name="0.4.0"></a>
126+
# [0.4.0](https://github.com/ipfs/js-datastore-level/compare/v0.3.0...v0.4.0) (2017-05-23)
127+
128+
129+
130+
<a name="0.3.0"></a>
131+
# [0.3.0](https://github.com/ipfs/js-datastore-level/compare/v0.2.0...v0.3.0) (2017-03-23)
132+
133+
134+
135+
<a name="0.2.0"></a>
136+
# [0.2.0](https://github.com/ipfs/js-datastore-level/compare/v0.1.0...v0.2.0) (2017-03-23)
137+
138+
139+
### Features
140+
141+
* add open method ([fd12c6b](https://github.com/ipfs/js-datastore-level/commit/fd12c6b))
142+
143+
144+
145+
<a name="0.1.0"></a>
146+
# 0.1.0 (2017-03-15)
147+
148+
149+
### Bug Fixes
150+
151+
* key handling ([682f8b3](https://github.com/ipfs/js-datastore-level/commit/682f8b3))
152+
* working interop with go ([f5e03c6](https://github.com/ipfs/js-datastore-level/commit/f5e03c6))
153+
154+
155+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Protocol Labs
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# js-datastore-idb
2+
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)
6+
[![Build Status](https://flat.badgen.net/travis/ipfs/js-datastore-idb)](https://travis-ci.com/ipfs/js-datastore-idb)
7+
[![Codecov](https://codecov.io/gh/ipfs/js-datastore-idb/branch/master/graph/badge.svg)](https://codecov.io/gh/ipfs/js-datastore-idb)
8+
[![Dependency Status](https://david-dm.org/ipfs/js-datastore-idb.svg?style=flat-square)](https://david-dm.org/ipfs/js-datastore-idb)
9+
10+
11+
> Datastore implementation with IndexedDB backend.
12+
13+
## Lead Maintainer
14+
15+
[Hugo Dias](https://github.com/hugomrdias)
16+
17+
## Install
18+
19+
```
20+
$ npm install datastore-idb
21+
```
22+
23+
## Usage
24+
25+
```js
26+
const IdbStore = require('datastore-idb')
27+
28+
const store = new IdbStore('path/to/store')
29+
```
30+
31+
## Contribute
32+
33+
Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs/js-datastore-level/issues)!
34+
35+
This repository falls under the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
36+
37+
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/contributing.md)
38+
39+
## License
40+
41+
[MIT](LICENSE)

package.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "datastore-idb",
3+
"version": "0.0.0",
4+
"description": "Datastore implementation with IndexedDB backend.",
5+
"leadMaintainer": "Hugo Dias <[email protected]>",
6+
"main": "src/index.js",
7+
"scripts": {
8+
"test": "aegir test -t browser -t webworker",
9+
"test:browser": "aegir test -t browser",
10+
"test:webworker": "aegir test -t webworker",
11+
"build": "aegir build",
12+
"lint": "aegir lint",
13+
"release": "aegir release",
14+
"release-minor": "aegir release --type minor",
15+
"release-major": "aegir release --type major",
16+
"coverage": "nyc -s npm run test:node && nyc report --reporter=html",
17+
"dep-check": "aegir dep-check"
18+
},
19+
"repository": "github:ipfs/js-datastore-idb",
20+
"keywords": [
21+
"interface",
22+
"key-value",
23+
"ipfs",
24+
"datastore",
25+
"browser",
26+
"idb"
27+
],
28+
"author": "Hugo Dias <[email protected]>",
29+
"license": "MIT",
30+
"bugs": "https://github.com/ipfs/js-datastore-idb/issues",
31+
"homepage": "https://github.com/ipfs/js-datastore-idb#readme",
32+
"dependencies": {
33+
"buffer": "hugomrdias/level#fix/add-buffer",
34+
"idb": "^5.0.2",
35+
"interface-datastore": "ipfs/interface-datastore#fix/remove-node-globals"
36+
},
37+
"devDependencies": {
38+
"datastore-core": "ipfs/js-datastore-core#fix/add-buffer",
39+
"aegir": "^21.4.5"
40+
}
41+
}

0 commit comments

Comments
 (0)