Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit e8de0a5

Browse files
committed
Update dev-dependencies
1 parent 8b6e455 commit e8de0a5

File tree

3 files changed

+35
-33
lines changed

3 files changed

+35
-33
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ function parseStyle(value, tagName) {
243243
}
244244
}
245245

246-
function styleCase(val) {
247-
if (val.slice(0, 4) === '-ms-') {
248-
val = 'ms-' + val.slice(4)
246+
function styleCase(value) {
247+
if (value.slice(0, 4) === '-ms-') {
248+
value = 'ms-' + value.slice(4)
249249
}
250250

251-
return val.replace(dashes, styleReplacer)
251+
return value.replace(dashes, styleReplacer)
252252
}
253253

254254
function styleReplacer($0, $1) {

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,20 @@
4646
"browserify": "^16.0.0",
4747
"hyperscript": "^2.0.0",
4848
"nyc": "^15.0.0",
49-
"prettier": "^1.0.0",
49+
"prettier": "^2.0.0",
5050
"react": "^16.0.0",
5151
"react-dom": "^16.0.0",
52-
"rehype": "^9.0.0",
53-
"remark-cli": "^7.0.0",
54-
"remark-preset-wooorm": "^6.0.0",
52+
"rehype": "^10.0.0",
53+
"remark-cli": "^8.0.0",
54+
"remark-preset-wooorm": "^7.0.0",
5555
"tape": "^4.0.0",
5656
"tinyify": "^2.0.0",
5757
"unist-builder": "^2.0.0",
5858
"vdom-to-html": "^2.0.0",
5959
"virtual-dom": "^2.0.0",
6060
"vue": "^2.0.0",
6161
"vue-server-renderer": "^2.0.0",
62-
"xo": "^0.27.0"
62+
"xo": "^0.29.0"
6363
},
6464
"scripts": {
6565
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",

test.js

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,29 @@ var toH = require('.')
1616

1717
var processor = rehype().data('settings', {fragment: true, position: false})
1818

19-
test('hast-to-hyperscript', function(t) {
19+
test('hast-to-hyperscript', function (t) {
2020
var hast
2121

2222
t.equal(typeof toH, 'function', 'should expose a function')
2323

24-
t.test('should throw if not given h', function(st) {
25-
t.throws(function() {
24+
t.test('should throw if not given h', function (st) {
25+
t.throws(function () {
2626
toH(null, u('element'))
2727
}, /h is not a function/)
2828

2929
st.end()
3030
})
3131

32-
t.test('should throw if not given a node', function(st) {
33-
t.throws(function() {
32+
t.test('should throw if not given a node', function (st) {
33+
t.throws(function () {
3434
toH(h)
3535
}, /Expected root or element, not `undefined`/)
3636

37-
t.throws(function() {
37+
t.throws(function () {
3838
toH(h, u('text', 'Alpha'))
3939
}, /Error: Expected root or element, not `text`/)
4040

41-
t.throws(function() {
41+
t.throws(function () {
4242
toH(h, u('text', 'value'))
4343
}, /Expected root or element/)
4444

@@ -147,7 +147,7 @@ test('hast-to-hyperscript', function(t) {
147147
'</div>'
148148
].join('')
149149

150-
t.test('should support `hyperscript`', function(st) {
150+
t.test('should support `hyperscript`', function (st) {
151151
// `hyperscript` does not support SVG (camelcased props).
152152
var baseline = doc.replace(/viewBox/, 'viewbox')
153153
var actual = toH(h, hast)
@@ -185,7 +185,7 @@ test('hast-to-hyperscript', function(t) {
185185
st.end()
186186
})
187187

188-
t.test('should support `virtual-dom/h`', function(st) {
188+
t.test('should support `virtual-dom/h`', function (st) {
189189
var baseline = doc.replace(/color:red;/, 'color: red')
190190
var actual = toH(v, hast)
191191
var expected = v('div', {key: 'h-1'}, [
@@ -253,7 +253,9 @@ test('hast-to-hyperscript', function(t) {
253253
st.end()
254254
})
255255

256-
t.test('should support `React.createElement` in `development`', function(st) {
256+
t.test('should support `React.createElement` in `development`', function (
257+
st
258+
) {
257259
var currentEnv = process.env.NODE_ENV
258260
var baseline = doc.replace(/color:red;/, 'color:red')
259261
process.env.NODE_ENV = 'development'
@@ -321,7 +323,7 @@ test('hast-to-hyperscript', function(t) {
321323
st.end()
322324
})
323325

324-
t.test('should support `React.createElement` in `production`', function(st) {
326+
t.test('should support `React.createElement` in `production`', function (st) {
325327
var currentEnv = process.env.NODE_ENV
326328
var baseline = doc.replace(/color:red;/, 'color:red')
327329
process.env.NODE_ENV = 'production'
@@ -388,15 +390,15 @@ test('hast-to-hyperscript', function(t) {
388390
st.end()
389391
})
390392

391-
t.test('should support `Vue`', function(st) {
393+
t.test('should support `Vue`', function (st) {
392394
var baseline = doc.replace(/<div>/, '<div data-server-rendered="true">')
393395
var actual
394396
var expected
395397

396398
st.plan(3)
397399

398400
Promise.all([vueToString(actualRender), vueToString(expectedRender)])
399-
.then(function(all) {
401+
.then(function (all) {
400402
var actualString = all[0]
401403
var expectedString = all[0]
402404

@@ -409,7 +411,7 @@ test('hast-to-hyperscript', function(t) {
409411
'equal output baseline'
410412
)
411413
})
412-
.catch(function(error) {
414+
.catch(function (error) {
413415
st.ifErr(error, 'did not expect an error')
414416
})
415417

@@ -501,7 +503,7 @@ test('hast-to-hyperscript', function(t) {
501503
}
502504
})
503505

504-
t.test('should support keys', function(st) {
506+
t.test('should support keys', function (st) {
505507
st.equal(
506508
toH(h, u('element', {tagName: 'div'})).key,
507509
undefined,
@@ -561,7 +563,7 @@ test('hast-to-hyperscript', function(t) {
561563
)
562564

563565
st.throws(
564-
function() {
566+
function () {
565567
toH(
566568
r,
567569
u('element', {
@@ -570,7 +572,7 @@ test('hast-to-hyperscript', function(t) {
570572
})
571573
)
572574
},
573-
/^Error: div\[style\]:1:12: End of comment missing$/,
575+
/^Error: div\[style]:1:12: End of comment missing$/,
574576
'react: should ignore invalid style declarations'
575577
)
576578

@@ -601,7 +603,7 @@ test('hast-to-hyperscript', function(t) {
601603
st.end()
602604
})
603605

604-
t.test('should support space', function(st) {
606+
t.test('should support space', function (st) {
605607
st.equal(
606608
toH(v, u('element', {tagName: 'div'})).namespace,
607609
null,
@@ -623,7 +625,7 @@ test('hast-to-hyperscript', function(t) {
623625
st.end()
624626
})
625627

626-
t.test('flattens a `root` with one element to that child', function(st) {
628+
t.test('flattens a `root` with one element to that child', function (st) {
627629
var actual = toH(
628630
h,
629631
u('root', [u('element', {tagName: 'h1', properties: {id: 'a'}}, [])])
@@ -636,7 +638,7 @@ test('hast-to-hyperscript', function(t) {
636638
st.end()
637639
})
638640

639-
t.test('flattens a `root` without children to a `div`', function(st) {
641+
t.test('flattens a `root` without children to a `div`', function (st) {
640642
var actual = toH(h, u('root', []))
641643
var expected = h('div')
642644
var doc = '<div></div>'
@@ -646,7 +648,7 @@ test('hast-to-hyperscript', function(t) {
646648
st.end()
647649
})
648650

649-
t.test('flattens a `root` with a text child to a `div`', function(st) {
651+
t.test('flattens a `root` with a text child to a `div`', function (st) {
650652
var actual = toH(h, u('root', [u('text', 'Alpha')]))
651653
var expected = h('div', 'Alpha')
652654
var doc = '<div>Alpha</div>'
@@ -656,7 +658,7 @@ test('hast-to-hyperscript', function(t) {
656658
st.end()
657659
})
658660

659-
t.test('flattens a `root` with more children to a `div`', function(st) {
661+
t.test('flattens a `root` with more children to a `div`', function (st) {
660662
var actual = toH(
661663
h,
662664
u('root', [
@@ -672,7 +674,7 @@ test('hast-to-hyperscript', function(t) {
672674
st.end()
673675
})
674676

675-
t.test('should support mapping to React properties', function(st) {
677+
t.test('should support mapping to React properties', function (st) {
676678
var actual = toH(
677679
r,
678680
u(
@@ -707,7 +709,7 @@ test('hast-to-hyperscript', function(t) {
707709
st.end()
708710
})
709711

710-
t.test('should use a node as a rendering context', function(st) {
712+
t.test('should use a node as a rendering context', function (st) {
711713
function mockR() {
712714
return {
713715
node: this

0 commit comments

Comments
 (0)