Skip to content

Commit ef70472

Browse files
committed
Make micromark-core-commonmark a direct dependency to satisfy strict dependency resolution (e.g., pnpm).
1 parent 795eac2 commit ef70472

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib/micromark-parse.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { gfmFootnote } from "micromark-extension-gfm-footnote";
66
import { gfmTable } from "micromark-extension-gfm-table";
77
import { math } from "micromark-extension-math";
88
import { parse as micromarkParse, postprocess as micromarkPostprocess, preprocess as micromarkPreprocess } from "micromark";
9-
// micromark-core-commonmark is not a dependency because this instance must match what's used by micromark
10-
// eslint-disable-next-line n/no-extraneous-import
9+
// micromark-core-commonmark must exactly match what's used by micromark for the shim below to work correctly
10+
// Unfortunately, omitting this dependency from package.json breaks strict dependency resolution (e.g., pnpm)
1111
import { labelEnd } from "micromark-core-commonmark";
1212
import { isHtmlFlowComment } from "../helpers/micromark-helpers.cjs";
1313
import { flatTokensSymbol, htmlFlowSymbol, newLineRe } from "../helpers/shared.cjs";

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"dependencies": {
7474
"markdown-it": "14.1.0",
7575
"micromark": "4.0.1",
76+
"micromark-core-commonmark": "2.0.2",
7677
"micromark-extension-directive": "3.0.2",
7778
"micromark-extension-gfm-autolink-literal": "2.1.0",
7879
"micromark-extension-gfm-footnote": "2.1.0",

0 commit comments

Comments
 (0)