Skip to content

Commit

Permalink
deps(dev): bump aegir from 37.12.1 to 42.2.3 (#63)
Browse files Browse the repository at this point in the history
Bumps [aegir](https://github.com/ipfs/aegir) from 37.12.1 to 42.2.3.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v37.12.1...v42.2.3)

---
updated-dependencies:
- dependency-name: aegir
  dependency-type: direct:development
  update-type: version-update:semver-major
...

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain committed Feb 6, 2024
1 parent 6836a6c commit f4a59e9
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 257 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ updates:
schedule:
interval: daily
time: "10:00"
open-pull-requests-limit: 10
open-pull-requests-limit: 20
commit-message:
prefix: "deps"
prefix-development: "deps(dev)"
2 changes: 2 additions & 0 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:

permissions:
contents: write
id-token: write
packages: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/semantic-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Semantic PR

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
main:
uses: pl-strflt/.github/.github/workflows/reusable-semantic-pull-request.yml@v0.3
48 changes: 6 additions & 42 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,9 @@
docs
yarn.lock
**/node_modules/
**/*.log
test/repo-tests*
**/bundle.js

# Logs
logs
*.log

coverage

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

build

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules

lib
build
dist
test/test-data/go-ipfs-repo/LOCK
test/test-data/go-ipfs-repo/LOG
test/test-data/go-ipfs-repo/LOG.old

# while testing npm5
.docs
.coverage
node_modules
package-lock.json
yarn.lock
.vscode
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
149 changes: 17 additions & 132 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,17 @@
# hamt-sharding <!-- omit in toc -->

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-hamt-sharding.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-hamt-sharding)
[![CI](https://img.shields.io/github/workflow/status/ipfs/js-hamt-sharding/test%20&%20maybe%20release/master?style=flat-square)](https://github.com/ipfs/js-hamt-sharding/actions/workflows/js-test-and-release.yml)
[![codecov](https://img.shields.io/codecov/c/github/ipfs-shipyard/js-hamt-sharding.svg?style=flat-square)](https://codecov.io/gh/ipfs-shipyard/js-hamt-sharding)
[![CI](https://img.shields.io/github/actions/workflow/status/ipfs-shipyard/js-hamt-sharding/js-test-and-release.yml?branch=master\&style=flat-square)](https://github.com/ipfs-shipyard/js-hamt-sharding/actions/workflows/js-test-and-release.yml?query=branch%3Amaster)

> JavaScript implementation of sharding using hash array mapped tries
## Table of contents <!-- omit in toc -->

- [Install](#install)
- [Usage](#usage)
- [Example](#example)
- [API](#api)
- [`bucket.put(key, value)`](#bucketputkey-value)
- [`bucket.get(key)`](#bucketgetkey)
- [`bucket.del(key)`](#bucketdelkey)
- [`bucket.leafCount()`](#bucketleafcount)
- [`bucket.childrenCount()`](#bucketchildrencount)
- [`bucket.onlyChild()`](#bucketonlychild)
- [`bucket.eachLeafSeries()`](#bucketeachleafseries)
- [`bucket.serialize(map, reduce)`](#bucketserializemap-reduce)
- [`bucket.asyncTransform(asyncMap, asyncReduce)`](#bucketasynctransformasyncmap-asyncreduce)
- [`bucket.toJSON()`](#buckettojson)
- [`bucket.prettyPrint()`](#bucketprettyprint)
- [`bucket.tableSize()`](#buckettablesize)
- [Contribute](#contribute)
- [License](#license)
- [Contribute](#contribute-1)

## Install
# About

```console
$ npm i hamt-sharding
```

## Usage
A [Hash Mapped Trie](https://en.wikipedia.org/wiki/Hash_array_mapped_trie) implementation for JavaScript.

### Example
## Example

```javascript
```TypeScript
import { createHAMT } from 'hamt-sharding'
import crypto from 'crypto-promise'

Expand All @@ -61,118 +33,31 @@ const output = await bucket.get('key')
// output === 'value'
```

## API

```javascript
import { createHAMT } from 'hamt-sharding'
```

### `bucket.put(key, value)`

```javascript
import { createHAMT } from 'hamt-sharding'
const bucket = createHAMT({...})

await bucket.put('key', 'value')
```

### `bucket.get(key)`

```javascript
import { createHAMT } from 'hamt-sharding'
const bucket = createHAMT({...})

await bucket.put('key', 'value')

console.info(await bucket.get('key')) // 'value'
```

### `bucket.del(key)`

```javascript
import { createHAMT } from 'hamt-sharding'
const bucket = createHAMT({...})

await bucket.put('key', 'value')
await bucket.del('key', 'value')

console.info(await bucket.get('key')) // undefined
```

### `bucket.leafCount()`

```javascript
import { createHAMT } from 'hamt-sharding'
const bucket = createHAMT({...})
# Install

console.info(bucket.leafCount()) // 0

await bucket.put('key', 'value')

console.info(bucket.leafCount()) // 1
```console
$ npm i hamt-sharding
```

### `bucket.childrenCount()`

```javascript
import { createHAMT } from 'hamt-sharding'
const bucket = createHAMT({...})
## Browser `<script>` tag

console.info(bucket.childrenCount()) // 0
Loading this module through a script tag will make it's exports available as `HamtSharding` in the global namespace.

await bucket.put('key', 'value')

console.info(bucket.childrenCount()) // 234 -- dependent on hashing algorithm
```html
<script src="https://unpkg.com/hamt-sharding/dist/index.min.js"></script>
```

### `bucket.onlyChild()`

### `bucket.eachLeafSeries()`
# API Docs

```javascript
import { createHAMT } from 'hamt-sharding'
const bucket = createHAMT({...})
- <https://ipfs-shipyard.github.io/js-hamt-sharding>

await bucket.put('key', 'value')

for await (const child of bucket.eachLeafSeries()) {
console.info(child.value) // 'value'
}
```

### `bucket.serialize(map, reduce)`

### `bucket.asyncTransform(asyncMap, asyncReduce)`

### `bucket.toJSON()`

### `bucket.prettyPrint()`

### `bucket.tableSize()`

## Contribute

Feel free to join in. All welcome. Open an [issue](https://github.com/ipfs-shipyard/js-hamt-sharding/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)

## License
# 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

Contributions welcome! Please check out [the issues](https://github.com/ipfs/js-hamt-sharding/issues).

Also see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.

Please be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).
# Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)
25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
"version": "3.0.3",
"description": "JavaScript implementation of sharding using hash array mapped tries",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/ipfs/js-hamt-sharding#readme",
"homepage": "https://github.com/ipfs-shipyard/js-hamt-sharding#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ipfs/js-hamt-sharding.git"
"url": "git+https://github.com/ipfs-shipyard/js-hamt-sharding.git"
},
"bugs": {
"url": "https://github.com/ipfs/js-hamt-sharding/issues"
"url": "https://github.com/ipfs-shipyard/js-hamt-sharding/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"keywords": [
"IPFS",
"hamt",
"sharding"
],
"engines": {
"node": ">=16.0.0",
"npm": ">=7.0.0"
},
"type": "module",
"types": "./dist/src/index.d.ts",
"files": [
"src",
"dist/src",
"dist",
"!dist/test",
"!**/*.tsbuildinfo"
],
Expand All @@ -37,6 +37,7 @@
"eslintConfig": {
"extends": "ipfs",
"parserOptions": {
"project": true,
"sourceType": "module"
}
},
Expand Down Expand Up @@ -136,15 +137,17 @@
"test:electron-main": "aegir test -t electron-main",
"lint": "aegir lint",
"dep-check": "aegir dep-check",
"release": "aegir release"
"release": "aegir release",
"docs": "aegir docs"
},
"dependencies": {
"sparse-array": "^1.3.1",
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"aegir": "^37.5.0",
"aegir": "^42.2.3",
"it-length": "^3.0.4",
"multihashing-async": "^2.1.0"
}
},
"sideEffects": false
}

0 comments on commit f4a59e9

Please sign in to comment.