Skip to content

Commit c9ddc40

Browse files
committed
Update dev-dependencies
1 parent 4b035a7 commit c9ddc40

File tree

4 files changed

+36
-33
lines changed

4 files changed

+36
-33
lines changed

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
coverage/
22
unist-util-is.js
33
unist-util-is.min.js
4+
*.json
5+
*.md

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,16 @@
4040
"browserify": "^16.0.0",
4141
"dtslint": "^3.0.0",
4242
"nyc": "^15.0.0",
43-
"prettier": "^1.0.0",
44-
"remark-cli": "^7.0.0",
45-
"remark-preset-wooorm": "^6.0.0",
46-
"tape": "^4.0.0",
43+
"prettier": "^2.0.0",
44+
"remark-cli": "^8.0.0",
45+
"remark-preset-wooorm": "^7.0.0",
46+
"tape": "^5.0.0",
4747
"tinyify": "^2.0.0",
48-
"unified": "^8.0.0",
49-
"xo": "^0.26.0"
48+
"unified": "^9.0.0",
49+
"xo": "^0.32.0"
5050
},
5151
"scripts": {
52-
"format": "remark . -qfo && prettier --write \"**/*.{js,ts}\" && xo --fix",
52+
"format": "remark . -qfo && prettier . --write && xo --fix",
5353
"build-bundle": "browserify . -s unistUtilIs > unist-util-is.js",
5454
"build-mangle": "browserify . -s unistUtilIs -p tinyify > unist-util-is.min.js",
5555
"build": "npm run build-bundle && npm run build-mangle",
@@ -74,6 +74,7 @@
7474
"unicorn/prefer-reflect-apply": "off"
7575
},
7676
"ignore": [
77+
"*.ts",
7778
"unist-util-is.js"
7879
]
7980
},

test.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,68 +3,68 @@
33
var test = require('tape')
44
var is = require('.')
55

6-
test('unist-util-is', function(t) {
6+
test('unist-util-is', function (t) {
77
var node = {type: 'strong'}
88
var parent = {type: 'paragraph', children: []}
99

1010
t.throws(
11-
function() {
11+
function () {
1212
is(null, false)
1313
},
1414
/Expected function, string, or object as test/,
1515
'should throw when `test` is invalid'
1616
)
1717

1818
t.throws(
19-
function() {
19+
function () {
2020
is(node, null, -1, parent)
2121
},
2222
/Expected positive finite index or child node/,
2323
'should throw when `index` is invalid (#1)'
2424
)
2525

2626
t.throws(
27-
function() {
27+
function () {
2828
is(node, null, Infinity, parent)
2929
},
3030
/Expected positive finite index or child node/,
3131
'should throw when `index` is invalid (#2)'
3232
)
3333

3434
t.throws(
35-
function() {
35+
function () {
3636
is(node, null, false, parent)
3737
},
3838
/Expected positive finite index or child node/,
3939
'should throw when `index` is invalid (#3)'
4040
)
4141

4242
t.throws(
43-
function() {
43+
function () {
4444
is(node, null, 0, {})
4545
},
4646
/Expected parent node/,
4747
'should throw when `parent` is invalid (#1)'
4848
)
4949

5050
t.throws(
51-
function() {
51+
function () {
5252
is(node, null, 0, {type: 'paragraph'})
5353
},
5454
/Expected parent node/,
5555
'should throw when `parent` is invalid (#2)'
5656
)
5757

5858
t.throws(
59-
function() {
59+
function () {
6060
is(node, null, 0)
6161
},
6262
/Expected both parent and index/,
6363
'should throw `parent` xor `index` are given (#1)'
6464
)
6565

6666
t.throws(
67-
function() {
67+
function () {
6868
is(node, null, null, parent)
6969
},
7070
/Expected both parent and index/,
@@ -83,28 +83,28 @@ test('unist-util-is', function(t) {
8383
t.ok(is(parent, {type: 'paragraph'}), 'should match partially (#3)')
8484
t.notok(is(node, {type: 'paragraph'}), 'should match partially (#4)')
8585

86-
t.test('should accept a test', function(st) {
86+
t.test('should accept a test', function (t) {
8787
function test(node, n) {
8888
return n === 5
8989
}
9090

9191
t.notok(is(node, test))
9292
t.notok(is(node, test, 0, parent))
93-
st.ok(is(node, test, 5, parent))
93+
t.ok(is(node, test, 5, parent))
9494

95-
st.end()
95+
t.end()
9696
})
9797

98-
t.test('should invoke test', function(st) {
98+
t.test('should invoke test', function (t) {
9999
var context = {foo: 'bar'}
100100

101-
st.plan(4)
101+
t.plan(4)
102102

103103
function test(a, b, c) {
104-
st.equal(this, context)
105-
st.equal(a, node)
106-
st.equal(b, 5)
107-
st.equal(c, parent)
104+
t.equal(this, context)
105+
t.equal(a, node)
106+
t.equal(b, 5)
107+
t.equal(c, parent)
108108
}
109109

110110
is(node, test, 5, parent, context)
@@ -113,18 +113,18 @@ test('unist-util-is', function(t) {
113113
t.ok(is(node, ['strong', 'emphasis']), 'should match arrays (#1)')
114114
t.notok(is(node, ['b', 'i']), 'should match arrays (#2)')
115115

116-
t.test('should match arrays (#3)', function(st) {
116+
t.test('should match arrays (#3)', function (t) {
117117
var context = {foo: 'bar'}
118118

119-
st.plan(5)
119+
t.plan(5)
120120

121-
st.ok(is(node, [test, 'strong'], 5, parent, context))
121+
t.ok(is(node, [test, 'strong'], 5, parent, context))
122122

123123
function test(a, b, c) {
124-
st.equal(this, context)
125-
st.equal(a, node)
126-
st.equal(b, 5)
127-
st.equal(c, parent)
124+
t.equal(this, context)
125+
t.equal(a, node)
126+
t.equal(b, 5)
127+
t.equal(c, parent)
128128
return false
129129
}
130130
})

unist-util-is-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ if (
166166
}
167167

168168
/*=== usable in unified transform ===*/
169-
unified().use(() => tree => {
169+
unified().use(() => (tree) => {
170170
if (is<Heading>(tree, 'heading')) {
171171
// do something
172172
}

0 commit comments

Comments
 (0)