Skip to content

chore(deps): Bump express and @types/express - #11

Merged
Samuelf27 merged 3 commits into
mainfrom
dependabot/npm_and_yarn/multi-b251156d90
Aug 15, 2026
Merged

chore(deps): Bump express and @types/express#11
Samuelf27 merged 3 commits into
mainfrom
dependabot/npm_and_yarn/multi-b251156d90

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 15, 2026

Copy link
Copy Markdown
Contributor

Bumps express and @types/express. These dependencies needed to be updated together.
Updates express from 4.22.2 to 5.2.1

Release notes

Sourced from express's releases.

v5.2.1

What's Changed

[!IMPORTANT]
The prior release (5.2.0) included an erroneous breaking change related to the extended query parser. There is no actual security vulnerability associated with this behavior (CVE-2024-51999 has been rejected). The change has been fully reverted in this release.

Full Changelog: expressjs/express@v5.2.0...v5.2.1

v5.2.0

Important: Security

What's Changed

... (truncated)

Changelog

Sourced from express's changelog.

5.2.1 / 2025-12-01

  • Revert security fix for CVE-2024-51999 (GHSA-pj86-cfqh-vqx6)
    • The prior release (5.2.0) included an erroneous breaking change related to the extended query parser. There is no actual security vulnerability associated with this behavior (CVE-2024-51999 has been rejected). The change has been fully reverted in this release.

5.2.0 / 2025-12-01

  • Security fix for CVE-2024-51999 (GHSA-pj86-cfqh-vqx6)
  • deps: body-parser@^2.2.1
  • A deprecation warning was added when using res.redirect with undefined arguments, Express now emits a warning to help detect calls that pass undefined as the status or URL and make them easier to fix.

5.1.0 / 2025-03-31

  • Add support for Uint8Array in res.send()
  • Add support for ETag option in res.sendFile()
  • Add support for multiple links with the same rel in res.links()
  • Add funding field to package.json
  • perf: use loop for acceptParams
  • refactor: prefix built-in node module imports
  • deps: remove setprototypeof
  • deps: remove safe-buffer
  • deps: remove utils-merge
  • deps: remove methods
  • deps: remove depd
  • deps: debug@^4.4.0
  • deps: body-parser@^2.2.0
  • deps: router@^2.2.0
  • deps: content-type@^1.0.5
  • deps: finalhandler@^2.1.0
  • deps: qs@^6.14.0
  • deps: server-static@2.2.0
  • deps: type-is@2.0.1

5.0.1 / 2024-10-08

5.0.0 / 2024-09-10

  • remove:
    • path-is-absolute dependency - use path.isAbsolute instead
  • breaking:
    • res.status() accepts only integers, and input must be greater than 99 and less than 1000
      • will throw a RangeError: Invalid status code: ${code}. Status code must be greater than 99 and less than 1000. for inputs outside this range
      • will throw a TypeError: Invalid status code: ${code}. Status code must be an integer. for non integer inputs
    • deps: send@1.0.0

... (truncated)

Commits

Updates @types/express from 4.17.25 to 5.0.6

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Aug 15, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/multi-b251156d90 branch 2 times, most recently from 735631d to 4916a84 Compare August 15, 2026 04:14
Bumps [express](https://github.com/expressjs/express) and [@types/express](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/express). These dependencies needed to be updated together.

Updates `express` from 4.22.2 to 5.2.1
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](expressjs/express@v4.22.2...v5.2.1)

Updates `@types/express` from 4.17.25 to 5.0.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/express)

---
updated-dependencies:
- dependency-name: "@types/express"
  dependency-version: 5.0.6
  dependency-type: direct:development
  update-type: version-update:semver-major
- dependency-name: express
  dependency-version: 5.2.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/multi-b251156d90 branch from 4916a84 to 209c60b Compare August 15, 2026 05:22
No Express 5, req.params de um Request cru e `string | string[]` (wildcards
podem produzir arrays). O asyncHandler apagava o tipo dos params; agora e
generico, e as tres rotas /:id declaram Request<{ id: string }>.

Validado local com express 5.2.1: tsc limpo e 20 testes de integracao verdes.
No Express 5, req.params de um Request cru e `string | string[]` (wildcards
podem produzir arrays). O asyncHandler apagava o tipo dos params; agora e
generico, e as tres rotas /:id declaram Request<{ id: string }>.

Validado local com express 5.2.1: tsc limpo e 20 testes de integracao verdes.
@Samuelf27

Copy link
Copy Markdown
Owner

Corrigido no proprio branch — Express 5 mudou a tipagem dos params

O typecheck quebrava em tres rotas:

src/modules/users/routes.ts(30,48): error TS2345:
  Argument of type 'string | string[]' is not assignable to parameter of type 'string'.

Causa: no @types/express 5, req.params de um Request cru passou a ser string | string[] — os wildcards *nome do Express 5 podem produzir arrays. Para rotas com :id o valor e sempre string em runtime, mas o tipo precisa ser declarado.

Correcao (2 arquivos):

  • asyncHandler virou generico (<Req extends Request = Request>) — antes ele apagava o tipo dos params de qualquer handler que passasse por ele
  • As tres rotas /:id declaram asyncHandler<Request<{ id: string }>> — o tipo certo, em vez de um cast

Validado localmente com express@5.2.1: tsc --noEmit limpo e os 20 testes de integracao verdes.

CI do PR confirma na sequencia.

@Samuelf27
Samuelf27 merged commit afe82d1 into main Aug 15, 2026
1 check passed
@Samuelf27
Samuelf27 deleted the dependabot/npm_and_yarn/multi-b251156d90 branch August 15, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant