Skip to content

docs(examples): use subpath import #http-proxy-middleware#1199

Merged
chimurai merged 1 commit intomasterfrom
subpath-imports-examples
Apr 7, 2026
Merged

docs(examples): use subpath import #http-proxy-middleware#1199
chimurai merged 1 commit intomasterfrom
subpath-imports-examples

Conversation

@chimurai
Copy link
Copy Markdown
Owner

@chimurai chimurai commented Apr 7, 2026

Summary by CodeRabbit

  • Chores
    • Updated Prettier configuration for import sorting rules.
    • Updated example files to use standardized import aliasing.
    • Added import alias mapping in example package configuration to support new module resolution pattern.
    • Created new shim module to enable consistent import paths across examples.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4ac17225-4baf-4b3b-9b20-66eb63448aa5

📥 Commits

Reviewing files that changed from the base of the PR and between 42f61fb and c405370.

📒 Files selected for processing (12)
  • .prettierrc
  • examples/browser-sync/index.js
  • examples/connect/index.js
  • examples/express/index.js
  • examples/fastify/index.js
  • examples/hono/index.js
  • examples/http-server/index.js
  • examples/package.json
  • examples/response-interceptor/index.js
  • examples/sse/index.js
  • examples/subpath.shim.js
  • examples/websocket/index.js

📝 Walkthrough

Walkthrough

Updates example imports to use a new package alias #http-proxy-middleware instead of relative paths. Adds Node ESM import mapping in examples/package.json, creates a shim file for subpath resolution, and updates Prettier configuration to handle the new import pattern.

Changes

Cohort / File(s) Summary
Configuration and Aliasing
.prettierrc, examples/package.json, examples/subpath.shim.js
Added import-order group pattern for ^#.*$ in Prettier config; added Node ESM imports map aliasing #http-proxy-middleware to ./subpath.shim.js; created new shim module re-exporting from ../dist/index.js.
Example Imports
examples/browser-sync/index.js, examples/connect/index.js, examples/express/index.js, examples/fastify/index.js, examples/hono/index.js, examples/http-server/index.js, examples/response-interceptor/index.js, examples/sse/index.js, examples/websocket/index.js
Updated all example imports to use #http-proxy-middleware alias instead of ../../dist/index.js, enabling consistent subpath resolution without changes to middleware logic or configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 Through the warren of imports we hop,
From relative paths to aliases we stop,
A shim bridge is built, subpaths align,
Examples now import oh so fine! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating examples to use the new subpath import alias '#http-proxy-middleware' instead of direct dist paths, which is reflected across all modified example files and the new subpath.shim.js implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 subpath-imports-examples

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 7, 2026

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

commit: c405370

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 93.103%. remained the same — subpath-imports-examples into master

@chimurai chimurai merged commit fa96397 into master Apr 7, 2026
21 checks passed
@chimurai chimurai deleted the subpath-imports-examples branch April 7, 2026 18:24
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.

2 participants