New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

datastore-core

Package Overview
Dependencies
Maintainers
4
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datastore-core - npm Package Compare versions

Comparing version 7.0.3 to 8.0.0

dist/index.min.js

23

dist/src/memory.d.ts

@@ -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

2

dist/src/shard-readme.d.ts

@@ -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
{
"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 -->
[![](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-datastore-core.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-datastore-core)
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/ipfs/js-datastore-core/ci?label=ci&style=flat-square)](https://github.com/ipfs/js-datastore-core/actions?query=branch%3Amaster+workflow%3Aci+)
[![CI](https://img.shields.io/github/workflow/status/ipfs/js-datastore-core/test%20&%20maybe%20release/master?style=flat-square)](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://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc