Skip to content

build(deps-dev): bump supertest from 6.3.0 to 7.3.0 - #7494

Merged
bjohansebas merged 1 commit into
expressjs:masterfrom
noritaka1166:bump-supertest-7.3.0
Oct 9, 2026
Merged

bjohansebas merged 1 commit into
expressjs:masterfrom
noritaka1166:bump-supertest-7.3.0

Conversation

@noritaka1166

Copy link
Copy Markdown
Contributor

Summary

  • Upgrade the deprecated SuperTest 6.x dev dependency from ^6.3.0 to ^7.3.0.
  • Add a small shared test helper to send paths containing .. or %2e%2e unchanged. SuperAgent otherwise normalizes these paths before Express receives them.
  • Keep the existing path traversal assertions and leave production code unchanged.

Related PR

This is an alternative to #6856. Both PRs address URL normalization in the newer SuperAgent version used by SuperTest 7. This approach keeps the affected tests short by sharing the path handling in test/support/utils.js.

The helper uses SuperAgent's request event to access the underlying Node request and set its path.

Testing

  • npm run lint — passed
  • npm run test-ci — 1,261 tests passed in a local run

Signed-off-by: Noritaka Kobayashi <arukimedesu1166777@gmail.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​supertest@​6.3.4 ⏵ 7.3.099100100 +187 +37100

View full report

@krzysdz krzysdz added tests deps dependencies Pull requests that update a dependency file labels Sep 29, 2026
@bjohansebas
bjohansebas merged commit 6d2df03 into expressjs:master Oct 9, 2026
30 checks passed
@krzysdz

krzysdz commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

@bjohansebas I forgot to request changes, but the latest supertest works without additional changes. forwardemail/superagent#1816 was fixed in forwardemail/superagent@5663802 (released in superagent@10.4.0). You can see it working without those additional changes introduced by this PR in expressjs/serve-index#171 (serve-index had the same problem).

Can you revert this and push just the supertest change in package.json?

@bjohansebas

Copy link
Copy Markdown
Member

Can you revert this and push just the supertest change in package.json?

For a quick merge, someone else needs to open the PR; otherwise, I’ll be blocked by the repo rules

@krzysdz

krzysdz commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Oh, there's also another problem - supertest 7.3.1 introduced a regression (forwardemail/supertest#911), which makes the CI fail, so it'd have to be pinned to 7.3.0.
This is also a problem in other repos - e.g. expressjs/body-parser#772

@krzysdz

krzysdz commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

I'll create a PR with just a revert and maybe let's wait until the new regression is fixed, before updating supertest

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 deps tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants