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

deps(dev): bump aegir from 38.1.8 to 39.0.10 #95

Merged
merged 2 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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