Skip to content

Commit 7124daf

Browse files
committed
Update dev-dependencies
1 parent 94cbac8 commit 7124daf

File tree

5 files changed

+26
-21
lines changed

5 files changed

+26
-21
lines changed

package.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,20 @@
4444
"browserify": "^16.0.0",
4545
"dtslint": "^3.0.0",
4646
"nyc": "^15.0.0",
47-
"prettier": "^1.0.0",
48-
"remark": "^11.0.0",
49-
"remark-attr": "^0.9.0",
50-
"remark-cli": "^7.0.0",
51-
"remark-parse": "^7.0.0",
52-
"remark-preset-wooorm": "^6.0.0",
53-
"remark-usage": "^7.0.0",
47+
"prettier": "^2.0.0",
48+
"remark": "^12.0.0",
49+
"remark-attr": "^0.10.0",
50+
"remark-cli": "^8.0.0",
51+
"remark-footnotes": "^1.0.0",
52+
"remark-parse": "^8.0.0",
53+
"remark-preset-wooorm": "^7.0.0",
54+
"remark-usage": "^8.0.0",
5455
"tape": "^4.0.0",
5556
"tinyify": "^2.0.0",
5657
"typescript": "^3.0.0",
57-
"unified": "^8.0.0",
58+
"unified": "^9.0.0",
5859
"unist-builder": "^2.0.0",
59-
"xo": "^0.26.0"
60+
"xo": "^0.29.0"
6061
},
6162
"scripts": {
6263
"format": "remark . -qfo && prettier --write \"**/*.{js,ts}\" && xo --fix",
@@ -86,6 +87,7 @@
8687
"prettier": true,
8788
"esnext": false,
8889
"ignores": [
90+
"types",
8991
"mdast-util-toc.js"
9092
]
9193
},
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"remarkParseOptions": {
3-
"footnotes": true
4-
}
2+
"useRemarkFootnotes": true
53
}

test/fixtures/phrasing-content/input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# `inline.code()`
1212

13-
# [^a footnote]
13+
# ^[a footnote]
1414

1515
# footnote reference [^1]
1616

test/index.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ var test = require('tape')
44
var unified = require('unified')
55
var remarkParse = require('remark-parse')
66
var remarkAttr = require('remark-attr')
7+
var remarkFootnotes = require('remark-footnotes')
78
var u = require('unist-builder')
89
var toc = require('..')
910

1011
var join = path.join
1112

12-
test('mdast-util-toc', function(t) {
13+
test('mdast-util-toc', function (t) {
1314
t.is(typeof toc, 'function', 'should be a function')
1415

1516
t.throws(
16-
function() {
17+
function () {
1718
toc()
1819
},
1920
"Cannot read property 'children' of undefined",
@@ -23,14 +24,14 @@ test('mdast-util-toc', function(t) {
2324
t.end()
2425
})
2526

26-
test('Fixtures', function(t) {
27+
test('Fixtures', function (t) {
2728
var root = join(__dirname, 'fixtures')
2829

2930
fs.readdirSync(root)
30-
.filter(function(filepath) {
31+
.filter(function (filepath) {
3132
return filepath.indexOf('.') !== 0
3233
})
33-
.forEach(function(name) {
34+
.forEach(function (name) {
3435
var input = fs.readFileSync(join(root, name, 'input.md'))
3536
var output = fs.readFileSync(join(root, name, 'output.json'))
3637
var config = {}
@@ -42,7 +43,11 @@ test('Fixtures', function(t) {
4243
config = JSON.parse(fs.readFileSync(join(root, name, 'config.json')))
4344
} catch (_) {}
4445

45-
processor.use(remarkParse, config.remarkParseOptions)
46+
processor.use(remarkParse)
47+
48+
if (config.useRemarkFootnotes) {
49+
processor.use(remarkFootnotes, {inlineNotes: true})
50+
}
4651

4752
if (config.useRemarkAttr) {
4853
processor.use(remarkAttr)
@@ -56,7 +61,7 @@ test('Fixtures', function(t) {
5661
t.end()
5762
})
5863

59-
test('processing nodes', function(t) {
64+
test('processing nodes', function (t) {
6065
var rootNode = u('root', [
6166
u('heading', {depth: 1}, [u('text', 'Alpha')]),
6267
u('heading', {depth: 2}, [u('text', 'Bravo')])

types/mdast-util-toc-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ toc(tree, {
5353
})
5454

5555
/*=== usable in unified transform ===*/
56-
unified().use(() => tree => {
56+
unified().use(() => (tree) => {
5757
const table = toc(tree)
5858

5959
if (is<List>(table.map, 'list')) {

0 commit comments

Comments
 (0)