+20
-0
@@ -0,1 +1,21 @@ | ||
| ## 8.0.0 (2020-08-12) | ||
| ### Bug fixes | ||
| Disallow expressions like `(a = b) = c`. | ||
| Make non-octal escape sequences a syntax error in strict mode. | ||
| ### New features | ||
| The package can now be loaded directly as an ECMAScript module in node 13+. | ||
| Update to the set of Unicode properties from ES2021. | ||
| ### Breaking changes | ||
| The `ecmaVersion` option is now required. For the moment, omitting it will still work with a warning, but that will change in a future release. | ||
| Some changes to method signatures that may be used by plugins. | ||
| ## 7.4.0 (2020-08-03) | ||
@@ -2,0 +22,0 @@ |
+5
-1
@@ -8,3 +8,7 @@ { | ||
| "module": "dist/acorn.mjs", | ||
| "version": "7.4.0", | ||
| "exports": { | ||
| "import": "./dist/acorn.mjs", | ||
| "require": "./dist/acorn.js" | ||
| }, | ||
| "version": "8.0.0", | ||
| "engines": {"node": ">=0.4.0"}, | ||
@@ -11,0 +15,0 @@ "maintainers": [ |
+14
-13
@@ -35,5 +35,5 @@ # Acorn | ||
| **parse**`(input, options)` is the main interface to the library. The | ||
| `input` parameter is a string, `options` can be undefined or an object | ||
| setting some of the options listed below. The return value will be an | ||
| abstract syntax tree object as specified by the [ESTree | ||
| `input` parameter is a string, `options` must be an object setting | ||
| some of the options listed below. The return value will be an abstract | ||
| syntax tree object as specified by the [ESTree | ||
| spec](https://github.com/estree/estree). | ||
@@ -43,3 +43,3 @@ | ||
| let acorn = require("acorn"); | ||
| console.log(acorn.parse("1 + 1")); | ||
| console.log(acorn.parse("1 + 1", {ecmaVersion: 2020})); | ||
| ``` | ||
@@ -53,14 +53,15 @@ | ||
| Options can be provided by passing a second argument, which should be | ||
| an object containing any of these fields: | ||
| Options are provided by in a second argument, which should be an | ||
| object containing any of these fields (only `ecmaVersion` is | ||
| required): | ||
| - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be | ||
| either 3, 5, 6 (2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019) or 11 | ||
| (2020, partial support). This influences support for strict mode, | ||
| the set of reserved words, and support for new syntax features. | ||
| Default is 10. | ||
| either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019), | ||
| 11 (2020), or 12 (2021, partial support), or `"latest"` (the latest | ||
| the library supports). This influences support for strict mode, the | ||
| set of reserved words, and support for new syntax features. | ||
| **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being | ||
| implemented by Acorn. Other proposed new features can be implemented | ||
| through plugins. | ||
| implemented by Acorn. Other proposed new features must be | ||
| implemented through plugins. | ||
@@ -230,3 +231,3 @@ - **sourceType**: Indicate the mode the code should be parsed in. Can be | ||
| var JSXParser = acorn.Parser.extend(jsx()); | ||
| JSXParser.parse("foo(<bar/>)"); | ||
| JSXParser.parse("foo(<bar/>)", {ecmaVersion: 2020}); | ||
| ``` | ||
@@ -233,0 +234,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1129952
0.86%9620
2.14%271
0.37%