Skip to content

Commit 682f4f6

Browse files
nodejs-github-bottargos
authored andcommitted
deps: update acorn-walk to 8.3.2
PR-URL: #51457 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Michaël Zasso <targos@protonmail.com>
1 parent c88f0b6 commit 682f4f6

File tree

3 files changed

+67
-57
lines changed

3 files changed

+67
-57
lines changed

deps/acorn/acorn-walk/dist/walk.d.mts

+33-28
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ export function simple<TState>(
6666

6767
/**
6868
* does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter.
69-
* @param node
70-
* @param visitors
71-
* @param base
72-
* @param state
69+
* @param node
70+
* @param visitors
71+
* @param base
72+
* @param state
7373
*/
7474
export function ancestor<TState>(
7575
node: acorn.Node,
@@ -79,8 +79,8 @@ export function ancestor<TState>(
7979
): void
8080

8181
/**
82-
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
83-
* @param node
82+
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
83+
* @param node
8484
* @param state the start state
8585
* @param functions contain an object that maps node types to walker functions
8686
* @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used.
@@ -94,10 +94,10 @@ export function recursive<TState>(
9494

9595
/**
9696
* does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node
97-
* @param node
98-
* @param callback
99-
* @param base
100-
* @param state
97+
* @param node
98+
* @param callback
99+
* @param base
100+
* @param state
101101
*/
102102
export function full<TState>(
103103
node: acorn.Node,
@@ -108,10 +108,10 @@ export function full<TState>(
108108

109109
/**
110110
* does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter.
111-
* @param node
112-
* @param callback
113-
* @param base
114-
* @param state
111+
* @param node
112+
* @param callback
113+
* @param base
114+
* @param state
115115
*/
116116
export function fullAncestor<TState>(
117117
node: acorn.Node,
@@ -122,8 +122,8 @@ export function fullAncestor<TState>(
122122

123123
/**
124124
* builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}.
125-
* @param functions
126-
* @param base
125+
* @param functions
126+
* @param base
127127
*/
128128
export function make<TState>(
129129
functions: RecursiveVisitors<TState>,
@@ -132,12 +132,12 @@ export function make<TState>(
132132

133133
/**
134134
* tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred.
135-
* @param node
136-
* @param start
137-
* @param end
138-
* @param type
139-
* @param base
140-
* @param state
135+
* @param node
136+
* @param start
137+
* @param end
138+
* @param type
139+
* @param base
140+
* @param state
141141
*/
142142
export function findNodeAt<TState>(
143143
node: acorn.Node,
@@ -150,11 +150,11 @@ export function findNodeAt<TState>(
150150

151151
/**
152152
* like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position.
153-
* @param node
154-
* @param start
155-
* @param type
156-
* @param base
157-
* @param state
153+
* @param node
154+
* @param start
155+
* @param type
156+
* @param base
157+
* @param state
158158
*/
159159
export function findNodeAround<TState>(
160160
node: acorn.Node,
@@ -165,8 +165,13 @@ export function findNodeAround<TState>(
165165
): Found<TState> | undefined
166166

167167
/**
168-
* similar to {@link findNodeAround}, but will match all nodes after the given position (testing outer nodes before inner nodes).
168+
* Find the outermost matching node after a given position.
169169
*/
170170
export const findNodeAfter: typeof findNodeAround
171171

172+
/**
173+
* Find the outermost matching node before a given position.
174+
*/
175+
export const findNodeBefore: typeof findNodeAround
176+
172177
export const base: RecursiveVisitors<any>

deps/acorn/acorn-walk/dist/walk.d.ts

+33-28
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ export function simple<TState>(
6666

6767
/**
6868
* does a 'simple' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter.
69-
* @param node
70-
* @param visitors
71-
* @param base
72-
* @param state
69+
* @param node
70+
* @param visitors
71+
* @param base
72+
* @param state
7373
*/
7474
export function ancestor<TState>(
7575
node: acorn.Node,
@@ -79,8 +79,8 @@ export function ancestor<TState>(
7979
): void
8080

8181
/**
82-
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
83-
* @param node
82+
* does a 'recursive' walk, where the walker functions are responsible for continuing the walk on the child nodes of their target node.
83+
* @param node
8484
* @param state the start state
8585
* @param functions contain an object that maps node types to walker functions
8686
* @param base provides the fallback walker functions for node types that aren't handled in the {@link functions} object. If not given, the default walkers will be used.
@@ -94,10 +94,10 @@ export function recursive<TState>(
9494

9595
/**
9696
* does a 'full' walk over a tree, calling the {@link callback} with the arguments (node, state, type) for each node
97-
* @param node
98-
* @param callback
99-
* @param base
100-
* @param state
97+
* @param node
98+
* @param callback
99+
* @param base
100+
* @param state
101101
*/
102102
export function full<TState>(
103103
node: acorn.Node,
@@ -108,10 +108,10 @@ export function full<TState>(
108108

109109
/**
110110
* does a 'full' walk over a tree, building up an array of ancestor nodes (including the current node) and passing the array to the callbacks as a third parameter.
111-
* @param node
112-
* @param callback
113-
* @param base
114-
* @param state
111+
* @param node
112+
* @param callback
113+
* @param base
114+
* @param state
115115
*/
116116
export function fullAncestor<TState>(
117117
node: acorn.Node,
@@ -122,8 +122,8 @@ export function fullAncestor<TState>(
122122

123123
/**
124124
* builds a new walker object by using the walker functions in {@link functions} and filling in the missing ones by taking defaults from {@link base}.
125-
* @param functions
126-
* @param base
125+
* @param functions
126+
* @param base
127127
*/
128128
export function make<TState>(
129129
functions: RecursiveVisitors<TState>,
@@ -132,12 +132,12 @@ export function make<TState>(
132132

133133
/**
134134
* tries to locate a node in a tree at the given start and/or end offsets, which satisfies the predicate test. {@link start} and {@link end} can be either `null` (as wildcard) or a `number`. {@link test} may be a string (indicating a node type) or a function that takes (nodeType, node) arguments and returns a boolean indicating whether this node is interesting. {@link base} and {@link state} are optional, and can be used to specify a custom walker. Nodes are tested from inner to outer, so if two nodes match the boundaries, the inner one will be preferred.
135-
* @param node
136-
* @param start
137-
* @param end
138-
* @param type
139-
* @param base
140-
* @param state
135+
* @param node
136+
* @param start
137+
* @param end
138+
* @param type
139+
* @param base
140+
* @param state
141141
*/
142142
export function findNodeAt<TState>(
143143
node: acorn.Node,
@@ -150,11 +150,11 @@ export function findNodeAt<TState>(
150150

151151
/**
152152
* like {@link findNodeAt}, but will match any node that exists 'around' (spanning) the given position.
153-
* @param node
154-
* @param start
155-
* @param type
156-
* @param base
157-
* @param state
153+
* @param node
154+
* @param start
155+
* @param type
156+
* @param base
157+
* @param state
158158
*/
159159
export function findNodeAround<TState>(
160160
node: acorn.Node,
@@ -165,8 +165,13 @@ export function findNodeAround<TState>(
165165
): Found<TState> | undefined
166166

167167
/**
168-
* similar to {@link findNodeAround}, but will match all nodes after the given position (testing outer nodes before inner nodes).
168+
* Find the outermost matching node after a given position.
169169
*/
170170
export const findNodeAfter: typeof findNodeAround
171171

172+
/**
173+
* Find the outermost matching node before a given position.
174+
*/
175+
export const findNodeBefore: typeof findNodeAround
176+
172177
export const base: RecursiveVisitors<any>

deps/acorn/acorn-walk/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
],
1717
"./package.json": "./package.json"
1818
},
19-
"version": "8.3.1",
19+
"version": "8.3.2",
2020
"engines": {
2121
"node": ">=0.4.0"
2222
},

0 commit comments

Comments
 (0)