From 925a577ac990fe80a24cd673730b89e1d404d838 Mon Sep 17 00:00:00 2001 From: Merlin Beutlberger Date: Fri, 3 Jan 2025 13:33:18 +0100 Subject: [PATCH] fix(sax-wasm): Remove obsolete 'options' parameter --- src/linter/xmlTemplate/transpiler.ts | 5 +---- src/utils/xmlParser.ts | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/linter/xmlTemplate/transpiler.ts b/src/linter/xmlTemplate/transpiler.ts index 9d36a52db..37bb31e8b 100644 --- a/src/linter/xmlTemplate/transpiler.ts +++ b/src/linter/xmlTemplate/transpiler.ts @@ -62,10 +62,7 @@ async function transpileXmlToJs( const parser = new Parser(resourcePath, apiExtract, context, controllerByIdInfo); // Initialize parser - const options = {highWaterMark: 32 * 1024}; // 32k chunks - const saxParser = new SAXParser( - SaxEventType.OpenTag | SaxEventType.CloseTag, - options); + const saxParser = new SAXParser(SaxEventType.OpenTag | SaxEventType.CloseTag); saxParser.eventHandler = (event, tag) => { if (tag instanceof SaxTag) { diff --git a/src/utils/xmlParser.ts b/src/utils/xmlParser.ts index 4e1f142ca..d3ded9376 100644 --- a/src/utils/xmlParser.ts +++ b/src/utils/xmlParser.ts @@ -16,9 +16,8 @@ async function initSaxWasm() { } export async function parseXML(contentStream: ReadStream, parseHandler: (type: SaxEventType, tag: Detail) => void) { - const options = {highWaterMark: 32 * 1024}; // 32k chunks const saxWasmBuffer = await initSaxWasm(); - const saxParser = new SAXParser(SaxEventType.CloseTag + SaxEventType.OpenTag, options); + const saxParser = new SAXParser(SaxEventType.CloseTag + SaxEventType.OpenTag); saxParser.eventHandler = parseHandler;