Skip to content

Commit 52a77db

Browse files
committed
deps: update acorn to v8.0.4
This adds support for nullish coalescing, optional chaining and numeric separators. The acorn-numeric-separator plugin can be removed. PR-URL: #35791 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
1 parent c365867 commit 52a77db

30 files changed

Lines changed: 6672 additions & 323 deletions

‎LICENSE‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ The externally maintained libraries used by Node.js are:
5353

5454
- Acorn, located at deps/acorn, is licensed as follows:
5555
"""
56+
MIT License
57+
5658
Copyright (C) 2012-2018 by various contributors (see AUTHORS)
5759

5860
Permission is hereby granted, free of charge, to any person obtaining a copy

‎deps/acorn-plugins/acorn-numeric-separator/CHANGELOG.md‎

Lines changed: 0 additions & 16 deletions
This file was deleted.

‎deps/acorn-plugins/acorn-numeric-separator/LICENSE‎

Lines changed: 0 additions & 19 deletions
This file was deleted.

‎deps/acorn-plugins/acorn-numeric-separator/README.md‎

Lines changed: 0 additions & 21 deletions
This file was deleted.

‎deps/acorn-plugins/acorn-numeric-separator/index.js‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

‎deps/acorn-plugins/acorn-numeric-separator/package.json‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

‎deps/acorn/acorn-walk/CHANGELOG.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 8.0.0 (2020-08-12)
2+
3+
### New features
4+
5+
The package can now be loaded directly as an ECMAScript module in node 13+.
6+
7+
## 7.2.0 (2020-06-17)
8+
9+
### New features
10+
11+
Support optional chaining and nullish coalescing.
12+
13+
Support `import.meta`.
14+
15+
Add support for `export * as ns from "source"`.
16+
117
## 7.1.1 (2020-02-13)
218

319
### Bug fixes

‎deps/acorn/acorn-walk/LICENSE‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
MIT License
2+
13
Copyright (C) 2012-2018 by various contributors (see AUTHORS)
24

35
Permission is hereby granted, free of charge, to any person obtaining a copy
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import{Node}from'acorn';
2+
3+
declare module "acorn-walk"{
4+
typeFullWalkerCallback<TState>=(
5+
node: Node,
6+
state: TState,
7+
type: string
8+
)=>void;
9+
10+
typeFullAncestorWalkerCallback<TState>=(
11+
node: Node,
12+
state: TState|Node[],
13+
ancestors: Node[],
14+
type: string
15+
)=>void;
16+
typeWalkerCallback<TState>=(node: Node,state: TState)=>void;
17+
18+
typeSimpleWalkerFn<TState>=(
19+
node: Node,
20+
state: TState
21+
)=>void;
22+
23+
typeAncestorWalkerFn<TState>=(
24+
node: Node,
25+
state: TState|Node[],
26+
ancestors: Node[]
27+
)=>void;
28+
29+
typeRecursiveWalkerFn<TState>=(
30+
node: Node,
31+
state: TState,
32+
callback: WalkerCallback<TState>
33+
)=>void;
34+
35+
typeSimpleVisitors<TState>={
36+
[type: string]: SimpleWalkerFn<TState>
37+
};
38+
39+
typeAncestorVisitors<TState>={
40+
[type: string]: AncestorWalkerFn<TState>
41+
};
42+
43+
typeRecursiveVisitors<TState>={
44+
[type: string]: RecursiveWalkerFn<TState>
45+
};
46+
47+
typeFindPredicate=(type: string,node: Node)=>boolean;
48+
49+
interfaceFound<TState>{
50+
node: Node,
51+
state: TState
52+
}
53+
54+
exportfunctionsimple<TState>(
55+
node: Node,
56+
visitors: SimpleVisitors<TState>,
57+
base?: RecursiveVisitors<TState>,
58+
state?: TState
59+
): void;
60+
61+
exportfunctionancestor<TState>(
62+
node: Node,
63+
visitors: AncestorVisitors<TState>,
64+
base?: RecursiveVisitors<TState>,
65+
state?: TState
66+
): void;
67+
68+
exportfunctionrecursive<TState>(
69+
node: Node,
70+
state: TState,
71+
functions: RecursiveVisitors<TState>,
72+
base?: RecursiveVisitors<TState>
73+
): void;
74+
75+
exportfunctionfull<TState>(
76+
node: Node,
77+
callback: FullWalkerCallback<TState>,
78+
base?: RecursiveVisitors<TState>,
79+
state?: TState
80+
): void;
81+
82+
exportfunctionfullAncestor<TState>(
83+
node: Node,
84+
callback: FullAncestorWalkerCallback<TState>,
85+
base?: RecursiveVisitors<TState>,
86+
state?: TState
87+
): void;
88+
89+
exportfunctionmake<TState>(
90+
functions: RecursiveVisitors<TState>,
91+
base?: RecursiveVisitors<TState>
92+
): RecursiveVisitors<TState>;
93+
94+
exportfunctionfindNodeAt<TState>(
95+
node: Node,
96+
start: number|undefined,
97+
end?: number|undefined,
98+
type?: FindPredicate|string,
99+
base?: RecursiveVisitors<TState>,
100+
state?: TState
101+
): Found<TState>|undefined;
102+
103+
exportfunctionfindNodeAround<TState>(
104+
node: Node,
105+
start: number|undefined,
106+
type?: FindPredicate|string,
107+
base?: RecursiveVisitors<TState>,
108+
state?: TState
109+
): Found<TState>|undefined;
110+
111+
exportconstfindNodeAfter: typeoffindNodeAround;
112+
}

‎deps/acorn/acorn-walk/dist/walk.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
typeofexports==='object'&&typeofmodule!=='undefined' ? factory(exports) :
33
typeofdefine==='function'&&define.amd ? define(['exports'],factory) :
44
(global=global||self,factory((global.acorn=global.acorn||{},global.acorn.walk={})));
5-
}(this,function(exports){'use strict';
5+
}(this,(function(exports){'use strict';
66

77
// AST walker module for Mozilla Parser API compatible trees
88

@@ -200,7 +200,7 @@
200200
};
201201
base.Statement=skipThrough;
202202
base.EmptyStatement=ignore;
203-
base.ExpressionStatement=base.ParenthesizedExpression=
203+
base.ExpressionStatement=base.ParenthesizedExpression=base.ChainExpression=
204204
function(node,st,c){returnc(node.expression,st,"Expression");};
205205
base.IfStatement=function(node,st,c){
206206
c(node.test,st,"Expression");
@@ -405,6 +405,8 @@
405405
if(node.source){c(node.source,st,"Expression");}
406406
};
407407
base.ExportAllDeclaration=function(node,st,c){
408+
if(node.exported)
409+
{c(node.exported,st);}
408410
c(node.source,st,"Expression");
409411
};
410412
base.ImportDeclaration=function(node,st,c){
@@ -458,4 +460,4 @@
458460

459461
Object.defineProperty(exports,'__esModule',{value: true});
460462

461-
}));
463+
})));

0 commit comments

Comments
 (0)