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

Commit 30e0fb5

Browse files
deps(dev): bump aegir from 38.1.8 to 39.0.10 (#95)
* deps(dev): bump aegir from 38.1.8 to 39.0.10 Bumps [aegir](https://github.com/ipfs/aegir) from 38.1.8 to 39.0.10. - [Release notes](https://github.com/ipfs/aegir/releases) - [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md) - [Commits](ipfs/aegir@v38.1.8...v39.0.10) --- updated-dependencies: - dependency-name: aegir dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: fix linting --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <[email protected]>
1 parent afec2c9 commit 30e0fb5

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
},
177177
"devDependencies": {
178178
"@libp2p/crypto": "^1.0.11",
179-
"aegir": "^38.1.7",
179+
"aegir": "^39.0.10",
180180
"protons": "^7.0.2"
181181
}
182182
}

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import type { Uint8ArrayList } from 'uint8arraylist'
21
import {
32
Record
43
} from './record.js'
54
import * as utils from './utils.js'
5+
import type { Uint8ArrayList } from 'uint8arraylist'
66

77
export class Libp2pRecord {
88
public key: Uint8Array

src/validators.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { CodeError } from '@libp2p/interfaces/errors'
2+
import { sha256 } from 'multiformats/hashes/sha2'
3+
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
24
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
35
import type { Libp2pRecord } from './index.js'
46
import type { Validators } from '@libp2p/interface-dht'
5-
import { sha256 } from 'multiformats/hashes/sha2'
6-
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
77

88
/**
99
* Checks a record and ensures it is still valid.

test/validator.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint max-nested-callbacks: ["error", 8] */
22
/* eslint-env mocha */
33

4-
import { expect } from 'aegir/chai'
54
import { generateKeyPair, unmarshalPublicKey } from '@libp2p/crypto/keys'
5+
import { expect } from 'aegir/chai'
66
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
7-
import * as validator from '../src/validators.js'
87
import { Libp2pRecord } from '../src/index.js'
8+
import * as validator from '../src/validators.js'
99
import * as fixture from './fixtures/go-key-records.js'
1010
import type { Validators } from '@libp2p/interface-dht'
1111

@@ -105,13 +105,13 @@ describe('validator', () => {
105105
})
106106

107107
it('does not error on valid record', async () => {
108-
return await Promise.all(cases.valid.publicKey.map(async (k) => {
108+
return Promise.all(cases.valid.publicKey.map(async (k) => {
109109
await validator.validators.pk(k, key.public.bytes)
110110
}))
111111
})
112112

113113
it('throws on invalid records', async () => {
114-
return await Promise.all(cases.invalid.publicKey.map(async ({ data, code }) => {
114+
return Promise.all(cases.invalid.publicKey.map(async ({ data, code }) => {
115115
try {
116116
//
117117
await validator.validators.pk(data, key.public.bytes)

0 commit comments

Comments
 (0)