Remove API.md and jsdom/dompurify/marked dependencies#477
Merged
thehabes merged 3 commits intodevelopmentfrom Mar 16, 2026
Merged
Remove API.md and jsdom/dompurify/marked dependencies#477thehabes merged 3 commits intodevelopmentfrom
thehabes merged 3 commits intodevelopmentfrom
Conversation
Co-authored-by: thehabes <3287006+thehabes@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove API.md and jsdom package
Remove API.md and jsdom/dompurify/marked dependencies
Mar 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the dynamic /api documentation endpoint that generated HTML from API.md, shifting API docs to the static public/API.html page and cleaning up now-unused dependencies and tests accordingly.
Changes:
- Removed the Express
GET /apiroute and the Markdown-to-sanitized-HTML rendering pipeline fromindex.js. - Deleted
API.mdand updated tests/documentation artifacts to rely onpublic/API.htmlinstead. - Removed
dompurify,jsdom, andmarkedfrom dependencies and pruned them frompackage-lock.json.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| public/API.html | Removes footer text implying the page is generated from API.md. |
| package.json | Drops dependencies used only for the removed /api Markdown rendering. |
| package-lock.json | Removes lockfile entries corresponding to dropped dependencies. |
| index.js | Removes /api docs route and Markdown sanitization/rendering code, leaving only root routing. |
| API.md | Deletes the Markdown documentation source file. |
| tests/mount.test.js | Updates existence tests to stop expecting /api route and API.md file. |
Comments suppressed due to low confidence (1)
index.js:23
- The GET /api route has been removed. If any external links or tooling rely on /api for API documentation, this is a breaking change; consider keeping a lightweight /api handler that redirects (301/302) to the static /API.html (or serves it) to preserve backwards compatibility.
router
.route("/")
.get(function (_req, res, next) {
respondWithHTML(res)
})
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API.mdwas superseded bypublic/API.htmlbut never removed. The/apiroute that rendered it pulled injsdom,dompurify, andmarked— packages that cause ESM/Jest compatibility issues and serve no other purpose.Changes
API.md— deletedindex.js— removedGET /apiroute,makeCleanFileFromMarkdown(), and all associated imports (jsdom,dompurify,marked,fs)package.json— removedjsdom,dompurify, andmarkedfrom dependencies__tests__/mount.test.js— removed existence assertions forGET /apiroute andAPI.mdfileOriginal prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.