acorn
Advanced tools
Comparing version 8.0.5 to 8.1.0
@@ -0,1 +1,13 @@ | ||
## 8.1.0 (2021-03-09) | ||
### Bug fixes | ||
Fix a spurious error in nested destructuring arrays. | ||
### New features | ||
Expose `allowAwaitOutsideFunction` in CLI interface. | ||
Make `allowImportExportAnywhere` also apply to `import.meta`. | ||
## 8.0.5 (2021-01-25) | ||
@@ -2,0 +14,0 @@ |
@@ -13,3 +13,3 @@ 'use strict'; | ||
print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|--ecma8|--ecma9|...|--ecma2015|--ecma2016|--ecma2017|--ecma2018|...]"); | ||
print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]"); | ||
print(" [--tokenize] [--locations] [---allow-hash-bang] [--allow-await-outside-function] [--compact] [--silent] [--module] [--help] [--] [infile]"); | ||
process.exit(status); | ||
@@ -24,2 +24,3 @@ } | ||
else if (arg === "--allow-hash-bang") { options.allowHashBang = true; } | ||
else if (arg === "--allow-await-outside-function") { options.allowAwaitOutsideFunction = true; } | ||
else if (arg === "--silent") { silent = true; } | ||
@@ -26,0 +27,0 @@ else if (arg === "--compact") { compact = true; } |
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "8.0.5", | ||
"version": "8.1.0", | ||
"engines": {"node": ">=0.4.0"}, | ||
@@ -22,0 +22,0 @@ "maintainers": [ |
@@ -93,4 +93,6 @@ # Acorn | ||
declarations can only appear at a program's top level. Setting this | ||
option to `true` allows them anywhere where a statement is allowed. | ||
option to `true` allows them anywhere where a statement is allowed, | ||
and also allows `import.meta` expressions to appear in scripts | ||
(when `sourceType` is not `"module"`). | ||
- **allowAwaitOutsideFunction**: By default, `await` expressions can | ||
@@ -254,2 +256,5 @@ only appear inside `async` functions. Setting this option to | ||
- `--allow-await-outside-function`: Allows top-level `await` expressions. | ||
See the `allowAwaitOutsideFunction` option for more information. | ||
- `--compact`: No whitespace is used in the AST output. | ||
@@ -256,0 +261,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1222450
9627
276