Skip to content

Commit

Permalink
Bump meriyah
Browse files Browse the repository at this point in the history
  • Loading branch information
eoftedal committed Dec 11, 2024
1 parent ca507d4 commit 131a617
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
10 changes: 5 additions & 5 deletions package-lock.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 @@ -33,7 +33,7 @@
"typescript": "^5.3.3"
},
"dependencies": {
"meriyah": "^4.3.9"
"meriyah": "^6.0.3"
},
"files": [
"lib/**/*"
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,9 @@ export function multiQuery<T extends Record<string, string>>(code: string | ASTN

export function parseSource(source: string) : ASTNode {
try {
return parseScript(source, { module: true, next: true, specDeviation: true});
return parseScript(source, { module: true, next: true });
} catch(e) {
return parseScript(source, { module: false, next: true, specDeviation: true});
return parseScript(source, { module: false, next: true });
}
}

Expand Down
1 change: 1 addition & 0 deletions src/nodeutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export const VISITOR_KEYS: Record<ESTree.Node["type"], string[]> = {
FunctionExpression: ["id", "params", "body"],
Identifier: [],
IfStatement: ["test", "consequent", "alternate"],
ImportAttribute: ["key", "value"],
ImportDeclaration: ["specifiers", "source"],
ImportDefaultSpecifier: ["local"],
ImportNamespaceSpecifier: ["local"],
Expand Down

0 comments on commit 131a617

Please sign in to comment.