From cd45dd6c6dd100d32c7abe7aca06115cb468cd45 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 5 Aug 2021 15:45:21 +0200 Subject: [PATCH] Update dependencies --- index.js | 11 +++++------ package.json | 15 +++++++-------- test/index.js | 15 +++++++-------- 3 files changed, 19 insertions(+), 22 deletions(-) diff --git a/index.js b/index.js index 32806c0..8607c67 100644 --- a/index.js +++ b/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. diff --git a/package.json b/package.json index 270a784..f6e6e90 100644 --- a/package.json +++ b/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": { diff --git a/test/index.js b/test/index.js index 4fd0915..56fcdee 100644 --- a/test/index.js +++ b/test/index.js @@ -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