Skip to content

Commit 21e2a6a

Browse files
committed
dep: updating @streamparser/json to ^0.0.13
[ci skip]
1 parent 5be841a commit 21e2a6a

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
"devDependencies": {
129129
"@babel/preset-env": "^7.13.10",
130130
"@fast-check/jest": "^1.1.0",
131-
"@streamparser/json": "^0.0.12",
131+
"@streamparser/json": "^0.0.13",
132132
"@swc/core": "^1.2.215",
133133
"@types/cross-spawn": "^6.0.2",
134134
"@types/google-protobuf": "^3.7.4",

src/rpc/utils/middleware.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import type {
66
MiddlewareFactory,
77
} from '../types';
88
import { TransformStream } from 'stream/web';
9+
import { JSONParser } from '@streamparser/json';
910
import * as rpcUtils from './utils';
1011
import * as rpcErrors from '../errors';
1112
import { promise } from '../../utils/index';
12-
const jsonStreamParsers = require('@streamparser/json');
1313

1414
/**
1515
* This function is a factory to create a TransformStream that will
@@ -25,7 +25,7 @@ function binaryToJsonMessageStream<T extends JSONRPCMessage>(
2525
messageParser: (message: unknown) => T,
2626
byteLimit: number = 1024 * 1024,
2727
): TransformStream<Uint8Array, T> {
28-
const parser = new jsonStreamParsers.JSONParser({
28+
const parser = new JSONParser({
2929
separator: '',
3030
paths: ['$'],
3131
});

0 commit comments

Comments
 (0)