Update dependencies
This commit is contained in:
parent
0b9dc4284e
commit
cd45dd6c6d
3 changed files with 19 additions and 22 deletions
11
index.js
11
index.js
|
@ -1,6 +1,5 @@
|
|||
import syntax from 'micromark-extension-directive'
|
||||
import fromMarkdown from 'mdast-util-directive/from-markdown.js'
|
||||
import toMarkdown from 'mdast-util-directive/to-markdown.js'
|
||||
import {directive} from 'micromark-extension-directive'
|
||||
import {directiveFromMarkdown, directiveToMarkdown} from 'mdast-util-directive'
|
||||
|
||||
var warningIssued
|
||||
|
||||
|
@ -24,9 +23,9 @@ export default function remarkDirective() {
|
|||
)
|
||||
}
|
||||
|
||||
add('micromarkExtensions', syntax())
|
||||
add('fromMarkdownExtensions', fromMarkdown)
|
||||
add('toMarkdownExtensions', toMarkdown)
|
||||
add('micromarkExtensions', directive())
|
||||
add('fromMarkdownExtensions', directiveFromMarkdown)
|
||||
add('toMarkdownExtensions', directiveToMarkdown)
|
||||
|
||||
function add(field, value) {
|
||||
// Other extensions.
|
||||
|
|
15
package.json
15
package.json
|
@ -31,21 +31,20 @@
|
|||
"index.js"
|
||||
],
|
||||
"dependencies": {
|
||||
"mdast-util-directive": "^1.0.0",
|
||||
"micromark-extension-directive": "^1.0.0"
|
||||
"mdast-util-directive": "^2.0.0",
|
||||
"micromark-extension-directive": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"c8": "^7.0.0",
|
||||
"dtslint": "^4.0.0",
|
||||
"is-hidden": "^1.0.0",
|
||||
"not": "^0.1.0",
|
||||
"is-hidden": "^2.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"remark": "^13.0.0",
|
||||
"remark-cli": "^9.0.0",
|
||||
"remark": "^14.0.0",
|
||||
"remark-cli": "^10.0.0",
|
||||
"remark-preset-wooorm": "^8.0.0",
|
||||
"tape": "^5.0.0",
|
||||
"to-vfile": "^6.0.0",
|
||||
"unified": "^9.0.0",
|
||||
"to-vfile": "^7.0.0",
|
||||
"unified": "^10.0.0",
|
||||
"xo": "^0.37.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import test from 'tape'
|
||||
import vfile from 'to-vfile'
|
||||
import unified from 'unified'
|
||||
import remark from 'remark'
|
||||
import not from 'not'
|
||||
import hidden from 'is-hidden'
|
||||
import {readSync} from 'to-vfile'
|
||||
import {unified} from 'unified'
|
||||
import {remark} from 'remark'
|
||||
import {isHidden} from 'is-hidden'
|
||||
import directive from '../index.js'
|
||||
|
||||
test('directive()', function (t) {
|
||||
|
@ -22,7 +21,7 @@ test('directive()', function (t) {
|
|||
|
||||
test('fixtures', function (t) {
|
||||
var base = path.join('test', 'fixtures')
|
||||
var entries = fs.readdirSync(base).filter(not(hidden))
|
||||
var entries = fs.readdirSync(base).filter((d) => !isHidden(d))
|
||||
|
||||
t.plan(entries.length)
|
||||
|
||||
|
@ -30,8 +29,8 @@ test('fixtures', function (t) {
|
|||
|
||||
function each(fixture) {
|
||||
t.test(fixture, function (st) {
|
||||
var file = vfile.readSync(path.join(base, fixture, 'input.md'))
|
||||
var input = String(file.contents)
|
||||
var file = readSync(path.join(base, fixture, 'input.md'))
|
||||
var input = String(file)
|
||||
var outputPath = path.join(base, fixture, 'output.md')
|
||||
var treePath = path.join(base, fixture, 'tree.json')
|
||||
var proc
|
||||
|
|
Loading…
Add table
Reference in a new issue