mirror of https://github.com/nodejs/node.git
deps: update acorn to 8.11.3
PR-URL: https://github.com/nodejs/node/pull/51317 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>pull/51343/head
parent
5fb6305971
commit
d85c3e859b
|
@ -1,3 +1,13 @@
|
|||
## 8.11.3 (2023-12-29)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error.
|
||||
|
||||
Make sure `onToken` get an `import` keyword token when parsing `import.meta`.
|
||||
|
||||
Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes.
|
||||
|
||||
## 8.11.2 (2023-10-27)
|
||||
|
||||
### Bug fixes
|
||||
|
|
|
@ -2942,12 +2942,14 @@
|
|||
// Consume `import` as an identifier for `import.meta`.
|
||||
// Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.
|
||||
if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); }
|
||||
var meta = this.parseIdent(true);
|
||||
this.next();
|
||||
|
||||
if (this.type === types$1.parenL && !forNew) {
|
||||
return this.parseDynamicImport(node)
|
||||
} else if (this.type === types$1.dot) {
|
||||
node.meta = meta;
|
||||
var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
|
||||
meta.name = "import";
|
||||
node.meta = this.finishNode(meta, "Identifier");
|
||||
return this.parseImportMeta(node)
|
||||
} else {
|
||||
this.unexpected();
|
||||
|
@ -3097,7 +3099,7 @@
|
|||
var node = this.startNode();
|
||||
this.next();
|
||||
if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) {
|
||||
var meta = this.startNodeAt(node.start, node.startLoc);
|
||||
var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
|
||||
meta.name = "new";
|
||||
node.meta = this.finishNode(meta, "Identifier");
|
||||
this.next();
|
||||
|
@ -5925,7 +5927,7 @@
|
|||
// [walk]: util/walk.js
|
||||
|
||||
|
||||
var version = "8.11.2";
|
||||
var version = "8.11.3";
|
||||
|
||||
Parser.acorn = {
|
||||
Parser: Parser,
|
||||
|
@ -5950,11 +5952,10 @@
|
|||
};
|
||||
|
||||
// The main exported interface (under `self.acorn` when in the
|
||||
// browser) is a `parse` function that takes a code string and
|
||||
// returns an abstract syntax tree as specified by [Mozilla parser
|
||||
// API][api].
|
||||
// browser) is a `parse` function that takes a code string and returns
|
||||
// an abstract syntax tree as specified by the [ESTree spec][estree].
|
||||
//
|
||||
// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
|
||||
// [estree]: https://github.com/estree/estree
|
||||
|
||||
function parse(input, options) {
|
||||
return Parser.parse(input, options)
|
||||
|
|
|
@ -2936,12 +2936,14 @@ pp$5.parseExprImport = function(forNew) {
|
|||
// Consume `import` as an identifier for `import.meta`.
|
||||
// Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`.
|
||||
if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); }
|
||||
var meta = this.parseIdent(true);
|
||||
this.next();
|
||||
|
||||
if (this.type === types$1.parenL && !forNew) {
|
||||
return this.parseDynamicImport(node)
|
||||
} else if (this.type === types$1.dot) {
|
||||
node.meta = meta;
|
||||
var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
|
||||
meta.name = "import";
|
||||
node.meta = this.finishNode(meta, "Identifier");
|
||||
return this.parseImportMeta(node)
|
||||
} else {
|
||||
this.unexpected();
|
||||
|
@ -3091,7 +3093,7 @@ pp$5.parseNew = function() {
|
|||
var node = this.startNode();
|
||||
this.next();
|
||||
if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) {
|
||||
var meta = this.startNodeAt(node.start, node.startLoc);
|
||||
var meta = this.startNodeAt(node.start, node.loc && node.loc.start);
|
||||
meta.name = "new";
|
||||
node.meta = this.finishNode(meta, "Identifier");
|
||||
this.next();
|
||||
|
@ -5919,7 +5921,7 @@ pp.readWord = function() {
|
|||
// [walk]: util/walk.js
|
||||
|
||||
|
||||
var version = "8.11.2";
|
||||
var version = "8.11.3";
|
||||
|
||||
Parser.acorn = {
|
||||
Parser: Parser,
|
||||
|
@ -5944,11 +5946,10 @@ Parser.acorn = {
|
|||
};
|
||||
|
||||
// The main exported interface (under `self.acorn` when in the
|
||||
// browser) is a `parse` function that takes a code string and
|
||||
// returns an abstract syntax tree as specified by [Mozilla parser
|
||||
// API][api].
|
||||
// browser) is a `parse` function that takes a code string and returns
|
||||
// an abstract syntax tree as specified by the [ESTree spec][estree].
|
||||
//
|
||||
// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
|
||||
// [estree]: https://github.com/estree/estree
|
||||
|
||||
function parse(input, options) {
|
||||
return Parser.parse(input, options)
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
],
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"version": "8.11.2",
|
||||
"version": "8.11.3",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
},
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
// Refer to tools/dep_updaters/update-acorn.sh
|
||||
#ifndef SRC_ACORN_VERSION_H_
|
||||
#define SRC_ACORN_VERSION_H_
|
||||
#define ACORN_VERSION "8.11.2"
|
||||
#define ACORN_VERSION "8.11.3"
|
||||
#endif // SRC_ACORN_VERSION_H_
|
||||
|
|
Loading…
Reference in New Issue