Skip to content

Commit

Permalink
feat(providence): run swc and oxc async parsers for better perf
Browse files Browse the repository at this point in the history
  • Loading branch information
tlouisse committed Feb 6, 2025
1 parent 6780ce2 commit 3a99f3b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,11 @@ export class AstService {
}
}

const ast = swcParser.parseSync(code, {
return swcParser.parse(code, {
syntax: 'typescript',
target: 'es2022',
...parserOptions,
});
return ast;
}

/**
Expand All @@ -94,7 +93,7 @@ export class AstService {
}

// we can only send stringified data with napi
return oxcParser.parseSync(filePath, code, parserOptions);
return oxcParser.parseAsync(filePath, code, parserOptions);
}

/**
Expand Down

0 comments on commit 3a99f3b

Please sign in to comment.