Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 3, 2021
1 parent 42d1b21 commit 234bc9b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 27 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"camelcase": "^6.0.0",
"dtslint": "^4.0.0",
"execa": "^5.0.0",
"lerna": "^3.0.0",
"mdast-util-assert": "^3.0.0",
"mdast-util-gfm": "^0.1.0",
"micromark-extension-gfm": "^0.3.0",
"lerna": "^4.0.0",
"mdast-util-assert": "^4.0.0",
"mdast-util-gfm": "^1.0.0",
"micromark-extension-gfm": "^1.0.0",
"prettier": "^2.0.0",
"remark-preset-wooorm": "^8.0.0",
"tape": "^5.0.0",
"typescript": "^4.0.0",
"unified": "^9.0.0",
"unist-util-remove-position": "^3.0.0",
"unified": "^10.0.0",
"unist-util-remove-position": "^4.0.0",
"xo": "^0.37.0"
},
"scripts": {
Expand Down
14 changes: 7 additions & 7 deletions packages/remark-parse/test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import test from 'tape'
import unified from 'unified'
import gfmSyntax from 'micromark-extension-gfm'
import gfm from 'mdast-util-gfm/from-markdown.js'
import remove from 'unist-util-remove-position'
import {unified} from 'unified'
import {gfm} from 'micromark-extension-gfm'
import {gfmFromMarkdown} from 'mdast-util-gfm'
import {removePosition} from 'unist-util-remove-position'
import remarkParse from './index.js'

test('remarkParse', function (t) {
Expand All @@ -14,12 +14,12 @@ test('remarkParse', function (t) {

t.test('extensions', function (st) {
var tree = unified()
.data('micromarkExtensions', [gfmSyntax()])
.data('fromMarkdownExtensions', [gfm])
.data('micromarkExtensions', [gfm()])
.data('fromMarkdownExtensions', [gfmFromMarkdown])
.use(remarkParse)
.parse('* [x] [email protected] ~~strikethrough~~')

remove(tree, true)
removePosition(tree, true)

st.deepEqual(
tree,
Expand Down
28 changes: 20 additions & 8 deletions packages/remark-stringify/test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import test from 'tape'
import unified from 'unified'
import parse from '../remark-parse/index.js'
import gfm from 'mdast-util-gfm/to-markdown.js'
import {unified} from 'unified'
import {gfmToMarkdown} from 'mdast-util-gfm'
import remarkParse from '../remark-parse/index.js'
import remarkStringify from './index.js'

test('remarkStringify', function (t) {
Expand Down Expand Up @@ -314,7 +314,7 @@ test('remarkStringify', function (t) {
tests.forEach(function (test) {
st.equal(
unified()
.use(parse)
.use(remarkParse)
.use(remarkStringify)
.processSync(test[1] + '\n\n[bravo]: #\n')
.toString(),
Expand Down Expand Up @@ -361,21 +361,33 @@ test('remarkStringify', function (t) {

var example = '[[email protected]](mailto:[email protected])'
st.equal(
unified().use(parse).use(remarkStringify).processSync(example).toString(),
unified()
.use(remarkParse)
.use(remarkStringify)
.processSync(example)
.toString(),
'<[email protected]>\n',
'url is `mailto:` plus link text'
)

example = '[mailto:[email protected]](mailto:[email protected])'
st.equal(
unified().use(parse).use(remarkStringify).processSync(example).toString(),
unified()
.use(remarkParse)
.use(remarkStringify)
.processSync(example)
.toString(),
'<mailto:[email protected]>\n',
'url is link text'
)

example = '[example](mailto:[email protected])\n'
st.equal(
unified().use(parse).use(remarkStringify).processSync(example).toString(),
unified()
.use(remarkParse)
.use(remarkStringify)
.processSync(example)
.toString(),
example,
'url is not link text'
)
Expand Down Expand Up @@ -456,7 +468,7 @@ test('stringify escapes', function (t) {

test('extensions', function (t) {
var doc = unified()
.data('toMarkdownExtensions', [gfm()])
.data('toMarkdownExtensions', [gfmToMarkdown()])
.use(remarkStringify)
.stringify({
type: 'root',
Expand Down
12 changes: 6 additions & 6 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'tape'
import remove from 'unist-util-remove-position'
import mdast from 'mdast-util-assert'
import {removePosition} from 'unist-util-remove-position'
import {assert} from 'mdast-util-assert'
import {remark} from '../packages/remark/index.js'
import {fixtures} from './fixtures/index.js'

Expand All @@ -27,7 +27,7 @@ test('fixtures', function (t) {

actualTree = remark().parse(fixture.input)

mdast(actualTree)
assert(actualTree)

st.deepLooseEqual(
actualTree,
Expand All @@ -42,9 +42,9 @@ test('fixtures', function (t) {
if (fixture.output !== false) {
reparsedTree = remark().parse(actualOutput)

mdast(reparsedTree)
remove(actualTree, true)
remove(reparsedTree, true)
assert(reparsedTree)
removePosition(actualTree, true)
removePosition(reparsedTree, true)

st.deepEqual(
actualTree,
Expand Down

0 comments on commit 234bc9b

Please sign in to comment.