Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 52a77db

Browse filesBrowse 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
Copy full SHA for 52a77db

File tree

Expand file treeCollapse file tree

30 files changed

+6672
-323
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

30 files changed

+6672
-323
lines changed
Open diff view settings
Collapse file

‎LICENSE‎

Copy file name to clipboardExpand all lines: LICENSE
+2Lines 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
Collapse file

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

Copy file name to clipboardExpand all lines: deps/acorn-plugins/acorn-numeric-separator/CHANGELOG.md
-16Lines changed: 0 additions & 16 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: deps/acorn-plugins/acorn-numeric-separator/LICENSE
-19Lines changed: 0 additions & 19 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: deps/acorn-plugins/acorn-numeric-separator/README.md
-21Lines changed: 0 additions & 21 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: deps/acorn-plugins/acorn-numeric-separator/index.js
-49Lines changed: 0 additions & 49 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: deps/acorn-plugins/acorn-numeric-separator/package.json
-33Lines changed: 0 additions & 33 deletions
This file was deleted.
Collapse file

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

Copy file name to clipboardExpand all lines: deps/acorn/acorn-walk/CHANGELOG.md
+16Lines changed: 16 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
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
Collapse file

‎deps/acorn/acorn-walk/LICENSE‎

Copy file name to clipboardExpand all lines: deps/acorn/acorn-walk/LICENSE
+2Lines 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
Collapse file
+112Lines 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+
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+
}
Collapse file

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

Copy file name to clipboardExpand all lines: deps/acorn/acorn-walk/dist/walk.js
+5-3Lines changed: 5 additions & 3 deletions
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+
})));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.