feat: usage of ESM modules imports (instead of CommonJS)

Fixes #10

BREAKING CHANGE: This package is now pure ESM

BREAKING CHANGE: minimum supported Node.js >= 22.0.0
This commit is contained in:
theoludwig committed 2024-12-28 22:52:51 +01:00
1 parent b4a04d2e8e
commit aa24db4fac
13 files changed
+1322 -1143

No files matched your search

+4 -4
View File
@@ -1,14 +1,14 @@
const { test } = require("node:test")
const assert = require("node:assert/strict")
import { test } from "node:test"
import assert from "node:assert/strict"
const {
import {
convertHeadingToHTMLFragment,
getMarkdownHeadings,
getMarkdownIdOrAnchorNameFragments,
isValidIntegerString,
getNumberOfLines,
getLineNumberStringFromFragment,
} = require("../src/utils.js")
} from "../src/utils.js"
test("utils", async (t) => {
await t.test("convertHeadingToHTMLFragment", async () => {