Skip to content

Commit 551fd27

Browse files
committed
Update dev-dependencies
1 parent 58e20d8 commit 551fd27

File tree

5 files changed

+73
-69
lines changed

5 files changed

+73
-69
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77
name: ${{matrix.node}}
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- uses: actions/setup-node@v3
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
1212
with:
1313
node-version: ${{matrix.node}}
1414
- run: npm install
1515
- run: npm test
16-
- uses: codecov/codecov-action@v3
16+
- uses: codecov/codecov-action@v4
1717
strategy:
1818
matrix:
1919
node:

index.test-d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ visitParents(implicitTree, function (node, parents) {
6464
// Knows it’s a heading and its parents.
6565
visitParents(sampleTree, 'heading', function (node, parents) {
6666
expectType<Heading>(node)
67-
expectType<
68-
Array<Blockquote | FootnoteDefinition | List | ListItem | Root>
69-
>(parents)
67+
expectType<Array<Blockquote | FootnoteDefinition | List | ListItem | Root>>(
68+
parents
69+
)
7070
})
7171

7272
// Not in tree.

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,9 @@ export function visitParents(tree, test, visitor, reverse) {
319319
typeof value.tagName === 'string'
320320
? value.tagName
321321
: // `xast`
322-
typeof value.name === 'string'
323-
? value.name
324-
: undefined
322+
typeof value.name === 'string'
323+
? value.name
324+
: undefined
325325

326326
Object.defineProperty(visit, 'name', {
327327
value:

package.json

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,23 @@
5151
"@types/mdast": "^4.0.0",
5252
"@types/node": "^20.0.0",
5353
"@types/xast": "^2.0.0",
54-
"c8": "^8.0.0",
55-
"mdast-util-from-markdown": "^1.0.0",
56-
"mdast-util-gfm": "^2.0.0",
57-
"micromark-extension-gfm": "^2.0.0",
58-
"prettier": "^2.0.0",
59-
"remark-cli": "^11.0.0",
60-
"remark-preset-wooorm": "^9.0.0",
54+
"c8": "^9.0.0",
55+
"mdast-util-from-markdown": "^2.0.0",
56+
"mdast-util-gfm": "^3.0.0",
57+
"micromark-extension-gfm": "^3.0.0",
58+
"prettier": "^3.0.0",
59+
"remark-cli": "^12.0.0",
60+
"remark-preset-wooorm": "^10.0.0",
6161
"strip-ansi": "^7.0.0",
62-
"tsd": "^0.28.0",
62+
"tsd": "^0.31.0",
6363
"type-coverage": "^2.0.0",
6464
"typescript": "^5.0.0",
65-
"xo": "^0.54.0"
65+
"xo": "^0.58.0"
6666
},
6767
"scripts": {
6868
"prepack": "npm run build && npm run format",
6969
"build": "tsc --build --clean && tsc --build && tsd && type-coverage",
70-
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
70+
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
7171
"test-api": "node --conditions development test.js",
7272
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
7373
"test": "npm run build && npm run format && npm run test-coverage"
@@ -96,6 +96,10 @@
9696
"strict": true
9797
},
9898
"xo": {
99-
"prettier": true
99+
"prettier": true,
100+
"rules": {
101+
"unicorn/prefer-at": "off",
102+
"unicorn/prefer-string-replace-all": "off"
103+
}
100104
}
101105
}

readme.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212

1313
## Contents
1414

15-
* [What is this?](#what-is-this)
16-
* [When should I use this?](#when-should-i-use-this)
17-
* [Install](#install)
18-
* [Use](#use)
19-
* [API](#api)
20-
* [`visitParents(tree[, test], visitor[, reverse])`](#visitparentstree-test-visitor-reverse)
21-
* [`CONTINUE`](#continue)
22-
* [`EXIT`](#exit)
23-
* [`SKIP`](#skip)
24-
* [`Action`](#action)
25-
* [`ActionTuple`](#actiontuple)
26-
* [`BuildVisitor`](#buildvisitor)
27-
* [`Index`](#index)
28-
* [`Test`](#test)
29-
* [`Visitor`](#visitor)
30-
* [`VisitorResult`](#visitorresult)
31-
* [Types](#types)
32-
* [Compatibility](#compatibility)
33-
* [Related](#related)
34-
* [Contribute](#contribute)
35-
* [License](#license)
15+
* [What is this?](#what-is-this)
16+
* [When should I use this?](#when-should-i-use-this)
17+
* [Install](#install)
18+
* [Use](#use)
19+
* [API](#api)
20+
* [`visitParents(tree[, test], visitor[, reverse])`](#visitparentstree-test-visitor-reverse)
21+
* [`CONTINUE`](#continue)
22+
* [`EXIT`](#exit)
23+
* [`SKIP`](#skip)
24+
* [`Action`](#action)
25+
* [`ActionTuple`](#actiontuple)
26+
* [`BuildVisitor`](#buildvisitor)
27+
* [`Index`](#index)
28+
* [`Test`](#test)
29+
* [`Visitor`](#visitor)
30+
* [`VisitorResult`](#visitorresult)
31+
* [Types](#types)
32+
* [Compatibility](#compatibility)
33+
* [Related](#related)
34+
* [Contribute](#contribute)
35+
* [License](#license)
3636

3737
## What is this?
3838

@@ -117,14 +117,14 @@ See [`Visitor`][api-visitor] for more info.
117117

118118
###### Parameters
119119

120-
* `tree` ([`Node`][node])
121-
— tree to traverse
122-
* `test` ([`Test`][api-test], optional)
123-
[`unist-util-is`][unist-util-is]-compatible test
124-
* `visitor` ([`Visitor`][api-visitor])
125-
— handle each node
126-
* `reverse` (`boolean`, default: `false`)
127-
— traverse in reverse preorder (NRL) instead of the default preorder (NLR)
120+
* `tree` ([`Node`][node])
121+
— tree to traverse
122+
* `test` ([`Test`][api-test], optional)
123+
[`unist-util-is`][unist-util-is]-compatible test
124+
* `visitor` ([`Visitor`][api-visitor])
125+
— handle each node
126+
* `reverse` (`boolean`, default: `false`)
127+
— traverse in reverse preorder (NRL) instead of the default preorder (NLR)
128128

129129
###### Returns
130130

@@ -174,10 +174,10 @@ It will infer which values are passed as `node` and which as `parents`.
174174
175175
###### Type parameters
176176
177-
* `Tree` ([`Node`][node], default: `Node`)
178-
— tree type
179-
* `Check` ([`Test`][api-test], default: `Test`)
180-
— test type
177+
* `Tree` ([`Node`][node], default: `Node`)
178+
— tree type
179+
* `Check` ([`Test`][api-test], default: `Test`)
180+
— test type
181181
182182
###### Returns
183183
@@ -224,10 +224,10 @@ traversed.
224224
225225
###### Parameters
226226
227-
* `node` ([`Node`][node])
228-
— found node
229-
* `parents` ([`Array<Node>`][node])
230-
— ancestors of `node`
227+
* `node` ([`Node`][node])
228+
— found node
229+
* `parents` ([`Array<Node>`][node])
230+
— ancestors of `node`
231231
232232
###### Returns
233233
@@ -276,18 +276,18 @@ This means we try to keep the current release line,
276276
277277
## Related
278278
279-
* [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit)
280-
— walk the tree with one parent
281-
* [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter)
282-
— create a new tree with all nodes that pass a test
283-
* [`unist-util-map`](https://github.com/syntax-tree/unist-util-map)
284-
— create a new tree with all nodes mapped by a given function
285-
* [`unist-util-flatmap`](https://gitlab.com/staltz/unist-util-flatmap)
286-
— create a new tree by mapping (to an array) with the given function
287-
* [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove)
288-
— remove nodes from a tree that pass a test
289-
* [`unist-util-select`](https://github.com/syntax-tree/unist-util-select)
290-
— select nodes with CSS-like selectors
279+
* [`unist-util-visit`](https://github.com/syntax-tree/unist-util-visit)
280+
— walk the tree with one parent
281+
* [`unist-util-filter`](https://github.com/syntax-tree/unist-util-filter)
282+
— create a new tree with all nodes that pass a test
283+
* [`unist-util-map`](https://github.com/syntax-tree/unist-util-map)
284+
— create a new tree with all nodes mapped by a given function
285+
* [`unist-util-flatmap`](https://gitlab.com/staltz/unist-util-flatmap)
286+
— create a new tree by mapping (to an array) with the given function
287+
* [`unist-util-remove`](https://github.com/syntax-tree/unist-util-remove)
288+
— remove nodes from a tree that pass a test
289+
* [`unist-util-select`](https://github.com/syntax-tree/unist-util-select)
290+
— select nodes with CSS-like selectors
291291
292292
## Contribute
293293

0 commit comments

Comments
 (0)