| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -55,7 +55,7 @@ The externally maintained libraries used by Node.js are: | |||
| 55 | 55 | """ | |
| 56 | 56 | MIT License | |
| 57 | 57 | ||
| 58 | - Copyright (C) 2012-2020 by various contributors (see AUTHORS) | ||
| 58 | + Copyright (C) 2012-2022 by various contributors (see AUTHORS) | ||
| 59 | 59 | ||
| 60 | 60 | Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 61 | 61 | of this software and associated documentation files (the "Software"), to deal | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,25 @@ | |||
| 1 | + ## 8.8.0 (2022-07-21) | ||
| 2 | + | ||
| 3 | + ### Bug fixes | ||
| 4 | + | ||
| 5 | + Allow parentheses around spread args in destructuring object assignment. | ||
| 6 | + | ||
| 7 | + Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them. | ||
| 8 | + | ||
| 9 | + ### New features | ||
| 10 | + | ||
| 11 | + Support hashbang comments by default in ECMAScript 2023 and later. | ||
| 12 | + | ||
| 13 | + ## 8.7.1 (2021-04-26) | ||
| 14 | + | ||
| 15 | + ### Bug fixes | ||
| 16 | + | ||
| 17 | + Stop handling `"use strict"` directives in ECMAScript versions before 5. | ||
| 18 | + | ||
| 19 | + Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked. | ||
| 20 | + | ||
| 21 | + Add missing type for `tokTypes`. | ||
| 22 | + | ||
| 1 | 23 | ## 8.7.0 (2021-12-27) | |
| 2 | 24 | ||
| 3 | 25 | ### New features | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | MIT License | |
| 2 | 2 | ||
| 3 | - Copyright (C) 2012-2020 by various contributors (see AUTHORS) | ||
| 3 | + Copyright (C) 2012-2022 by various contributors (see AUTHORS) | ||
| 4 | 4 | ||
| 5 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 6 | 6 | of this software and associated documentation files (the "Software"), to deal | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -54,10 +54,10 @@ required): | |||
| 54 | 54 | ||
| 55 | 55 | - **ecmaVersion**: Indicates the ECMAScript version to parse. Must be | |
| 56 | 56 | either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019), | |
| 57 | - 11 (2020), 12 (2021), 13 (2022, partial support) | ||
| 58 | - or `"latest"` (the latest the library supports). This influences | ||
| 59 | - support for strict mode, the set of reserved words, and support | ||
| 60 | - for new syntax features. | ||
| 57 | + 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the | ||
| 58 | + latest the library supports). This influences support for strict | ||
| 59 | + mode, the set of reserved words, and support for new syntax | ||
| 60 | + features. | ||
| 61 | 61 | ||
| 62 | 62 | **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being | |
| 63 | 63 | implemented by Acorn. Other proposed new features must be | |
@@ -104,9 +104,9 @@ required): | |||
| 104 | 104 | - **allowSuperOutsideMethod**: By default, `super` outside a method | |
| 105 | 105 | raises an error. Set this to `true` to accept such code. | |
| 106 | 106 | ||
| 107 | - - **allowHashBang**: When this is enabled (off by default), if the | ||
| 108 | - code starts with the characters `#!` (as in a shellscript), the | ||
| 109 | - first line will be treated as a comment. | ||
| 107 | + - **allowHashBang**: When this is enabled, if the code starts with the | ||
| 108 | + characters `#!` (as in a shellscript), the first line will be | ||
| 109 | + treated as a comment. Defaults to true when `ecmaVersion` >= 2023. | ||
| 110 | 110 | ||
| 111 | 111 | - **locations**: When `true`, each node has a `loc` object attached | |
| 112 | 112 | with `start` and `end` subobjects, each of which contains the | |
@@ -271,10 +271,3 @@ The utility spits out the syntax tree as JSON data. | |||
| 271 | 271 | ## Existing plugins | |
| 272 | 272 | ||
| 273 | 273 | - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) | |
| 274 | - | ||
| 275 | - Plugins for ECMAScript proposals: | ||
| 276 | - | ||
| 277 | - - [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling: | ||
| 278 | - - [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields) | ||
| 279 | - - [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta) | ||
| 280 | - - [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | 1 | #!/usr/bin/env node | |
| 2 | - 'use strict'; | ||
| 2 | + "use strict" | ||
| 3 | 3 | ||
| 4 | - require('../dist/bin.js'); | ||
| 4 | + require("../dist/bin.js") | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,8 +11,10 @@ declare namespace acorn { | |||
| 11 | 11 | [Symbol.iterator](): Iterator<Token> | |
| 12 | 12 | } | |
| 13 | 13 | ||
| 14 | + type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 'latest' | ||
| 15 | + | ||
| 14 | 16 | interface Options { | |
| 15 | - ecmaVersion: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 'latest' | ||
| 17 | + ecmaVersion: ecmaVersion | ||
| 16 | 18 | sourceType?: 'script' | 'module' | |
| 17 | 19 | onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void | |
| 18 | 20 | onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void | |
@@ -36,8 +38,41 @@ declare namespace acorn { | |||
| 36 | 38 | } | |
| 37 | 39 | ||
| 38 | 40 | class Parser { | |
| 41 | + // state.js | ||
| 42 | + lineStart: number; | ||
| 43 | + options: Options; | ||
| 44 | + curLine: number; | ||
| 45 | + start: number; | ||
| 46 | + end: number; | ||
| 47 | + input: string; | ||
| 48 | + type: TokenType; | ||
| 49 | + | ||
| 50 | + // state.js | ||
| 39 | 51 | constructor(options: Options, input: string, startPos?: number) | |
| 40 | 52 | parse(this: Parser): Node | |
| 53 | + | ||
| 54 | + // tokenize.js | ||
| 55 | + next(): void; | ||
| 56 | + nextToken(): void; | ||
| 57 | + | ||
| 58 | + // statement.js | ||
| 59 | + parseTopLevel(node: Node): Node; | ||
| 60 | + | ||
| 61 | + // node.js | ||
| 62 | + finishNode(node: Node, type: string): Node; | ||
| 63 | + finishNodeAt(node: Node, type: string, pos: number, loc: Position): Node; | ||
| 64 | + | ||
| 65 | + // location.js | ||
| 66 | + raise(pos: number, message: string) : void; | ||
| 67 | + raiseRecoverable?(pos: number, message: string) : void; | ||
| 68 | + | ||
| 69 | + // parseutils.js | ||
| 70 | + unexpected(pos: number) : void; | ||
| 71 | + | ||
| 72 | + // index.js | ||
| 73 | + static acorn: typeof acorn; | ||
| 74 | + | ||
| 75 | + // state.js | ||
| 41 | 76 | static parse(this: typeof Parser, input: string, options: Options): Node | |
| 42 | 77 | static parseExpressionAt(this: typeof Parser, input: string, pos: number, options: Options): Node | |
| 43 | 78 | static tokenizer(this: typeof Parser, input: string, options: Options): { | |
@@ -102,8 +137,10 @@ declare namespace acorn { | |||
| 102 | 137 | colon: TokenType | |
| 103 | 138 | dot: TokenType | |
| 104 | 139 | question: TokenType | |
| 140 | + questionDot: TokenType | ||
| 105 | 141 | arrow: TokenType | |
| 106 | 142 | template: TokenType | |
| 143 | + invalidTemplate: TokenType | ||
| 107 | 144 | ellipsis: TokenType | |
| 108 | 145 | backQuote: TokenType | |
| 109 | 146 | dollarBraceL: TokenType | |
@@ -124,6 +161,7 @@ declare namespace acorn { | |||
| 124 | 161 | star: TokenType | |
| 125 | 162 | slash: TokenType | |
| 126 | 163 | starstar: TokenType | |
| 164 | + coalesce: TokenType | ||
| 127 | 165 | _break: TokenType | |
| 128 | 166 | _case: TokenType | |
| 129 | 167 | _catch: TokenType | |
| Back | FazBrowse Home | New Git URL |
0 commit comments