Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit d9cded4

Browse files
committed
Switch back to .js for docs changelog
1 parent 5978a28 commit d9cded4

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

docs/.vitepress/changelog.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const { promises: fs } = require("fs");
2+
const path = require("path");
3+
4+
(async () => {
5+
const changelogPath = path.resolve(__dirname, "..", "..", "CHANGELOG.md");
6+
const changelog = await fs.readFile(changelogPath, "utf8");
7+
8+
const docsChangelogPath = path.resolve(__dirname, "..", "changelog.md");
9+
// Rewrite https://miniflare.dev paths to relative paths
10+
const docsChangelog = changelog.replace(/]\(https:\/\/miniflare.dev/g, "](");
11+
await fs.writeFile(docsChangelogPath, docsChangelog, "utf8");
12+
})();

docs/.vitepress/changelog.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"build:fixtures": "node test/fixtures/build.js",
2626
"lint": "eslint '{src,test}/**/*.ts'",
2727
"prepublishOnly": "npm run lint && npm run build && npm run test",
28-
"docs:changelog": "node docs/.vitepress/changelog.mjs",
28+
"docs:changelog": "node docs/.vitepress/changelog.js",
2929
"docs:dev": "npm run docs:changelog && vitepress dev docs",
3030
"docs:build": "npm run docs:changelog && vitepress build docs",
3131
"docs:serve": "vitepress serve docs"

0 commit comments

Comments
 (0)