Skip to content

Commit

Permalink
fix: parse using latest ecma version
Browse files Browse the repository at this point in the history
  • Loading branch information
janvennemann committed Nov 26, 2023
1 parent 2abf8ca commit 61f0ccf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
],
"dependencies": {
"@rollup/plugin-node-resolve": "^15.2.3",
"acorn": "^8.2.4",
"acorn": "^8.11.2",
"alloy-compiler": "0.2.7",
"alloy-utils": "^0.2.7",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion src/node/utils/dynamicRequire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export async function createDynamicRequireContext(
}

function dynamicRequireToGlob(requireExpression: string): string | null {
const ast = acorn.parse(requireExpression, { ecmaVersion: 10 });
const ast = acorn.parse(requireExpression, { ecmaVersion: 'latest' });
let glob: string | null = null;

walk(ast, {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1760,10 +1760,10 @@ acorn-jsx@^5.3.2:
resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==

acorn@^8.2.4:
version "8.2.4"
resolved "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz"
integrity sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==
acorn@^8.11.2:
version "8.11.2"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b"
integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==

acorn@^8.8.0:
version "8.8.2"
Expand Down

0 comments on commit 61f0ccf

Please sign in to comment.