Skip to content

chore(package.json): update to httpxy@0.5.3#1234

Merged
chimurai merged 7 commits into
masterfrom
httpxy-0.5.2
May 21, 2026
Merged

chore(package.json): update to httpxy@0.5.3#1234
chimurai merged 7 commits into
masterfrom
httpxy-0.5.2

Conversation

@chimurai
Copy link
Copy Markdown
Owner

@chimurai chimurai commented May 19, 2026

Update to httpxy@0.5.3

Dependent on:

bump to mockttp@4.4.2

removed selfsigned dependency:

selfsigned conflicted with mockttp because both pull in the @peculiar/x509 and @peculiar/asn1-* stack, but not at the same versions.

That mattered because those libraries use schema registration at runtime. Once selfsigned introduced a newer @peculiar/* tree, mockttp could end up parsing keys/certs with classes from one version and schema storage from another. The result was the failure: Cannot get schema for 'RSAPublicKey' target

Error: Cannot get schema for 'RSAPublicKey' target
 ❯ AsnSchemaStorage.get node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/build/cjs/schema.js:17:19
 ❯ Function.fromASN node_modules/@peculiar/x509/node_modules/@peculiar/asn1-schema/build/cjs/parser.js:25:52

Summary by CodeRabbit

  • New Features

    • Added definePlugin helper function.
  • Bug Fixes

    • Fixed IPv6 target hostname handling for unspecified addresses.
    • Fixed credential preservation when normalizing bracketed IPv6 targets.
  • Chores

    • Updated httpxy dependency to version 0.5.3.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d66a16d9-21ea-4fd5-87bc-9c045fe5469e

📥 Commits

Reviewing files that changed from the base of the PR and between ffbf5bd and 691cd94.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (5)
  • CHANGELOG.md
  • package.json
  • src/utils/ipv6.ts
  • test/e2e/http2-server.spec.ts
  • test/unit/utils/ipv6.spec.ts

📝 Walkthrough

Walkthrough

This PR improves IPv6 target normalization by converting unspecified addresses (::) to loopback (::1) and preserving credentials in bracketed targets. It also migrates certificate generation from selfsigned to mockttp in E2E tests and updates the httpxy dependency.

Changes

IPv6 Normalization and Test Infrastructure

Layer / File(s) Summary
IPv6 destination hostname normalization
src/utils/ipv6.ts, test/unit/utils/ipv6.spec.ts
New normalizeIPv6DestinationHostname helper maps the unspecified IPv6 address (::) to loopback (::1) with debug logging. Integration into normalizeIPv6ProxyTarget normalizes bracketed IPv6 literal hostnames. Unit tests verify unspecified address conversion when a port is present and credentials preservation in bracketed IPv6 target URLs.
Certificate generation and dependency migration
package.json, test/e2e/http2-server.spec.ts
Removes selfsigned from dev dependencies and updates httpxy from ^0.5.1 to ^0.5.3. E2E HTTP/2 test suite migrated to mockttp.generateCACertificate for certificate generation in both HTTP/2-to-HTTP/1 and HTTP/2-to-HTTP/2 test flows. TLS key source changed from cert.private to cert.key in both secure server configurations.
Release notes
CHANGELOG.md
Added changelog entries documenting IPv6 target normalization improvements (credentials preservation and unspecified address handling), httpxy dependency version bump, and plugin-creation helper feature in the "next" section.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • chimurai/http-proxy-middleware#1225: Earlier PR that added IPv6 literal support; this PR refines bracketed/unspecified IPv6 normalization and includes the corresponding httpxy dependency update.
  • chimurai/http-proxy-middleware#1206: Overlapping IPv6 literal normalization flow modifications in src/utils/ipv6.ts and associated test adjustments in IPv6 unit and E2E tests.
  • chimurai/http-proxy-middleware#1228: Earlier HTTP/2 E2E test setup using selfsigned; this PR updates the same test file to use mockttp.generateCACertificate and cert.key instead.

Poem

🐰 IPv6 brackets straightened, destinations clarified,
:: now loops back home with gentle stride,
Credentials cradled safe through normalization's flow,
Certificates renewed through mockttp's glow. ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch httpxy-0.5.2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread test/e2e/ipv6.spec.ts Outdated
let authorizationHeader: string | undefined;

await targetServer.forGet('/api').thenCallback((req) => {
await targetServer.forGet('/api/').thenCallback((req) => {
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Regression in unjs/httpxy#138

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

https://github.com/unjs/httpxy/releases/tag/v0.5.3 is out

unjs/httpxy#142 will add ci to make sure it won't happen again

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Updated this branch to v0.5.3.
Can confirm the revert is working. 🙌

The local patch for mockttp is also working. Just have to wait for httptoolkit/mockttp#201 to land.

Thanks for the fast response and providing an awesome solution with the ecosystem test 🙏

@chimurai chimurai changed the title chore(package.json): update to httpxy@0.5.2 chore(package.json): update to httpxy@0.5.3 May 20, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 21, 2026

npm i https://pkg.pr.new/http-proxy-middleware@1234

commit: 691cd94

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 21, 2026

npm i https://pkg.pr.new/http-proxy-middleware@1234

commit: 691cd94

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 94.18% (+0.09%) from 94.086% — httpxy-0.5.2 into master

@chimurai chimurai marked this pull request as ready for review May 21, 2026 17:16
@chimurai chimurai merged commit 63ab5f9 into master May 21, 2026
25 of 26 checks passed
@chimurai chimurai deleted the httpxy-0.5.2 branch May 21, 2026 17:17
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