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: Bump sax-wasm from 2.2.4 to 2.3.2 #459

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 77,7 @@
"he": "^1.2.0",
"json-source-map": "^0.6.1",
"minimatch": "^10.0.1",
"sax-wasm": "^2.2.4",
"sax-wasm": "^2.3.2",
"typescript": "^5.7.2",
"update-notifier": "^7.3.1",
"yargs": "^17.7.2"
Expand Down
5 changes: 1 addition & 4 deletions src/linter/xmlTemplate/transpiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions src/utils/xmlParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Loading