datastore-fs
Advanced tools
Comparing version
@@ -59,2 +59,15 @@ /** | ||
/** | ||
* Store the given value under the key | ||
* | ||
* @param {Key} key | ||
* @param {Uint8Array} val | ||
* @returns {Promise<void>} | ||
*/ | ||
put(key: Key, val: Uint8Array): Promise<void>; | ||
/** | ||
* @param {AwaitIterable<Pair>} source | ||
* @returns {AsyncIterable<Pair>} | ||
*/ | ||
putMany(source: AwaitIterable<Pair>): AsyncIterable<Pair>; | ||
/** | ||
* Read from the file system without extension. | ||
@@ -66,2 +79,41 @@ * | ||
getRaw(key: Key): Promise<Uint8Array>; | ||
/** | ||
* Read from the file system. | ||
* | ||
* @param {Key} key | ||
* @returns {Promise<Uint8Array>} | ||
*/ | ||
get(key: Key): Promise<Uint8Array>; | ||
/** | ||
* @param {AwaitIterable<Key>} source | ||
* @returns {AsyncIterable<Uint8Array>} | ||
*/ | ||
getMany(source: AwaitIterable<Key>): AsyncIterable<Uint8Array>; | ||
/** | ||
* @param {AwaitIterable<Key>} source | ||
* @returns {AsyncIterable<Key>} | ||
*/ | ||
deleteMany(source: AwaitIterable<Key>): AsyncIterable<Key>; | ||
/** | ||
* Check for the existence of the given key. | ||
* | ||
* @param {Key} key | ||
* @returns {Promise<boolean>} | ||
*/ | ||
has(key: Key): Promise<boolean>; | ||
/** | ||
* Delete the record under the given key. | ||
* | ||
* @param {Key} key | ||
* @returns {Promise<void>} | ||
*/ | ||
delete(key: Key): Promise<void>; | ||
/** | ||
* @param {Query} q | ||
*/ | ||
_all(q: Query): AsyncGenerator<import("interface-datastore").Pair, void, unknown>; | ||
/** | ||
* @param {KeyQuery} q | ||
*/ | ||
_allKeys(q: KeyQuery): AsyncGenerator<Key, void, undefined>; | ||
} | ||
@@ -68,0 +120,0 @@ export type Datastore = import('interface-datastore').Datastore; |
{ | ||
"name": "datastore-fs", | ||
"version": "7.0.0", | ||
"version": "8.0.0", | ||
"description": "Datastore implementation with file system backend", | ||
@@ -26,13 +26,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" | ||
] | ||
@@ -42,3 +46,5 @@ } | ||
"files": [ | ||
"*", | ||
"src", | ||
"dist", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
@@ -48,5 +54,4 @@ ], | ||
".": { | ||
"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" | ||
} | ||
@@ -87,11 +92,11 @@ }, | ||
{ | ||
"type": "chore", | ||
"type": "docs", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "docs", | ||
"type": "test", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "test", | ||
"type": "deps", | ||
"release": "patch" | ||
@@ -126,5 +131,9 @@ }, | ||
"type": "docs", | ||
"section": "Trivial Changes" | ||
"section": "Documentation" | ||
}, | ||
{ | ||
"type": "deps", | ||
"section": "Dependencies" | ||
}, | ||
{ | ||
"type": "test", | ||
@@ -138,8 +147,3 @@ "section": "Tests" | ||
"@semantic-release/changelog", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"pkgRoot": "dist" | ||
} | ||
], | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
@@ -150,7 +154,6 @@ "@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", | ||
@@ -161,5 +164,5 @@ "test:node": "aegir test -t node", | ||
"dependencies": { | ||
"datastore-core": "^7.0.0", | ||
"datastore-core": "^8.0.1", | ||
"fast-write-atomic": "^0.2.0", | ||
"interface-datastore": "^6.0.2", | ||
"interface-datastore": "^7.0.0", | ||
"it-glob": "^1.0.1", | ||
@@ -173,6 +176,6 @@ "it-map": "^1.0.5", | ||
"@types/rimraf": "^3.0.2", | ||
"aegir": "^36.1.3", | ||
"aegir": "^37.5.0", | ||
"async-iterator-all": "^1.0.0", | ||
"detect-node": "^2.0.4", | ||
"interface-datastore-tests": "^2.0.3", | ||
"interface-datastore-tests": "^3.0.0", | ||
"ipfs-utils": "^9.0.4", | ||
@@ -183,4 +186,6 @@ "memdown": "^6.0.0", | ||
"browser": { | ||
".": "./cjs/src/index.js" | ||
"fs": false, | ||
"path": false, | ||
"util": false | ||
} | ||
} |
@@ -1,17 +0,12 @@ | ||
# js-datastore-fs <!-- omit in toc --> | ||
# datastore-fs <!-- omit in toc --> | ||
[](http://ipn.io) | ||
[](http://ipfs.io/) | ||
[](http://webchat.freenode.net/?channels=%23ipfs) | ||
[](https://github.com/RichardLitt/standard-readme) | ||
[](https://github.com/ipfs/js-datastore-fs/actions/workflows/js-test-and-release.yml) | ||
[](https://codecov.io/gh/ipfs/js-datastore-fs) | ||
[](https://david-dm.org/ipfs/js-datastore-fs) | ||
[](https://github.com/feross/standard) | ||
 | ||
 | ||
[](http://ipfs.io) | ||
[](http://webchat.freenode.net/?channels=%23ipfs) | ||
[](https://discord.gg/ipfs) | ||
[](https://codecov.io/gh/ipfs/js-datastore-fs) | ||
[](https://github.com/ipfs/js-datastore-fs/actions/workflows/js-test-and-release.yml) | ||
> Datastore implementation with file system backend. | ||
> Datastore implementation with file system backend | ||
## Table of Contents <!-- omit in toc --> | ||
## Table of contents <!-- omit in toc --> | ||
@@ -22,8 +17,9 @@ - [Install](#install) | ||
- [License](#license) | ||
- [Contribute](#contribute-1) | ||
## Install | ||
```console | ||
$ npm i datastore-fs | ||
``` | ||
$ npm install datastore-fs | ||
``` | ||
@@ -48,2 +44,13 @@ ## Usage | ||
[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
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
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
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1
-50%55
14.58%1
-85.71%Yes
NaN71628
-29.7%7
-61.11%657
-53.4%2
100%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated