Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions en/guide/migrating-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ You can find the list of available codemods [here](https://codemod.link/express)
<li><a href="#res.send.body">res.send(body, status)</a></li>
<li><a href="#res.send.status">res.send(status)</a></li>
<li><a href="#res.sendfile">res.sendfile()</a></li>
<li><a href="#res.sendFile.options">res.sendFile() and express.static() options</a></li>
<li><a href="#router.param">router.param(fn)</a></li>
<li><a href="#express.static.mime">express.static.mime</a></li>
<li><a href="#send-methods">Removed send methods</a></li>
<li><a href="#express:router-debug-logs">express:router debug logs</a></li>
</ul>

Expand Down Expand Up @@ -402,6 +404,22 @@ const mime = require('mime-types')
mime.lookup('json')
```

<h3 id="res.sendFile.options">res.sendFile() and express.static() options</h3>

The following options to the `res.sendFile()` and `express.static()` functions are no longer supported:

* `hidden`: Use the `dotfiles` option instead.
* `from`: Use the `root` option instead.

<h3 id="send-methods">Removed send methods</h3>

The `send` package no longer exports the following methods. If your app relies on them, replace them with properties in the `options` object for `res.sendFile()` and `express.static()`:

* `send.etag()`: Use the `etag` option instead.
* `send.index()`: Use the `index` option instead.
* `send.maxage()`: Use the `maxAge` option instead.
* `send.root()`: Use the `root` option instead.

<h3 id="express:router-debug-logs">express:router debug logs</h3>

In Express 5, router handling logic is performed by a dependency. Therefore, the
Expand Down
Loading