Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update uint8-varint to 2.0.0 #81

Merged
merged 3 commits into from
Aug 16, 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 packages/it-length-prefixed-stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"it-byte-stream": "^1.0.0",
"it-length-prefixed": "^9.0.1",
"it-stream-types": "^2.0.1",
"uint8-varint": "^1.0.6",
"uint8-varint": "^2.0.1",
"uint8arraylist": "^2.4.1"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/it-length-prefixed-stream/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import { byteStream } from 'it-byte-stream'
import * as lp from 'it-length-prefixed'
import { unsigned } from 'uint8-varint'
import * as varint from 'uint8-varint'
import { Uint8ArrayList } from 'uint8arraylist'
import type { Duplex } from 'it-stream-types'

Expand Down Expand Up @@ -66,7 +66,7 @@ export interface LengthPrefixedStreamOpts {
}

const defaultLengthDecoder: lp.LengthDecoderFunction = (buf) => {
return unsigned.decode(buf)
return varint.decode(buf)
}
defaultLengthDecoder.bytes = 0

Expand Down
2 changes: 1 addition & 1 deletion packages/it-protobuf-stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
"it-length-prefixed-stream": "^1.0.0",
"it-stream-types": "^2.0.1",
"protons-runtime": "^5.0.0",
"uint8-varint": "^1.0.6",
"uint8arraylist": "^2.4.1"
},
"devDependencies": {
Expand All @@ -146,6 +145,7 @@
"it-pair": "^2.0.2",
"it-to-buffer": "^4.0.0",
"protons": "^7.0.2",
"uint8-varint": "^2.0.1",
"uint8arrays": "^4.0.2"
},
"engines": {
Expand Down
6 changes: 3 additions & 3 deletions packages/it-protobuf-stream/test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect } from 'aegir/chai'
import map from 'it-map'
import { pair } from 'it-pair'
import toBuffer from 'it-to-buffer'
import { unsigned } from 'uint8-varint'
import * as varint from 'uint8-varint'
import { concat as uint8ArrayConcat } from 'uint8arrays/concat'
import { pbStream } from '../src/index.js'
import { TestMessage } from './fixtures/test-message.js'
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('it-protobuf-stream', () => {
const w = pbStream({
source: (async function * () {
yield uint8ArrayConcat([
unsigned.encode(messageBuf.byteLength),
varint.encode(messageBuf.byteLength),
messageBuf,
extraData
])
Expand All @@ -90,7 +90,7 @@ describe('it-protobuf-stream', () => {

const w = pbStream({
source: (async function * () {
yield unsigned.encode(messageBuf.byteLength)
yield varint.encode(messageBuf.byteLength)
yield messageBuf
yield extraData
}()),
Expand Down
Loading