Skip to content

Commit

Permalink
deps(dev): bump aegir from 38.1.8 to 40.0.0 (#91)
Browse files Browse the repository at this point in the history
Bumps [aegir](https://github.com/ipfs/aegir) from 38.1.8 to 40.0.0.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v38.1.8...v40.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>

---------

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 authored Aug 16, 2023
1 parent 740ff48 commit 68a809e
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 35 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,15 @@
},
"dependencies": {
"err-code": "^3.0.1",
"it-reader": "^6.0.1",
"it-stream-types": "^2.0.1",
"uint8-varint": "^1.0.1",
"uint8arraylist": "^2.0.0",
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"@types/varint": "^6.0.0",
"aegir": "^38.1.8",
"aegir": "^40.0.0",
"iso-random-stream": "^2.0.0",
"it-all": "^3.0.0",
"it-block": "^6.0.0",
Expand All @@ -189,7 +190,6 @@
"it-map": "^3.0.0",
"it-pipe": "^3.0.0",
"it-pushable": "^3.0.0",
"it-reader": "^6.0.1",
"p-defer": "^4.0.0",
"random-int": "^3.0.0",
"varint": "^6.0.0"
Expand Down
6 changes: 3 additions & 3 deletions src/decode.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint max-depth: ["error", 6] */

import { Uint8ArrayList } from 'uint8arraylist'
import { unsigned } from 'uint8-varint'
import errCode from 'err-code'
import { unsigned } from 'uint8-varint'
import { Uint8ArrayList } from 'uint8arraylist'
import { isAsyncIterable } from './utils.js'
import type { LengthDecoderFunction } from './index.js'
import type { Reader } from 'it-reader'
import { isAsyncIterable } from './utils.js'
import type { Source } from 'it-stream-types'

export interface ReadState {
Expand Down
4 changes: 2 additions & 2 deletions src/encode.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Uint8ArrayList } from 'uint8arraylist'
import { unsigned } from 'uint8-varint'
import type { LengthEncoderFunction } from './index.js'
import { Uint8ArrayList } from 'uint8arraylist'
import { allocUnsafe } from 'uint8arrays/alloc'
import { isAsyncIterable } from './utils.js'
import type { LengthEncoderFunction } from './index.js'
import type { Source } from 'it-stream-types'

interface EncoderOptions {
Expand Down
1 change: 0 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export function isAsyncIterable <T> (thing: any): thing is AsyncIterable<T> {
return thing[Symbol.asyncIterator] != null
}
12 changes: 6 additions & 6 deletions test/decode.from-reader.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { expect } from 'aegir/chai'
import { pipe } from 'it-pipe'
import { reader } from 'it-reader'
import randomBytes from 'iso-random-stream/src/random.js'
import all from 'it-all'
import varint from 'varint'
import { times, someBytes } from './helpers/index.js'
import * as lp from '../src/index.js'
import { pipe } from 'it-pipe'
import { reader } from 'it-reader'
import { Uint8ArrayList } from 'uint8arraylist'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import varint from 'varint'
import * as lp from '../src/index.js'
import { times, someBytes } from './helpers/index.js'

describe('decode from reader', () => {
it('should be able to decode from an it-reader', async () => {
Expand Down Expand Up @@ -41,7 +41,7 @@ describe('decode from reader', () => {
await expect(
pipe(
lp.decode.fromReader(stream, { maxDataLength: 100 }),
async (source) => await all(source)
async (source) => all(source)
)
).to.eventually.be.rejected.with.property('code', 'ERR_MSG_DATA_TOO_LONG')
})
Expand Down
18 changes: 9 additions & 9 deletions test/decode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { expect } from 'aegir/chai'
import { pipe } from 'it-pipe'
import randomInt from 'random-int'
import randomBytes from 'iso-random-stream/src/random.js'
import all from 'it-all'
import varint from 'varint'
import { Uint8ArrayList } from 'uint8arraylist'
import { block } from 'it-block'
import { pipe } from 'it-pipe'
import defer from 'p-defer'
import randomInt from 'random-int'
import { unsigned } from 'uint8-varint'
import { Uint8ArrayList } from 'uint8arraylist'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { times } from './helpers/index.js'
import * as lp from '../src/index.js'
import varint from 'varint'
import { MAX_LENGTH_LENGTH, MAX_DATA_LENGTH } from '../src/decode.js'
import * as lp from '../src/index.js'
import { times } from './helpers/index.js'
import { int32BEDecode } from './helpers/int32BE-decode.js'
import { block } from 'it-block'
import { unsigned } from 'uint8-varint'

describe('decode', () => {
it('should decode single message', async () => {
Expand All @@ -37,7 +37,7 @@ describe('decode', () => {
bytes
)

const [output] = await pipe([input], block(1), (source) => lp.decode(source), async (source) => await all(source))
const [output] = await pipe([input], block(1), (source) => lp.decode(source), async (source) => all(source))

expect(output.slice(-byteLength)).to.deep.equal(bytes)
})
Expand Down
14 changes: 7 additions & 7 deletions test/e2e.spec.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { expect } from 'aegir/chai'
import varint from 'varint'
import { pipe } from 'it-pipe'
import { block } from 'it-block'
import { pushable } from 'it-pushable'
import all from 'it-all'
import map from 'it-map'
import { block } from 'it-block'
import each from 'it-foreach'
import map from 'it-map'
import { pipe } from 'it-pipe'
import { pushable } from 'it-pushable'
import { Uint8ArrayList } from 'uint8arraylist'
import * as lp from '../src/index.js'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
import { int32BEEncode } from './helpers/int32BE-encode.js'
import varint from 'varint'
import * as lp from '../src/index.js'
import { int32BEDecode } from './helpers/int32BE-decode.js'
import { int32BEEncode } from './helpers/int32BE-encode.js'

describe('e2e', () => {
it('basics', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/encode.single.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { expect } from 'aegir/chai'
import varint from 'varint'
import { someBytes } from './helpers/index.js'
import * as lp from '../src/index.js'
import { someBytes } from './helpers/index.js'
import { int32BEEncode } from './helpers/int32BE-encode.js'

describe('encode.single', () => {
Expand Down
6 changes: 3 additions & 3 deletions test/encode.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { expect } from 'aegir/chai'
import all from 'it-all'
import { pipe } from 'it-pipe'
import randomInt from 'random-int'
import all from 'it-all'
import { unsigned } from 'uint8-varint'
import { times, someBytes } from './helpers/index.js'
import { Uint8ArrayList } from 'uint8arraylist'
import * as lp from '../src/index.js'
import { times, someBytes } from './helpers/index.js'
import { int32BEEncode } from './helpers/int32BE-encode.js'
import { Uint8ArrayList } from 'uint8arraylist'

describe('encode', () => {
it('should encode length as prefix', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import randomInt from 'random-int'
import randomBytes from 'iso-random-stream/src/random.js'
import randomInt from 'random-int'

export function times <T> (n: number, fn: (...args: any[]) => T): T[] {
return Array.from(Array(n)).fill(fn())
Expand Down

0 comments on commit 68a809e

Please sign in to comment.