Skip to content

Commit 7c82195

Browse files
committed
Update dev-dependencies
1 parent 4847fc7 commit 7c82195

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

package.json

+5-7
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,14 @@
3838
},
3939
"devDependencies": {
4040
"c8": "^7.0.0",
41-
"dtslint": "^4.0.0",
42-
"is-hidden": "^1.0.0",
43-
"not": "^0.1.0",
41+
"is-hidden": "^2.0.0",
4442
"prettier": "^2.0.0",
45-
"remark": "^13.0.0",
46-
"remark-cli": "^9.0.0",
43+
"remark": "^14.0.0",
44+
"remark-cli": "^10.0.0",
4745
"remark-preset-wooorm": "^8.0.0",
4846
"tape": "^5.0.0",
49-
"to-vfile": "^6.0.0",
50-
"unified": "^9.0.0",
47+
"to-vfile": "^7.0.0",
48+
"unified": "^10.0.0",
5149
"xo": "^0.37.0"
5250
},
5351
"scripts": {

test/index.js

+15-18
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
11
import fs from 'fs'
22
import path from 'path'
33
import test from 'tape'
4-
import vfile from 'to-vfile'
5-
import unified from 'unified'
6-
import remark from 'remark'
7-
import not from 'not'
8-
import hidden from 'is-hidden'
9-
import frontmatter from '../index.js'
4+
import {readSync} from 'to-vfile'
5+
import {unified} from 'unified'
6+
import {remark} from 'remark'
7+
import {isHidden} from 'is-hidden'
8+
import remarkFrontmatter from '../index.js'
109

1110
var join = path.join
1211
var read = fs.readFileSync
1312
var write = fs.writeFileSync
1413
var dir = fs.readdirSync
1514

16-
test('frontmatter()', function (t) {
17-
t.equal(typeof frontmatter, 'function', 'should be a function')
18-
15+
test('remarkFrontmatter', function (t) {
1916
t.doesNotThrow(function () {
20-
remark().use(frontmatter).freeze()
17+
remark().use(remarkFrontmatter).freeze()
2118
}, 'should not throw if not passed options')
2219

2320
t.doesNotThrow(function () {
24-
unified().use(frontmatter).freeze()
21+
unified().use(remarkFrontmatter).freeze()
2522
}, 'should not throw if without parser or compiler')
2623

2724
t.throws(
2825
function () {
29-
unified().use(frontmatter, [1]).freeze()
26+
unified().use(remarkFrontmatter, [1]).freeze()
3027
},
3128
/^Error: Expected matter to be an object, not `1`/,
3229
'should throw if not given a preset or a matter'
3330
)
3431

3532
t.throws(
3633
function () {
37-
unified().use(frontmatter, ['jsonml']).freeze()
34+
unified().use(remarkFrontmatter, ['jsonml']).freeze()
3835
},
3936
/^Error: Missing matter definition for `jsonml`/,
4037
'should throw if given an unknown preset'
@@ -43,7 +40,7 @@ test('frontmatter()', function (t) {
4340
t.throws(
4441
function () {
4542
unified()
46-
.use(frontmatter, [{marker: '*'}])
43+
.use(remarkFrontmatter, [{marker: '*'}])
4744
.freeze()
4845
},
4946
/^Error: Missing `type` in matter `{"marker":"\*"}`/,
@@ -53,7 +50,7 @@ test('frontmatter()', function (t) {
5350
t.throws(
5451
function () {
5552
unified()
56-
.use(frontmatter, [{type: 'jsonml'}])
53+
.use(remarkFrontmatter, [{type: 'jsonml'}])
5754
.freeze()
5855
},
5956
/^Error: Missing `marker` or `fence` in matter `{"type":"jsonml"}`/,
@@ -65,15 +62,15 @@ test('frontmatter()', function (t) {
6562

6663
test('fixtures', function (t) {
6764
var base = join('test', 'fixtures')
68-
var entries = dir(base).filter(not(hidden))
65+
var entries = dir(base).filter((d) => !isHidden(d))
6966

7067
t.plan(entries.length)
7168

7269
entries.forEach(each)
7370

7471
function each(fixture) {
7572
t.test(fixture, function (st) {
76-
var input = vfile.readSync(join(base, fixture, 'input.md'))
73+
var input = readSync(join(base, fixture, 'input.md'))
7774
var treePath = join(base, fixture, 'tree.json')
7875
var outputPath = join(base, fixture, 'output.md')
7976
var output
@@ -86,7 +83,7 @@ test('fixtures', function (t) {
8683
config = JSON.parse(read(join(base, fixture, 'config.json')))
8784
} catch (_) {}
8885

89-
proc = remark().use(frontmatter, config)
86+
proc = remark().use(remarkFrontmatter, config)
9087
actual = JSON.parse(JSON.stringify(proc.parse(input)))
9188

9289
try {

0 commit comments

Comments
 (0)