File tree Expand file tree Collapse file tree 5 files changed +1
-64
lines changed
Expand file tree Collapse file tree 5 files changed +1
-64
lines changed Original file line number Diff line number Diff line change 101101 "@xterm/addon-fit" : " 0.11.0" ,
102102 "@xterm/xterm" : " 6.0.0" ,
103103 "ansis" : " 4.2.0" ,
104- "dompurify" : " 3.3.3 " ,
104+ "dompurify" : " 3.4.0 " ,
105105 "fast-string-truncated-width" : " 1.2.1" ,
106106 "fast-string-width" : " 1.1.0" ,
107107 "fast-wrap-ansi" : " 0.1.6" ,
Original file line number Diff line number Diff line change 6565 "devDependencies" : {
6666 "@types/split2" : " catalog:types" ,
6767 "@types/splitpanes" : " catalog:types" ,
68- "@types/stream-json" : " catalog:types" ,
6968 "@unocss/nuxt" : " catalog:build" ,
7069 "@vueuse/components" : " catalog:frontend" ,
7170 "@vueuse/core" : " catalog:frontend" ,
8180 "modern-monaco" : " catalog:frontend" ,
8281 "nanovis" : " catalog:frontend" ,
8382 "splitpanes" : " catalog:frontend" ,
84- "stream-json" : " catalog:inlined" ,
8583 "theme-vitesse" : " catalog:frontend" ,
8684 "tsdown" : " catalog:build" ,
8785 "unocss" : " catalog:build" ,
121119 "read-yaml-file" : " 2.1.0" ,
122120 "semver" : " 7.7.4" ,
123121 "signal-exit" : " 4.1.0" ,
124- "stream-json" : " 1.9.1" ,
125122 "strip-bom" : " 4.0.0" ,
126123 "strip-comments-strings" : " 1.2.0" ,
127124 "write-file-atomic" : " 5.0.1" ,
Original file line number Diff line number Diff line change 11import { pipeline } from 'node:stream/promises'
22import split2 from 'split2'
3- import StreamJSON from 'stream-json'
4- import Assembler from 'stream-json/Assembler'
53import { logger } from '../diagnostics'
64
75export class JsonParseStreamError extends Error {
@@ -13,23 +11,6 @@ export class JsonParseStreamError extends Error {
1311 }
1412}
1513
16- export function parseJsonStream < T > (
17- stream : NodeJS . ReadableStream ,
18- ) : Promise < T > {
19- const assembler = new Assembler ( )
20- const parser = StreamJSON . parser ( )
21-
22- return new Promise < T > ( ( resolve ) => {
23- parser . on ( 'data' , ( chunk ) => {
24- ( assembler as any ) [ chunk . name ] ?.( chunk . value )
25- } )
26- stream . pipe ( parser )
27- parser . on ( 'end' , ( ) => {
28- resolve ( assembler . current )
29- } )
30- } )
31- }
32-
3314export async function parseJsonStreamWithConcatArrays < T , K = T > (
3415 stream : NodeJS . ReadableStream ,
3516 processor ?: ( value : T ) => K ,
Original file line number Diff line number Diff line change @@ -159,7 +159,6 @@ catalogs:
159159 ' @clack/prompts ' : ^1.2.0
160160 human-id : ^4.1.3
161161 immer : ^11.1.4
162- stream-json : ^2.1.0
163162 playground :
164163 vite-plugin-vue-tracer : ^1.3.0
165164 vue-router : ^5.0.4
@@ -181,7 +180,6 @@ catalogs:
181180 ' @types/react-dom ' : ^19.2.3
182181 ' @types/split2 ' : ^4.2.3
183182 ' @types/splitpanes ' : ^2.2.6
184- ' @types/stream-json ' : ^1.7.8
185183 ' @types/ws ' : ^8.18.1
186184onlyBuiltDependencies :
187185 - ' @parcel/watcher'
You can’t perform that action at this time.
0 commit comments