Skip to content

Commit 89fadb7

Browse files
committed
Update dev-dependencies
1 parent 418ae1d commit 89fadb7

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
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-modify-children.js
33
unist-util-modify-children.min.js
4+
*.json
5+
*.md

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,16 @@
3636
"browserify": "^16.0.0",
3737
"dtslint": "^3.3.0",
3838
"nyc": "^15.0.0",
39-
"prettier": "^1.0.0",
40-
"remark-cli": "^7.0.0",
41-
"remark-preset-wooorm": "^6.0.0",
42-
"tape": "^4.0.0",
39+
"prettier": "^2.0.0",
40+
"remark-cli": "^8.0.0",
41+
"remark-preset-wooorm": "^7.0.0",
42+
"tape": "^5.0.0",
4343
"tinyify": "^2.0.0",
44-
"unified": "^8.4.2",
45-
"xo": "^0.28.0"
44+
"unified": "^9.0.0",
45+
"xo": "^0.32.0"
4646
},
4747
"scripts": {
48-
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
48+
"format": "remark . -qfo && prettier . --write && xo --fix",
4949
"build-bundle": "browserify . -s unistUtilModifyChildren > unist-util-modify-children.js",
5050
"build-mangle": "browserify . -s unistUtilModifyChildren -p tinyify > unist-util-modify-children.min.js",
5151
"build": "npm run build-bundle && npm run build-mangle",
@@ -66,6 +66,7 @@
6666
"prettier": true,
6767
"esnext": false,
6868
"ignore": [
69+
"types/",
6970
"unist-util-modify-children.js"
7071
]
7172
},

test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ var modifyChildren = require('.')
55

66
var noop = Function.prototype
77

8-
test('modifyChildren()', function(t) {
8+
test('modifyChildren()', function (t) {
99
t.throws(
10-
function() {
10+
function () {
1111
modifyChildren(noop)()
1212
},
1313
/Missing children in `parent`/,
1414
'should throw without node'
1515
)
1616

1717
t.throws(
18-
function() {
18+
function () {
1919
modifyChildren(noop)({})
2020
},
2121
/Missing children in `parent`/,
2222
'should throw without parent'
2323
)
2424

25-
t.test('should invoke `fn` for each child in `parent`', function(st) {
25+
t.test('should invoke `fn` for each child in `parent`', function (st) {
2626
var values = [0, 1, 2, 3]
2727
var context = {}
2828
var n = -1
2929

3030
context.children = values
3131

32-
modifyChildren(function(child, index, parent) {
32+
modifyChildren(function (child, index, parent) {
3333
n++
3434
st.strictEqual(child, values[n])
3535
st.strictEqual(index, n)
@@ -39,11 +39,11 @@ test('modifyChildren()', function(t) {
3939
st.end()
4040
})
4141

42-
t.test('should work when new children are added', function(st) {
42+
t.test('should work when new children are added', function (st) {
4343
var values = [0, 1, 2, 3, 4, 5, 6]
4444
var n = -1
4545

46-
modifyChildren(function(child, index, parent) {
46+
modifyChildren(function (child, index, parent) {
4747
n++
4848

4949
if (index < 3) {
@@ -57,14 +57,14 @@ test('modifyChildren()', function(t) {
5757
st.end()
5858
})
5959

60-
t.test('should skip forwards', function(st) {
60+
t.test('should skip forwards', function (st) {
6161
var values = [0, 1, 2, 3]
6262
var n = -1
6363
var context = {}
6464

6565
context.children = [0, 1, 3]
6666

67-
modifyChildren(function(child, index, parent) {
67+
modifyChildren(function (child, index, parent) {
6868
st.strictEqual(child, values[++n])
6969

7070
if (child === 1) {
@@ -78,15 +78,15 @@ test('modifyChildren()', function(t) {
7878
st.end()
7979
})
8080

81-
t.test('should skip backwards', function(st) {
81+
t.test('should skip backwards', function (st) {
8282
var invocations = [0, 1, -1, 0, 1, 2, 3]
8383
var n = -1
8484
var context = {}
8585
var inserted
8686

8787
context.children = [0, 1, 2, 3]
8888

89-
modifyChildren(function(child, index, parent) {
89+
modifyChildren(function (child, index, parent) {
9090
st.strictEqual(child, invocations[++n])
9191

9292
if (!inserted && child === 1) {

types/unist-util-modify-children-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ modifyChildren(() => '')
2828
modifyChildren((node, index) => index + 1)(node)
2929

3030
// Usable in unified transform
31-
unified().use(() => tree => {
31+
unified().use(() => (tree) => {
3232
const modify = modifyChildren((node, index, parent) => {
3333
if (node.type === 'node') {
3434
parent.children.splice(index, 1, {

0 commit comments

Comments
 (0)