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 <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Shelley Vohr <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent c365867 commit 52a77db

30 files changed

+6672
-323
lines changed

Diff for: LICENSE

+2
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

Diff for: deps/acorn-plugins/acorn-numeric-separator/CHANGELOG.md

-16
This file was deleted.

Diff for: deps/acorn-plugins/acorn-numeric-separator/LICENSE

-19
This file was deleted.

Diff for: deps/acorn-plugins/acorn-numeric-separator/README.md

-21
This file was deleted.

Diff for: deps/acorn-plugins/acorn-numeric-separator/index.js

-49
This file was deleted.

Diff for: deps/acorn-plugins/acorn-numeric-separator/package.json

-33
This file was deleted.

Diff for: deps/acorn/acorn-walk/CHANGELOG.md

+16
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

Diff for: deps/acorn/acorn-walk/LICENSE

+2
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

Diff for: deps/acorn/acorn-walk/dist/walk.d.ts

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
import {Node} from 'acorn';
2+
3+
declare module "acorn-walk" {
4+
type FullWalkerCallback<TState> = (
5+
node: Node,
6+
state: TState,
7+
type: string
8+
) => void;
9+
10+
type FullAncestorWalkerCallback<TState> = (
11+
node: Node,
12+
state: TState | Node[],
13+
ancestors: Node[],
14+
type: string
15+
) => void;
16+
type WalkerCallback<TState> = (node: Node, state: TState) => void;
17+
18+
type SimpleWalkerFn<TState> = (
19+
node: Node,
20+
state: TState
21+
) => void;
22+
23+
type AncestorWalkerFn<TState> = (
24+
node: Node,
25+
state: TState| Node[],
26+
ancestors: Node[]
27+
) => void;
28+
29+
type RecursiveWalkerFn<TState> = (
30+
node: Node,
31+
state: TState,
32+
callback: WalkerCallback<TState>
33+
) => void;
34+
35+
type SimpleVisitors<TState> = {
36+
[type: string]: SimpleWalkerFn<TState>
37+
};
38+
39+
type AncestorVisitors<TState> = {
40+
[type: string]: AncestorWalkerFn<TState>
41+
};
42+
43+
type RecursiveVisitors<TState> = {
44+
[type: string]: RecursiveWalkerFn<TState>
45+
};
46+
47+
type FindPredicate = (type: string, node: Node) => boolean;
48+
49+
interface Found<TState> {
50+
node: Node,
51+
state: TState
52+
}
53+
54+
export function simple<TState>(
55+
node: Node,
56+
visitors: SimpleVisitors<TState>,
57+
base?: RecursiveVisitors<TState>,
58+
state?: TState
59+
): void;
60+
61+
export function ancestor<TState>(
62+
node: Node,
63+
visitors: AncestorVisitors<TState>,
64+
base?: RecursiveVisitors<TState>,
65+
state?: TState
66+
): void;
67+
68+
export function recursive<TState>(
69+
node: Node,
70+
state: TState,
71+
functions: RecursiveVisitors<TState>,
72+
base?: RecursiveVisitors<TState>
73+
): void;
74+
75+
export function full<TState>(
76+
node: Node,
77+
callback: FullWalkerCallback<TState>,
78+
base?: RecursiveVisitors<TState>,
79+
state?: TState
80+
): void;
81+
82+
export function fullAncestor<TState>(
83+
node: Node,
84+
callback: FullAncestorWalkerCallback<TState>,
85+
base?: RecursiveVisitors<TState>,
86+
state?: TState
87+
): void;
88+
89+
export function make<TState>(
90+
functions: RecursiveVisitors<TState>,
91+
base?: RecursiveVisitors<TState>
92+
): RecursiveVisitors<TState>;
93+
94+
export function findNodeAt<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+
export function findNodeAround<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+
export const findNodeAfter: typeof findNodeAround;
112+
}

Diff for: deps/acorn/acorn-walk/dist/walk.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
33
typeof define === '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) { return c(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+
})));

Diff for: deps/acorn/acorn-walk/dist/walk.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)