From 2663ffde1819dcb0bcc6e2f17329b482ea60de39 Mon Sep 17 00:00:00 2001 From: 22BRS1317 Date: Mon, 23 Mar 2026 03:49:18 +0530 Subject: [PATCH 1/2] docs: document removed options for res.sendFile() and express.static() --- legacy/en/guide/migrating-5.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/legacy/en/guide/migrating-5.md b/legacy/en/guide/migrating-5.md index d12c829af8..781d702ef4 100755 --- a/legacy/en/guide/migrating-5.md +++ b/legacy/en/guide/migrating-5.md @@ -56,6 +56,7 @@ You can find the list of available codemods [here](https://codemod.link/express)
  • res.send(body, status)
  • res.send(status)
  • res.sendfile()
  • +
  • res.sendFile() and express.static() options
  • router.param(fn)
  • express.static.mime
  • express:router debug logs
  • @@ -376,7 +377,12 @@ app.get("/user", (req, res) => { res.sendFile("/path/to/file"); }); ``` +

    res.sendFile() and express.static() options

    +The following options to the `res.sendFile()` and `express.static()` functions are no longer supported: + +* `hidden`: Use the `dotfiles` option instead. Note that the default value of `dotfiles` is now `"ignore"`. +* `from`: Use the `root` option instead.

    router.param(fn)

    The `router.param(fn)` signature was used for modifying the behavior of the `router.param(name, fn)` function. It has been deprecated since v4.11.0, and Express 5 no longer supports it at all. From ae918dc02220347888d04897e0369dcb2eec54f9 Mon Sep 17 00:00:00 2001 From: 22BRS1317 Date: Mon, 23 Mar 2026 04:18:06 +0530 Subject: [PATCH 2/2] docs: remove incorrect SVG MIME type change --- legacy/en/guide/migrating-5.md | 1 - 1 file changed, 1 deletion(-) diff --git a/legacy/en/guide/migrating-5.md b/legacy/en/guide/migrating-5.md index 781d702ef4..746632f8b3 100755 --- a/legacy/en/guide/migrating-5.md +++ b/legacy/en/guide/migrating-5.md @@ -353,7 +353,6 @@ The `res.sendfile()` function has been replaced by a camel-cased version `res.se - CSS files (.css): now "text/css" instead of "text/plain" - XML files (.xml): now "application/xml" instead of "text/xml" - Font files (.woff): now "font/woff" instead of "application/font-woff" -- SVG files (.svg): now "image/svg+xml" instead of "application/svg+xml" {% capture codemod-camelcase-sendfile %} You can replace the deprecated signatures with the following command: