Skip to content

Commit 71df1f1

Browse files
committed
Update dev-dependencies
1 parent df92743 commit 71df1f1

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
'use strict'
22

3-
module.exports = require('./dist')
3+
module.exports = require('./dist/index.js')

lib/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,8 @@ function compiler(options) {
505505

506506
function onexitatxheadingsequence(token) {
507507
if (!this.stack[this.stack.length - 1].depth) {
508-
this.stack[this.stack.length - 1].depth = this.sliceSerialize(
509-
token
510-
).length
508+
this.stack[this.stack.length - 1].depth =
509+
this.sliceSerialize(token).length
511510
}
512511
}
513512

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"browserify": "^17.0.0",
4848
"commonmark.json": "^0.29.0",
4949
"dtslint": "^4.0.0",
50-
"gzip-size-cli": "^4.0.0",
50+
"gzip-size-cli": "^5.0.0",
5151
"hast-util-to-html": "^7.0.0",
5252
"mdast-util-to-hast": "^10.0.0",
5353
"nyc": "^15.0.0",
@@ -59,11 +59,11 @@
5959
"tape": "^5.0.0",
6060
"tinyify": "^3.0.0",
6161
"unified": "^9.0.0",
62-
"xo": "^0.37.0"
62+
"xo": "^0.38.0"
6363
},
6464
"scripts": {
6565
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
66-
"generate-dist": "babel lib/ --out-dir dist/ --quiet --retain-lines; prettier dist/ --loglevel error --write",
66+
"generate-dist": "babel lib/ --out-dir dist/ --quiet --retain-lines; prettier dist/index.js --loglevel error --write",
6767
"generate-size": "browserify . -p tinyify -s mdast-util-from-markdown -o mdast-util-from-markdown.min.js; gzip-size mdast-util-from-markdown.min.js --raw",
6868
"generate": "npm run generate-dist && npm run generate-size",
6969
"test-api": "node test",

test/index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -894,10 +894,13 @@ test('mdast-util-from-markdown', function (t) {
894894

895895
test('fixtures', function (t) {
896896
var base = join('test', 'fixtures')
897+
const files = fs.readdirSync(base).filter((d) => path.extname(d) === '.md')
898+
let index = -1
897899

898-
fs.readdirSync(base)
899-
.filter((d) => path.extname(d) === '.md')
900-
.forEach((d) => each(path.basename(d, path.extname(d))))
900+
while (++index < files.length) {
901+
const file = files[index]
902+
each(path.basename(file, path.extname(file)))
903+
}
901904

902905
t.end()
903906

@@ -920,7 +923,10 @@ test('fixtures', function (t) {
920923
})
921924

922925
test('commonmark', function (t) {
923-
commonmark.forEach(each)
926+
let index = -1
927+
while (++index < commonmark.length) {
928+
each(commonmark[index], index)
929+
}
924930

925931
t.end()
926932

0 commit comments

Comments
 (0)