Skip to content

Commit

Permalink
change ecmaVersion from 2020 to 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
davidchambers committed Dec 10, 2023
1 parent 4fdb585 commit 90c1b62
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 90c1b62

Please sign in to comment.