From ba5921d8da802fbb95fbb81b992d283b5cc4ff82 Mon Sep 17 00:00:00 2001 From: Oleg Nechaev Date: Sat, 11 Jun 2022 04:30:13 +0200 Subject: [PATCH] update acorn --- package.json | 2 +- src/bundler/compiler.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 500a88e..3ea92eb 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "update": "npm install -D https://github.com/malinajs/malinajs.git" }, "devDependencies": { - "acorn": "^8.4.1", + "acorn": "^8.7.1", "astring": "^1.8.1", "cjs2es": "^1.1.0", "codejar": "^3.5.0", diff --git a/src/bundler/compiler.js b/src/bundler/compiler.js index 8a5ad02..199a1d2 100644 --- a/src/bundler/compiler.js +++ b/src/bundler/compiler.js @@ -41,6 +41,6 @@ async function treeshake(code){ function pretify(code){ console.log(code); - let ast = acorn.parse(code, {sourceType: 'module', ecmaVersion:2020}); + let ast = acorn.parse(code, {sourceType: 'module', ecmaVersion: 'latest'}); return astring.generate(ast); }