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