Skip to content

Commit b64984c

Browse files
committed
Update dev-dependencies
1 parent 88ca043 commit b64984c

File tree

2 files changed

+29
-21
lines changed

2 files changed

+29
-21
lines changed

index.js

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var inspect
1010
try {
1111
// eslint-disable-next-line import/no-dynamic-require, no-useless-concat
1212
inspect = require('ut' + 'il').inspect
13-
} catch (err) {
13+
} catch (error) {
1414
/* Empty. */
1515
}
1616

@@ -37,18 +37,18 @@ function wrap(fn) {
3737
function wrapped(node, parent) {
3838
try {
3939
fn(node, parent)
40-
} catch (err) {
41-
if (!err[ID]) {
42-
err[ID] = true
40+
} catch (error) {
41+
if (!error[ID]) {
42+
error[ID] = true
4343

44-
err.message += ': `' + view(node) + '`'
44+
error.message += ': `' + view(node) + '`'
4545

4646
if (parent) {
47-
err.message += ' in `' + view(parent) + '`'
47+
error.message += ' in `' + view(parent) + '`'
4848
}
4949
}
5050

51-
throw err
51+
throw error
5252
}
5353
}
5454
}
@@ -69,11 +69,11 @@ function unist(node) {
6969
value = node.value
7070

7171
assert.ok('type' in node, 'node should have a type')
72-
assert.equal(typeof type, 'string', '`type` should be a string')
73-
assert.notEqual(type, '', '`type` should not be empty')
72+
assert.strictEqual(typeof type, 'string', '`type` should be a string')
73+
assert.notStrictEqual(type, '', '`type` should not be empty')
7474

7575
if (value != null) {
76-
assert.equal(typeof value, 'string', '`value` should be a string')
76+
assert.strictEqual(typeof value, 'string', '`value` should be a string')
7777
}
7878

7979
location(node.position)
@@ -99,9 +99,9 @@ function unist(node) {
9999
* and re-parsed to the same (deep) value. */
100100
function vanilla(key, value) {
101101
try {
102-
assert.deepEqual(value, JSON.parse(JSON.stringify(value)))
103-
} catch (err) {
104-
assert.fail('', '', 'non-specced property `' + key + '` should be JSON')
102+
assert.deepStrictEqual(value, JSON.parse(JSON.stringify(value)))
103+
} catch (error) {
104+
assert.fail('non-specced property `' + key + '` should be JSON')
105105
}
106106
}
107107

@@ -117,7 +117,7 @@ function view(value) {
117117
} else {
118118
return JSON.stringify(value)
119119
}
120-
} catch (err) {
120+
} catch (error) {
121121
/* istanbul ignore next - Cyclical. */
122122
return String(value)
123123
}
@@ -127,15 +127,19 @@ function view(value) {
127127
function parent(node) {
128128
unist(node)
129129

130-
assert.equal('value' in node, false, 'parent should not have `value`')
130+
assert.strictEqual('value' in node, false, 'parent should not have `value`')
131131
assert.ok('children' in node, 'parent should have `children`')
132132
}
133133

134134
/* Assert `node` is a text node. */
135135
function text(node) {
136136
unist(node)
137137

138-
assert.equal('children' in node, false, 'text should not have `children`')
138+
assert.strictEqual(
139+
'children' in node,
140+
false,
141+
'text should not have `children`'
142+
)
139143
assert.ok('value' in node, 'text should have `value`')
140144
}
141145

@@ -144,8 +148,12 @@ function text(node) {
144148
function empty(node) {
145149
unist(node)
146150

147-
assert.equal('value' in node, false, 'void should not have `value`')
148-
assert.equal('children' in node, false, 'void should not have `children`')
151+
assert.strictEqual('value' in node, false, 'void should not have `value`')
152+
assert.strictEqual(
153+
'children' in node,
154+
false,
155+
'void should not have `children`'
156+
)
149157
}
150158

151159
/* Assert `location` is a Unist Location. */

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
"devDependencies": {
2626
"browserify": "^16.0.0",
2727
"esmangle": "^1.0.1",
28-
"nyc": "^11.0.0",
28+
"nyc": "^13.0.0",
2929
"prettier": "^1.12.1",
30-
"remark-cli": "^5.0.0",
30+
"remark-cli": "^6.0.0",
3131
"remark-preset-wooorm": "^4.0.0",
3232
"tape": "^4.0.0",
33-
"xo": "^0.20.0"
33+
"xo": "^0.23.0"
3434
},
3535
"scripts": {
3636
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",

0 commit comments

Comments
 (0)