Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Commit 617d525

Browse files
author
kanishka-work
authored
Upgrade mdast-util-to-string (#358)
* 2.0 -> 3.1.0
1 parent 772c874 commit 617d525

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

next.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const bsconfig = require('./bsconfig.json');
22

3-
const transpileModules = ["bs-platform"].concat(bsconfig["bs-dependencies"]);
3+
const transpileModules = ["bs-platform", "mdast-util-to-string"].concat(bsconfig["bs-dependencies"]);
44
const withTM = require("next-transpile-modules")(transpileModules);
55

66
const config = {
@@ -13,6 +13,9 @@ const config = {
1313
fs: false
1414
}
1515
}
16+
config.experiments = {
17+
topLevelAwait: true,
18+
}
1619
return config
1720
},
1821
// Might need to move this to nginx or other config,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"gray-matter": "^4.0.3",
4343
"http-server": "^0.12.3",
4444
"js-yaml": "^4.1.0",
45-
"mdast-util-to-string": "^2.0.0",
45+
"mdast-util-to-string": "^3.1.0",
4646
"next-transpile-modules": "^7.1.0",
4747
"rehype-highlight": "^4.1.0",
4848
"rehype-stringify": "^8.0.0",

src/Unified.res

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
%%raw(`
2+
const MdastUtilToStringInternal = (await import('mdast-util-to-string')).toString
3+
`)
4+
15
module MarkdownTableOfContents = {
26
type rec toc = {
37
label: string,
@@ -46,5 +50,5 @@ type attacher = unit => transformer
4650
@module("rehype-highlight") external rehypeHighlight: attacher = "default"
4751

4852
module MdastUtilToString = {
49-
@module("mdast-util-to-string") external toString: headingnode => string = "default"
53+
@val external toString: headingnode => string = "MdastUtilToStringInternal"
5054
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,11 @@ mdast-util-to-string@^2.0.0:
18431843
resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b"
18441844
integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==
18451845

1846+
mdast-util-to-string@^3.1.0:
1847+
version "3.1.0"
1848+
resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.1.0.tgz#56c506d065fbf769515235e577b5a261552d56e9"
1849+
integrity sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA==
1850+
18461851
mdurl@^1.0.0:
18471852
version "1.0.1"
18481853
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"

0 commit comments

Comments
 (0)