Skip to content

Commit

Permalink
deps: update acorn to 8.11.3
Browse files Browse the repository at this point in the history
PR-URL: #51317
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
nodejs-github-bot authored and RafaelGSS committed Jan 2, 2024
1 parent 2eb41f8 commit 24a9a72
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 18 deletions.
10 changes: 10 additions & 0 deletions deps/acorn/acorn/CHANGELOG.md
@@ -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
Expand Down
17 changes: 9 additions & 8 deletions deps/acorn/acorn/dist/acorn.js
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -5925,7 +5927,7 @@
// [walk]: util/walk.js


var version = "8.11.2";
var version = "8.11.3";

Parser.acorn = {
Parser: Parser,
Expand All @@ -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)
Expand Down
17 changes: 9 additions & 8 deletions deps/acorn/acorn/dist/acorn.mjs
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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,
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion deps/acorn/acorn/package.json
Expand Up @@ -16,7 +16,7 @@
],
"./package.json": "./package.json"
},
"version": "8.11.2",
"version": "8.11.3",
"engines": {
"node": ">=0.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/acorn_version.h
Expand Up @@ -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_

0 comments on commit 24a9a72

Please sign in to comment.