datastore-core
Advanced tools
Comparing version 7.0.3 to 8.0.0
@@ -13,2 +13,24 @@ /** | ||
data: Record<string, Uint8Array>; | ||
/** | ||
* @param {Key} key | ||
* @param {Uint8Array} val | ||
*/ | ||
put(key: Key, val: Uint8Array): Promise<void>; | ||
/** | ||
* @param {Key} key | ||
*/ | ||
get(key: Key): Promise<Uint8Array>; | ||
/** | ||
* @param {Key} key | ||
*/ | ||
has(key: Key): Promise<boolean>; | ||
/** | ||
* @param {Key} key | ||
*/ | ||
delete(key: Key): Promise<void>; | ||
_all(): AsyncGenerator<{ | ||
key: Key; | ||
value: Uint8Array; | ||
}, void, undefined>; | ||
_allKeys(): AsyncGenerator<Key, void, undefined>; | ||
} | ||
@@ -19,2 +41,3 @@ export type Pair = import('interface-datastore').Pair; | ||
import { BaseDatastore } from "./base.js"; | ||
import { Key } from "interface-datastore/key"; | ||
//# sourceMappingURL=memory.d.ts.map |
@@ -1,3 +0,3 @@ | ||
declare var _default: "This is a repository of IPLD objects. Each IPLD object is in a single file,\nnamed <base32 encoding of cid>.data. Where <base32 encoding of cid> is the\n\"base32\" encoding of the CID (as specified in\nhttps://github.com/multiformats/multibase) without the 'B' prefix.\nAll the object files are placed in a tree of directories, based on a\nfunction of the CID. This is a form of sharding similar to\nthe objects directory in git repositories. Previously, we used\nprefixes, we now use the next-to-last two charters.\n func NextToLast(base32cid string) {\n nextToLastLen := 2\n offset := len(base32cid) - nextToLastLen - 1\n return str[offset : offset+nextToLastLen]\n }\nFor example, an object with a base58 CIDv1 of\n zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f\nhas a base32 CIDv1 of\n BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA\nand will be placed at\n SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data\nwith 'SC' being the last-to-next two characters and the 'B' at the\nbeginning of the CIDv1 string is the multibase prefix that is not\nstored in the filename.\n"; | ||
declare const _default: "This is a repository of IPLD objects. Each IPLD object is in a single file,\nnamed <base32 encoding of cid>.data. Where <base32 encoding of cid> is the\n\"base32\" encoding of the CID (as specified in\nhttps://github.com/multiformats/multibase) without the 'B' prefix.\nAll the object files are placed in a tree of directories, based on a\nfunction of the CID. This is a form of sharding similar to\nthe objects directory in git repositories. Previously, we used\nprefixes, we now use the next-to-last two charters.\n func NextToLast(base32cid string) {\n nextToLastLen := 2\n offset := len(base32cid) - nextToLastLen - 1\n return str[offset : offset+nextToLastLen]\n }\nFor example, an object with a base58 CIDv1 of\n zb2rhYSxw4ZjuzgCnWSt19Q94ERaeFhu9uSqRgjSdx9bsgM6f\nhas a base32 CIDv1 of\n BAFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA\nand will be placed at\n SC/AFKREIA22FLID5AJ2KU7URG47MDLROZIH6YF2KALU2PWEFPVI37YLKRSCA.data\nwith 'SC' being the last-to-next two characters and the 'B' at the\nbeginning of the CIDv1 string is the multibase prefix that is not\nstored in the filename.\n"; | ||
export default _default; | ||
//# sourceMappingURL=shard-readme.d.ts.map |
138
package.json
{ | ||
"name": "datastore-core", | ||
"version": "7.0.3", | ||
"version": "8.0.0", | ||
"description": "Wrapper implementation for interface-datastore", | ||
@@ -25,13 +25,17 @@ "author": "Friedel Ziegelmayer <dignifiedquire@gmail.com>", | ||
}, | ||
"main": "./cjs/src/index.js", | ||
"types": "types/src/index.d.ts", | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"*": [ | ||
"types/*", | ||
"types/src/*" | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
], | ||
"types/*": [ | ||
"types/*", | ||
"types/src/*" | ||
"src/*": [ | ||
"*", | ||
"dist/*", | ||
"dist/src/*", | ||
"dist/src/*/index" | ||
] | ||
@@ -41,3 +45,5 @@ } | ||
"files": [ | ||
"*", | ||
"src", | ||
"dist", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
@@ -47,50 +53,40 @@ ], | ||
".": { | ||
"browser": "./esm/src/index.js", | ||
"require": "./cjs/src/index.js", | ||
"import": "./esm/src/index.js" | ||
"types": "./dist/src/index.d.ts", | ||
"import": "./src/index.js" | ||
}, | ||
"./base": { | ||
"browser": "./esm/src/base.js", | ||
"require": "./cjs/src/base.js", | ||
"import": "./esm/src/base.js" | ||
"types": "./src/base.d.ts", | ||
"import": "./src/base.js" | ||
}, | ||
"./errors": { | ||
"browser": "./esm/src/errors.js", | ||
"require": "./cjs/src/errors.js", | ||
"import": "./esm/src/errors.js" | ||
"types": "./src/errors.d.ts", | ||
"import": "./src/errors.js" | ||
}, | ||
"./keytransform": { | ||
"browser": "./esm/src/keytransform.js", | ||
"require": "./cjs/src/keytransform.js", | ||
"import": "./esm/src/keytransform.js" | ||
"types": "./src/keytransform.d.ts", | ||
"import": "./src/keytransform.js" | ||
}, | ||
"./memory": { | ||
"browser": "./esm/src/memory.js", | ||
"require": "./cjs/src/memory.js", | ||
"import": "./esm/src/memory.js" | ||
"types": "./src/memory.d.ts", | ||
"import": "./src/memory.js" | ||
}, | ||
"./mount": { | ||
"browser": "./esm/src/mount.js", | ||
"require": "./cjs/src/mount.js", | ||
"import": "./esm/src/mount.js" | ||
"types": "./src/mount.d.ts", | ||
"import": "./src/mount.js" | ||
}, | ||
"./namespace": { | ||
"browser": "./esm/src/namespace.js", | ||
"require": "./cjs/src/namespace.js", | ||
"import": "./esm/src/namespace.js" | ||
"types": "./src/namespace.d.ts", | ||
"import": "./src/namespace.js" | ||
}, | ||
"./shard": { | ||
"browser": "./esm/src/shard.js", | ||
"require": "./cjs/src/shard.js", | ||
"import": "./esm/src/shard.js" | ||
"types": "./src/shard.d.ts", | ||
"import": "./src/shard.js" | ||
}, | ||
"./sharding": { | ||
"browser": "./esm/src/sharding.js", | ||
"require": "./cjs/src/sharding.js", | ||
"import": "./esm/src/sharding.js" | ||
"types": "./src/sharding.d.ts", | ||
"import": "./src/sharding.js" | ||
}, | ||
"./tiered": { | ||
"browser": "./esm/src/tiered.js", | ||
"require": "./cjs/src/tiered.js", | ||
"import": "./esm/src/tiered.js" | ||
"types": "./src/tiered.d.ts", | ||
"import": "./src/tiered.js" | ||
} | ||
@@ -131,11 +127,11 @@ }, | ||
{ | ||
"type": "chore", | ||
"type": "docs", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "docs", | ||
"type": "test", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "test", | ||
"type": "deps", | ||
"release": "patch" | ||
@@ -170,5 +166,9 @@ }, | ||
"type": "docs", | ||
"section": "Trivial Changes" | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "deps", | ||
"section": "Dependencies" | ||
}, | ||
{ | ||
"type": "test", | ||
@@ -182,8 +182,3 @@ "section": "Tests" | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"pkgRoot": "dist" | ||
} | ||
], | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
@@ -194,21 +189,20 @@ "@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", | ||
"clean": "aegir clean", | ||
"lint": "aegir lint", | ||
"build": "aegir build", | ||
"release": "aegir release", | ||
"test": "aegir test", | ||
"test:node": "aegir test -t node", | ||
"test:chrome": "aegir test -t browser", | ||
"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" | ||
"test:electron-main": "aegir test -t electron-main", | ||
"dep-check": "aegir dep-check" | ||
}, | ||
"dependencies": { | ||
"debug": "^4.1.1", | ||
"@libp2p/logger": "^2.0.0", | ||
"err-code": "^3.0.1", | ||
"interface-datastore": "^6.0.2", | ||
"it-all": "^1.0.4", | ||
"it-drain": "^1.0.4", | ||
@@ -218,4 +212,4 @@ "it-filter": "^1.0.2", | ||
"it-merge": "^1.0.1", | ||
"it-pipe": "^1.1.0", | ||
"it-pushable": "^1.4.2", | ||
"it-pipe": "^2.0.3", | ||
"it-pushable": "^3.0.0", | ||
"it-take": "^1.0.1", | ||
@@ -225,21 +219,5 @@ "uint8arrays": "^3.0.0" | ||
"devDependencies": { | ||
"@types/debug": "^4.1.5", | ||
"aegir": "^36.1.3", | ||
"interface-datastore-tests": "^2.0.3", | ||
"it-all": "^1.0.4", | ||
"rimraf": "^3.0.2", | ||
"util": "^0.12.4" | ||
}, | ||
"browser": { | ||
".": "./cjs/src/index.js", | ||
"./base": "./cjs/src/base.js", | ||
"./errors": "./cjs/src/errors.js", | ||
"./keytransform": "./cjs/src/keytransform.js", | ||
"./memory": "./cjs/src/memory.js", | ||
"./mount": "./cjs/src/mount.js", | ||
"./namespace": "./cjs/src/namespace.js", | ||
"./shard": "./cjs/src/shard.js", | ||
"./sharding": "./cjs/src/sharding.js", | ||
"./tiered": "./cjs/src/tiered.js" | ||
"aegir": "^37.4.5", | ||
"interface-datastore-tests": "^2.0.3" | ||
} | ||
} |
@@ -1,19 +0,15 @@ | ||
# js-datastore-core <!-- omit in toc --> | ||
# datastore-core <!-- omit in toc --> | ||
[](http://ipn.io) | ||
[](http://ipfs.io/) | ||
[](http://webchat.freenode.net/?channels=%23ipfs) | ||
[](http://ipfs.io) | ||
[](http://webchat.freenode.net/?channels=%23ipfs) | ||
[](https://discord.gg/ipfs) | ||
[](https://codecov.io/gh/ipfs/js-datastore-core) | ||
[](https://github.com/ipfs/js-datastore-core/actions?query=branch%3Amaster+workflow%3Aci+) | ||
[](https://github.com/ipfs/js-datastore-core/actions/workflows/js-test-and-release.yml) | ||
> Implementations for [interface-datastore](https://github.com/ipfs/js-ipfs-interfaces/packages/interface-datastore). | ||
> Wrapper implementation for interface-datastore | ||
## Lead Maintainer <!-- omit in toc --> | ||
## Table of contents <!-- omit in toc --> | ||
[Alex Potsides](https://github.com/achingbrain) | ||
## Table of Contents <!-- omit in toc --> | ||
- [Install](#install) | ||
- [Implementations](#implementations) | ||
- [Install](#install) | ||
- [Usage](#usage) | ||
@@ -24,3 +20,10 @@ - [BaseDatastore](#basedatastore) | ||
- [License](#license) | ||
- [Contribute](#contribute-1) | ||
## Install | ||
```console | ||
$ npm i datastore-core | ||
``` | ||
## Implementations | ||
@@ -35,11 +38,4 @@ | ||
## Install | ||
``` | ||
$ npm install datastore-core | ||
``` | ||
## Usage | ||
### BaseDatastore | ||
@@ -50,3 +46,3 @@ | ||
```javascript | ||
const { BaseDatastore } from 'datastore-core') | ||
import { BaseDatastore } from 'datastore-core' | ||
@@ -94,3 +90,13 @@ class MyDatastore extends BaseDatastore { | ||
[MIT](LICENSE) | ||
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://github.com/ipfs/community/blob/master/CONTRIBUTING.md) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
2
1
99
Yes
116009
12
43
2039
2
+ Added@libp2p/logger@^2.0.0
+ Addedit-all@^1.0.4
+ Added@chainsafe/is-ip@2.1.0(transitive)
+ Added@chainsafe/netmask@2.0.0(transitive)
+ Added@leichtgewicht/ip-codec@2.0.5(transitive)
+ Added@libp2p/interface-peer-id@2.0.2(transitive)
+ Added@libp2p/logger@2.1.1(transitive)
+ Added@multiformats/dns@1.0.6(transitive)
+ Added@multiformats/multiaddr@12.4.0(transitive)
+ Added@types/dns-packet@5.6.5(transitive)
+ Added@types/node@22.13.5(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addeddns-packet@5.6.1(transitive)
+ Addedeventemitter3@5.0.1(transitive)
+ Addedhashlru@2.3.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedinterface-datastore@8.3.1(transitive)
+ Addedinterface-store@6.0.2(transitive)
+ Addedit-all@1.0.6(transitive)
+ Addedit-merge@2.0.1(transitive)
+ Addedit-pipe@2.0.5(transitive)
+ Addedit-pushable@3.2.3(transitive)
+ Addedit-stream-types@1.0.5(transitive)
+ Addedmultiformats@11.0.213.3.2(transitive)
+ Addedp-defer@4.0.1(transitive)
+ Addedp-queue@8.1.0(transitive)
+ Addedp-timeout@6.1.4(transitive)
+ Addedprogress-events@1.0.1(transitive)
+ Addeduint8-varint@2.0.4(transitive)
+ Addeduint8arraylist@2.4.8(transitive)
+ Addeduint8arrays@5.1.0(transitive)
+ Addedundici-types@6.20.0(transitive)
- Removeddebug@^4.1.1
- Removedit-pipe@1.1.0(transitive)
Updatedit-pipe@^2.0.3
Updatedit-pushable@^3.0.0