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

Commit

Permalink
deps(dev): bump aegir from 38.1.8 to 39.0.10 (#95)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dependabot[bot] and achingbrain authored Jun 15, 2023
1 parent afec2c9 commit 30e0fb5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
},
"devDependencies": {
"@libp2p/crypto": "^1.0.11",
"aegir": "^38.1.7",
"aegir": "^39.0.10",
"protons": "^7.0.2"
}
}
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Uint8ArrayList } from 'uint8arraylist'
import {
Record
} from './record.js'
import * as utils from './utils.js'
import type { Uint8ArrayList } from 'uint8arraylist'

export class Libp2pRecord {
public key: Uint8Array
Expand Down
4 changes: 2 additions & 2 deletions src/validators.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { CodeError } from '@libp2p/interfaces/errors'
import { sha256 } from 'multiformats/hashes/sha2'
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
import { toString as uint8ArrayToString } from 'uint8arrays/to-string'
import type { Libp2pRecord } from './index.js'
import type { Validators } from '@libp2p/interface-dht'
import { sha256 } from 'multiformats/hashes/sha2'
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'

/**
* Checks a record and ensures it is still valid.
Expand Down
8 changes: 4 additions & 4 deletions test/validator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint max-nested-callbacks: ["error", 8] */
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import { generateKeyPair, unmarshalPublicKey } from '@libp2p/crypto/keys'
import { expect } from 'aegir/chai'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import * as validator from '../src/validators.js'
import { Libp2pRecord } from '../src/index.js'
import * as validator from '../src/validators.js'
import * as fixture from './fixtures/go-key-records.js'
import type { Validators } from '@libp2p/interface-dht'

Expand Down Expand Up @@ -105,13 +105,13 @@ describe('validator', () => {
})

it('does not error on valid record', async () => {
return await Promise.all(cases.valid.publicKey.map(async (k) => {
return Promise.all(cases.valid.publicKey.map(async (k) => {
await validator.validators.pk(k, key.public.bytes)
}))
})

it('throws on invalid records', async () => {
return await Promise.all(cases.invalid.publicKey.map(async ({ data, code }) => {
return Promise.all(cases.invalid.publicKey.map(async ({ data, code }) => {
try {
//
await validator.validators.pk(data, key.public.bytes)
Expand Down

0 comments on commit 30e0fb5

Please sign in to comment.