| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,13 @@ | |||
| 1 | + ## 8.11.3 (2023-12-29) | ||
| 2 | + | ||
| 3 | + ### Bug fixes | ||
| 4 | + | ||
| 5 | + Add `Function` and `Class` to the `AggregateType` type, so that they can be used in walkers without raising a type error. | ||
| 6 | + | ||
| 7 | + Make sure `onToken` get an `import` keyword token when parsing `import.meta`. | ||
| 8 | + | ||
| 9 | + Fix a bug where `.loc.start` could be undefined for `new.target` `meta` nodes. | ||
| 10 | + | ||
| 1 | 11 | ## 8.11.2 (2023-10-27) | |
| 2 | 12 | ||
| 3 | 13 | ### Bug fixes | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2942,12 +2942,14 @@ | |||
| 2942 | 2942 | // Consume `import` as an identifier for `import.meta`. | |
| 2943 | 2943 | // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. | |
| 2944 | 2944 | if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } | |
| 2945 | - var meta = this.parseIdent(true); | ||
| 2945 | + this.next(); | ||
| 2946 | 2946 | ||
| 2947 | 2947 | if (this.type === types$1.parenL && !forNew) { | |
| 2948 | 2948 | return this.parseDynamicImport(node) | |
| 2949 | 2949 | } else if (this.type === types$1.dot) { | |
| 2950 | - node.meta = meta; | ||
| 2950 | + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); | ||
| 2951 | + meta.name = "import"; | ||
| 2952 | + node.meta = this.finishNode(meta, "Identifier"); | ||
| 2951 | 2953 | return this.parseImportMeta(node) | |
| 2952 | 2954 | } else { | |
| 2953 | 2955 | this.unexpected(); | |
@@ -3097,7 +3099,7 @@ | |||
| 3097 | 3099 | var node = this.startNode(); | |
| 3098 | 3100 | this.next(); | |
| 3099 | 3101 | if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) { | |
| 3100 | - var meta = this.startNodeAt(node.start, node.startLoc); | ||
| 3102 | + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); | ||
| 3101 | 3103 | meta.name = "new"; | |
| 3102 | 3104 | node.meta = this.finishNode(meta, "Identifier"); | |
| 3103 | 3105 | this.next(); | |
@@ -5925,7 +5927,7 @@ | |||
| 5925 | 5927 | // [walk]: util/walk.js | |
| 5926 | 5928 | ||
| 5927 | 5929 | ||
| 5928 | - var version = "8.11.2"; | ||
| 5930 | + var version = "8.11.3"; | ||
| 5929 | 5931 | ||
| 5930 | 5932 | Parser.acorn = { | |
| 5931 | 5933 | Parser: Parser, | |
@@ -5950,11 +5952,10 @@ | |||
| 5950 | 5952 | }; | |
| 5951 | 5953 | ||
| 5952 | 5954 | // The main exported interface (under `self.acorn` when in the | |
| 5953 | - // browser) is a `parse` function that takes a code string and | ||
| 5954 | - // returns an abstract syntax tree as specified by [Mozilla parser | ||
| 5955 | - // API][api]. | ||
| 5955 | + // browser) is a `parse` function that takes a code string and returns | ||
| 5956 | + // an abstract syntax tree as specified by the [ESTree spec][estree]. | ||
| 5956 | 5957 | // | |
| 5957 | - // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API | ||
| 5958 | + // [estree]: https://github.com/estree/estree | ||
| 5958 | 5959 | ||
| 5959 | 5960 | function parse(input, options) { | |
| 5960 | 5961 | return Parser.parse(input, options) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2936,12 +2936,14 @@ pp$5.parseExprImport = function(forNew) { | |||
| 2936 | 2936 | // Consume `import` as an identifier for `import.meta`. | |
| 2937 | 2937 | // Because `this.parseIdent(true)` doesn't check escape sequences, it needs the check of `this.containsEsc`. | |
| 2938 | 2938 | if (this.containsEsc) { this.raiseRecoverable(this.start, "Escape sequence in keyword import"); } | |
| 2939 | - var meta = this.parseIdent(true); | ||
| 2939 | + this.next(); | ||
| 2940 | 2940 | ||
| 2941 | 2941 | if (this.type === types$1.parenL && !forNew) { | |
| 2942 | 2942 | return this.parseDynamicImport(node) | |
| 2943 | 2943 | } else if (this.type === types$1.dot) { | |
| 2944 | - node.meta = meta; | ||
| 2944 | + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); | ||
| 2945 | + meta.name = "import"; | ||
| 2946 | + node.meta = this.finishNode(meta, "Identifier"); | ||
| 2945 | 2947 | return this.parseImportMeta(node) | |
| 2946 | 2948 | } else { | |
| 2947 | 2949 | this.unexpected(); | |
@@ -3091,7 +3093,7 @@ pp$5.parseNew = function() { | |||
| 3091 | 3093 | var node = this.startNode(); | |
| 3092 | 3094 | this.next(); | |
| 3093 | 3095 | if (this.options.ecmaVersion >= 6 && this.type === types$1.dot) { | |
| 3094 | - var meta = this.startNodeAt(node.start, node.startLoc); | ||
| 3096 | + var meta = this.startNodeAt(node.start, node.loc && node.loc.start); | ||
| 3095 | 3097 | meta.name = "new"; | |
| 3096 | 3098 | node.meta = this.finishNode(meta, "Identifier"); | |
| 3097 | 3099 | this.next(); | |
@@ -5919,7 +5921,7 @@ pp.readWord = function() { | |||
| 5919 | 5921 | // [walk]: util/walk.js | |
| 5920 | 5922 | ||
| 5921 | 5923 | ||
| 5922 | - var version = "8.11.2"; | ||
| 5924 | + var version = "8.11.3"; | ||
| 5923 | 5925 | ||
| 5924 | 5926 | Parser.acorn = { | |
| 5925 | 5927 | Parser: Parser, | |
@@ -5944,11 +5946,10 @@ Parser.acorn = { | |||
| 5944 | 5946 | }; | |
| 5945 | 5947 | ||
| 5946 | 5948 | // The main exported interface (under `self.acorn` when in the | |
| 5947 | - // browser) is a `parse` function that takes a code string and | ||
| 5948 | - // returns an abstract syntax tree as specified by [Mozilla parser | ||
| 5949 | - // API][api]. | ||
| 5949 | + // browser) is a `parse` function that takes a code string and returns | ||
| 5950 | + // an abstract syntax tree as specified by the [ESTree spec][estree]. | ||
| 5950 | 5951 | // | |
| 5951 | - // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API | ||
| 5952 | + // [estree]: https://github.com/estree/estree | ||
| 5952 | 5953 | ||
| 5953 | 5954 | function parse(input, options) { | |
| 5954 | 5955 | return Parser.parse(input, options) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ | |||
| 16 | 16 | ], | |
| 17 | 17 | "./package.json": "./package.json" | |
| 18 | 18 | }, | |
| 19 | - "version": "8.11.2", | ||
| 19 | + "version": "8.11.3", | ||
| 20 | 20 | "engines": { | |
| 21 | 21 | "node": ">=0.4.0" | |
| 22 | 22 | }, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,5 +2,5 @@ | |||
| 2 | 2 | // Refer to tools/dep_updaters/update-acorn.sh | |
| 3 | 3 | #ifndef SRC_ACORN_VERSION_H_ | |
| 4 | 4 | #define SRC_ACORN_VERSION_H_ | |
| 5 | - #define ACORN_VERSION "8.11.2" | ||
| 5 | + #define ACORN_VERSION "8.11.3" | ||
| 6 | 6 | #endif // SRC_ACORN_VERSION_H_ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments