Skip to content

Commit

Permalink
Merge pull request #173 from davidchambers/ecma-version
Browse files Browse the repository at this point in the history
change `ecmaVersion` from `2020` to `2023`
  • Loading branch information
davidchambers authored Dec 10, 2023
2 parents 4fdb585 + 90c1b62 commit 27af5b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/doctest.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const wrapJs = sourceType => test => {
const source = formatInput (0) (test.input.lines);
const ast = acorn.parse (
source.startsWith ('{') && source.endsWith ('}') ? `(${source})` : source,
{ecmaVersion: 2020, sourceType}
{ecmaVersion: 2023, sourceType}
);
const {type} = ast.body[0];
if (type !== 'ExpressionStatement') return source;
Expand Down Expand Up @@ -260,7 +260,7 @@ const rewriteJs = sourceType => ({
const getComments = input => {
const comments = [];
acorn.parse (input, {
ecmaVersion: 2020,
ecmaVersion: 2023,
sourceType,
locations: true,
onComment: comments,
Expand Down

0 comments on commit 27af5b4

Please sign in to comment.