Skip to content

Remove API.md and jsdom/dompurify/marked dependencies#477

Merged
thehabes merged 3 commits intodevelopmentfrom
copilot/remove-api-md-jsdom-package
Mar 16, 2026
Merged

Remove API.md and jsdom/dompurify/marked dependencies#477
thehabes merged 3 commits intodevelopmentfrom
copilot/remove-api-md-jsdom-package

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

API.md was superseded by public/API.html but never removed. The /api route that rendered it pulled in jsdom, dompurify, and marked — packages that cause ESM/Jest compatibility issues and serve no other purpose.

Changes

  • API.md — deleted
  • index.js — removed GET /api route, makeCleanFileFromMarkdown(), and all associated imports (jsdom, dompurify, marked, fs)
  • package.json — removed jsdom, dompurify, and marked from dependencies
  • __tests__/mount.test.js — removed existence assertions for GET /api route and API.md file
Original prompt

This section details on the original issue you should resolve

<issue_title>API.md and jsdom</issue_title>
<issue_description>API.md is no longer in use and can be removed, it should have been removed when API.html was introduced.

The jsdom package has ESM troubles and does not work with Jest. It is only used to serve API.md.

Remove API.md and the jsdom package so we can avoid all the trouble now and in the future. </issue_description>

Comments on the Issue (you are @copilot in this section)


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

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
Copilot AI requested a review from thehabes March 16, 2026 18:38
@thehabes thehabes marked this pull request as ready for review March 16, 2026 18:44
@thehabes thehabes requested a review from cubap as a code owner March 16, 2026 18:44
@thehabes thehabes requested a review from Copilot March 16, 2026 18:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /api route and the Markdown-to-sanitized-HTML rendering pipeline from index.js.
  • Deleted API.md and updated tests/documentation artifacts to rely on public/API.html instead.
  • Removed dompurify, jsdom, and marked from dependencies and pruned them from package-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.

@thehabes thehabes merged commit 9240ab3 into development Mar 16, 2026
5 checks passed
@thehabes thehabes deleted the copilot/remove-api-md-jsdom-package branch March 16, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants