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

Upgrade mdast-util-to-string #358

Merged
7 commits merged into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const bsconfig = require('./bsconfig.json');

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

const config = {
Expand All @@ -13,6 +13,9 @@ const config = {
fs: false
}
}
config.experiments = {
topLevelAwait: true,
}
return config
},
// Might need to move this to nginx or other config,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"gray-matter": "^4.0.3",
"http-server": "^0.12.3",
"js-yaml": "^4.1.0",
"mdast-util-to-string": "^2.0.0",
"mdast-util-to-string": "^3.1.0",
"next-transpile-modules": "^7.1.0",
"rehype-highlight": "^4.1.0",
"rehype-stringify": "^8.0.0",
Expand Down
6 changes: 5 additions & 1 deletion src/Unified.res
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
%%raw(`
const MdastUtilToStringInternal = (await import('mdast-util-to-string')).toString
`)

module MarkdownTableOfContents = {
type rec toc = {
label: string,
Expand Down Expand Up @@ -46,5 +50,5 @@ type attacher = unit => transformer
@module("rehype-highlight") external rehypeHighlight: attacher = "default"

module MdastUtilToString = {
@module("mdast-util-to-string") external toString: headingnode => string = "default"
@val external toString: headingnode => string = "MdastUtilToStringInternal"
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,11 @@ mdast-util-to-string@^2.0.0:
resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz#b8cfe6a713e1091cb5b728fc48885a4767f8b97b"
integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==

mdast-util-to-string@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-3.1.0.tgz#56c506d065fbf769515235e577b5a261552d56e9"
integrity sha512-n4Vypz/DZgwo0iMHLQL49dJzlp7YtAJP+N07MZHpjPf/5XJuHUWstviF4Mn2jEiR/GNmtnRRqnwsXExk3igfFA==

mdurl@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
Expand Down