deps: update acorn to 8.15.0 · nodejs/node@8c61b96 · GitHub
Skip to content

Commit 8c61b96

Browse files
nodejs-github-botaduh95
authored andcommitted
deps: update acorn to 8.15.0
PR-URL: #58711 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 4fd8911 commit 8c61b96

8 files changed

Lines changed: 245 additions & 39 deletions

File tree

deps/acorn/acorn/CHANGELOG.md

Lines changed: 14 additions & 0 deletions

deps/acorn/acorn/dist/acorn.d.mts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export interface FunctionDeclaration extends Function {
169169
export interface VariableDeclaration extends Node {
170170
type: "VariableDeclaration"
171171
declarations: Array<VariableDeclarator>
172-
kind: "var" | "let" | "const"
172+
kind: "var" | "let" | "const" | "using" | "await using"
173173
}
174174

175175
export interface VariableDeclarator extends Node {
@@ -572,7 +572,24 @@ export type ModuleDeclaration =
572572
| ExportDefaultDeclaration
573573
| ExportAllDeclaration
574574

575-
export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
575+
/**
576+
* This interface is only used for defining {@link AnyNode}.
577+
* It exists so that it can be extended by plugins:
578+
*
579+
* @example
580+
* ```typescript
581+
* declare module 'acorn' {
582+
* interface NodeTypes {
583+
* pluginName: FirstNode | SecondNode | ThirdNode | ... | LastNode
584+
* }
585+
* }
586+
* ```
587+
*/
588+
interface NodeTypes {
589+
core: Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
590+
}
591+
592+
export type AnyNode = NodeTypes[keyof NodeTypes]
576593

577594
export function parse(input: string, options: Options): Program
578595

@@ -583,7 +600,7 @@ export function tokenizer(input: string, options: Options): {
583600
[Symbol.iterator](): Iterator<Token>
584601
}
585602

586-
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest"
603+
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"
587604

588605
export interface Options {
589606
/**

deps/acorn/acorn/dist/acorn.d.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export interface FunctionDeclaration extends Function {
169169
export interface VariableDeclaration extends Node {
170170
type: "VariableDeclaration"
171171
declarations: Array<VariableDeclarator>
172-
kind: "var" | "let" | "const"
172+
kind: "var" | "let" | "const" | "using" | "await using"
173173
}
174174

175175
export interface VariableDeclarator extends Node {
@@ -572,7 +572,24 @@ export type ModuleDeclaration =
572572
| ExportDefaultDeclaration
573573
| ExportAllDeclaration
574574

575-
export type AnyNode = Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
575+
/**
576+
* This interface is only used for defining {@link AnyNode}.
577+
* It exists so that it can be extended by plugins:
578+
*
579+
* @example
580+
* ```typescript
581+
* declare module 'acorn' {
582+
* interface NodeTypes {
583+
* pluginName: FirstNode | SecondNode | ThirdNode | ... | LastNode
584+
* }
585+
* }
586+
* ```
587+
*/
588+
interface NodeTypes {
589+
core: Statement | Expression | Declaration | ModuleDeclaration | Literal | Program | SwitchCase | CatchClause | Property | Super | SpreadElement | TemplateElement | AssignmentProperty | ObjectPattern | ArrayPattern | RestElement | AssignmentPattern | ClassBody | MethodDefinition | MetaProperty | ImportAttribute | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ExportSpecifier | AnonymousFunctionDeclaration | AnonymousClassDeclaration | PropertyDefinition | PrivateIdentifier | StaticBlock | VariableDeclarator
590+
}
591+
592+
export type AnyNode = NodeTypes[keyof NodeTypes]
576593

577594
export function parse(input: string, options: Options): Program
578595

@@ -583,7 +600,7 @@ export function tokenizer(input: string, options: Options): {
583600
[Symbol.iterator](): Iterator<Token>
584601
}
585602

586-
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | "latest"
603+
export type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 | "latest"
587604

588605
export interface Options {
589606
/**

deps/acorn/acorn/dist/acorn.js

Lines changed: 94 additions & 15 deletions

0 commit comments

Comments
 (0)