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

Commit 3c7229b

Browse files
deps(dev): bump aegir from 38.1.8 to 39.0.6 (#278)
* deps(dev): bump aegir from 38.1.8 to 39.0.6 Bumps [aegir](https://github.com/ipfs/aegir) from 38.1.8 to 39.0.6. - [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.6) --- 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 * chore: update aegir --------- 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 8fb40c3 commit 3c7229b

File tree

12 files changed

+50
-50
lines changed

12 files changed

+50
-50
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
"devDependencies": {
166166
"@libp2p/interface-stream-muxer-compliance-tests": "^7.0.0",
167167
"@types/varint": "^6.0.0",
168-
"aegir": "^38.1.7",
168+
"aegir": "^39.0.7",
169169
"cborg": "^1.8.1",
170170
"delay": "^5.0.0",
171171
"eslint-plugin-etc": "^2.0.2",

src/decode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { MessageTypeNames, MessageTypes } from './message-types.js'
21
import { Uint8ArrayList } from 'uint8arraylist'
2+
import { MessageTypeNames, MessageTypes } from './message-types.js'
33
import type { Message } from './message-types.js'
44

55
export const MAX_MSG_SIZE = 1 << 20 // 1MB

src/encode.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { Source } from 'it-stream-types'
2-
import varint from 'varint'
1+
import batchedBytes from 'it-batched-bytes'
32
import { Uint8ArrayList } from 'uint8arraylist'
3+
import varint from 'varint'
44
import { allocUnsafe } from './alloc-unsafe.js'
5-
import { Message, MessageTypes } from './message-types.js'
6-
import batchedBytes from 'it-batched-bytes'
5+
import { type Message, MessageTypes } from './message-types.js'
6+
import type { Source } from 'it-stream-types'
77

88
const POOL_SIZE = 10 * 1024
99

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { StreamMuxer, StreamMuxerFactory, StreamMuxerInit } from '@libp2p/interface-stream-muxer'
21
import { MplexStreamMuxer } from './mplex.js'
2+
import type { StreamMuxer, StreamMuxerFactory, StreamMuxerInit } from '@libp2p/interface-stream-muxer'
33

44
export interface MplexInit {
55
/**

src/mplex.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import { pushableV } from 'it-pushable'
1+
import { CodeError } from '@libp2p/interfaces/errors'
2+
import { logger } from '@libp2p/logger'
23
import { abortableSource } from 'abortable-iterator'
3-
import { encode } from './encode.js'
4+
import { anySignal } from 'any-signal'
5+
import { pushableV } from 'it-pushable'
6+
import { RateLimiterMemory } from 'rate-limiter-flexible'
7+
import { toString as uint8ArrayToString } from 'uint8arrays'
48
import { Decoder } from './decode.js'
5-
import { MessageTypes, MessageTypeNames, Message } from './message-types.js'
9+
import { encode } from './encode.js'
10+
import { MessageTypes, MessageTypeNames, type Message } from './message-types.js'
611
import { createStream } from './stream.js'
7-
import { toString as uint8ArrayToString } from 'uint8arrays'
8-
import { logger } from '@libp2p/logger'
9-
import { CodeError } from '@libp2p/interfaces/errors'
10-
import { RateLimiterMemory } from 'rate-limiter-flexible'
11-
import type { Sink, Source } from 'it-stream-types'
12-
import type { StreamMuxer, StreamMuxerInit } from '@libp2p/interface-stream-muxer'
13-
import type { Stream } from '@libp2p/interface-connection'
1412
import type { MplexInit } from './index.js'
15-
import { anySignal } from 'any-signal'
13+
import type { Stream } from '@libp2p/interface-connection'
14+
import type { StreamMuxer, StreamMuxerInit } from '@libp2p/interface-stream-muxer'
15+
import type { Sink, Source } from 'it-stream-types'
1616
import type { Uint8ArrayList } from 'uint8arraylist'
1717

1818
const log = logger('libp2p:mplex')

src/stream.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1+
import { CodeError } from '@libp2p/interfaces/errors'
2+
import { logger } from '@libp2p/logger'
13
import { abortableSource } from 'abortable-iterator'
4+
import { anySignal } from 'any-signal'
25
import { pushable } from 'it-pushable'
3-
import { CodeError } from '@libp2p/interfaces/errors'
6+
import { Uint8ArrayList } from 'uint8arraylist'
7+
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
48
import { MAX_MSG_SIZE } from './decode.js'
5-
import { anySignal } from 'any-signal'
69
import { InitiatorMessageTypes, ReceiverMessageTypes } from './message-types.js'
7-
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
8-
import { Uint8ArrayList } from 'uint8arraylist'
9-
import { logger } from '@libp2p/logger'
1010
import type { Message } from './message-types.js'
11+
import type { MplexStream } from './mplex.js'
1112
import type { StreamTimeline } from '@libp2p/interface-connection'
1213
import type { Source } from 'it-stream-types'
13-
import type { MplexStream } from './mplex.js'
1414

1515
const log = logger('libp2p:mplex:stream')
1616

test/coder.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
/* eslint max-nested-callbacks: ["error", 5] */
33

44
import { expect } from 'aegir/chai'
5+
import all from 'it-all'
6+
import { Uint8ArrayList } from 'uint8arraylist'
7+
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
58
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
69
import { encode } from '../src/encode.js'
710
import { decode } from './fixtures/decode.js'
8-
import all from 'it-all'
9-
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
1011
import { messageWithBytes } from './fixtures/utils.js'
1112
import type { Message, NewStreamMessage } from '../src/message-types.js'
12-
import { Uint8ArrayList } from 'uint8arraylist'
1313

1414
describe('coder', () => {
1515
it('should encode header', async () => {

test/fixtures/decode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env mocha */
22

3-
import type { Message } from '../../src/message-types.js'
43
import { Decoder, MAX_MSG_QUEUE_SIZE, MAX_MSG_SIZE } from '../../src/decode.js'
4+
import type { Message } from '../../src/message-types.js'
55
import type { Source } from 'it-stream-types'
66

77
export function decode (maxMessageSize: number = MAX_MSG_SIZE, maxUnprocessedMessageQueueSize: number = MAX_MSG_QUEUE_SIZE) {

test/fixtures/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Message, MessageTypes } from '../../src/message-types.js'
1+
import { type Message, MessageTypes } from '../../src/message-types.js'
22

33
export type MessageWithBytes = {
44
[k in keyof Message]: Message[k]

test/mplex.spec.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
/* eslint max-nested-callbacks: ["error", 5] */
33

44
import { expect } from 'aegir/chai'
5-
import { mplex } from '../src/index.js'
6-
import { CloseInitiatorMessage, Message, MessageInitiatorMessage, MessageTypes, NewStreamMessage } from '../src/message-types.js'
7-
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
8-
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
9-
import { encode } from '../src/encode.js'
10-
import all from 'it-all'
11-
import type { Source } from 'it-stream-types'
125
import delay from 'delay'
13-
import pDefer from 'p-defer'
14-
import { decode } from './fixtures/decode.js'
6+
import all from 'it-all'
157
import { pushable } from 'it-pushable'
8+
import pDefer from 'p-defer'
169
import { Uint8ArrayList } from 'uint8arraylist'
10+
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
11+
import { fromString as uint8ArrayFromString } from 'uint8arrays/from-string'
12+
import { encode } from '../src/encode.js'
13+
import { mplex } from '../src/index.js'
14+
import { type CloseInitiatorMessage, type Message, type MessageInitiatorMessage, MessageTypes, type NewStreamMessage } from '../src/message-types.js'
15+
import { decode } from './fixtures/decode.js'
16+
import type { Source } from 'it-stream-types'
1717

1818
describe('mplex', () => {
1919
it('should restrict number of initiator streams per connection', async () => {

test/restrict-size.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
/* eslint-env mocha */
22

33
import { expect } from 'aegir/chai'
4-
import { pipe } from 'it-pipe'
54
import randomBytes from 'iso-random-stream/src/random.js'
65
import all from 'it-all'
76
import drain from 'it-drain'
87
import each from 'it-foreach'
9-
import { Message, MessageTypes } from '../src/message-types.js'
8+
import { pipe } from 'it-pipe'
9+
import toBuffer from 'it-to-buffer'
10+
import { Uint8ArrayList } from 'uint8arraylist'
1011
import { encode } from '../src/encode.js'
12+
import { type Message, MessageTypes } from '../src/message-types.js'
1113
import { decode } from './fixtures/decode.js'
12-
import { Uint8ArrayList } from 'uint8arraylist'
13-
import toBuffer from 'it-to-buffer'
1414

1515
describe('restrict size', () => {
1616
it('should throw when size is too big', async () => {
@@ -57,7 +57,7 @@ describe('restrict size', () => {
5757
input,
5858
encode,
5959
decode(32),
60-
async (source) => await all(source)
60+
async (source) => all(source)
6161
)
6262
expect(output).to.deep.equal(input[0])
6363
})

test/stream.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
/* eslint-env mocha */
22

33
import { expect } from 'aegir/chai'
4-
import { pipe } from 'it-pipe'
4+
import * as cborg from 'cborg'
55
import randomBytes from 'iso-random-stream/src/random.js'
6-
import randomInt from 'random-int'
7-
import each from 'it-foreach'
86
import drain from 'it-drain'
7+
import each from 'it-foreach'
98
import map from 'it-map'
9+
import { pipe } from 'it-pipe'
1010
import defer from 'p-defer'
11-
import * as cborg from 'cborg'
12-
import { createStream } from '../src/stream.js'
13-
import { MessageTypes, MessageTypeNames } from '../src/message-types.js'
11+
import randomInt from 'random-int'
12+
import { Uint8ArrayList } from 'uint8arraylist'
1413
import { fromString as uint8ArrayFromString } from 'uint8arrays'
14+
import { MessageTypes, MessageTypeNames } from '../src/message-types.js'
15+
import { createStream } from '../src/stream.js'
1516
import { messageWithBytes } from './fixtures/utils.js'
1617
import type { Message } from '../src/message-types.js'
1718
import type { MplexStream } from '../src/mplex.js'
18-
import { Uint8ArrayList } from 'uint8arraylist'
1919

2020
function randomInput (min = 1, max = 100): Uint8ArrayList[] {
2121
return Array.from(Array(randomInt(min, max)), () => new Uint8ArrayList(randomBytes(randomInt(1, 128))))

0 commit comments

Comments
 (0)