Skip to content

release: v4.0.0 (breaking) - #288

Merged
jaredwray merged 1 commit into
mainfrom
release/v4.0.0
Nov 19, 2026
Merged

jaredwray merged 1 commit into
mainfrom
release/v4.0.0

Conversation

@jaredwray

Copy link
Copy Markdown
Owner

Please check if the PR fulfills these requirements

  • Followed the Contributing and Code of Conduct guidelines.
  • The version field is the only change. This pull request does not add, change, or delete a test.

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Release. This pull request sets the package version to 4.0.0.

Release summary

Bin management requires an owner token. A reserved header name returns HTTP 400.

@jaredwray/mockhttp@4.0.0 — 2026-11-19

Bin management requires an owner token. A reserved header name returns HTTP 400.

⚠ BREAKING CHANGES

  • Bin management routes require an owner token. MockHttpBins throws when idLength is not a positive integer (fix(security): bin owner tokens and reject framing headers in /response-headers #275)
    Migration: Read token from POST /bins. Send Authorization: Bearer <token> on each later /bins call. The capture path /b/:id stays open. In-process methods such as getBin do not require the token.

    # Before 4.0.0
    POST /bins            → 200 { "id", "url", "createdAt", "expiresAt", "requestCount" }
    GET  /bins            → 200 { "bins": [ ...every bin ] }
    GET  /bins/:id        → 200 bin metadata
    
    # After 4.0.0
    POST /bins            → 200 { "id", "token", "url", "createdAt", "expiresAt", "requestCount" }
    GET  /bins            → 401 without a token; 200 { "bins": [ that bin ] } with Bearer
    GET  /bins/:id        → 401 { "error": "unauthorized" } without a token
    GET  /bins/:id        → 404 { "error": "bin_not_found" } for a wrong token
    ANY  /b/:id           → unchanged (no token)

Bug Fixes

  • Reject reserved header names on /response-headers (Reject reserved header names on /response-headers #277)

    # Before
    GET /response-headers?trailer=x  → process exit (ERR_HTTP_TRAILER_INVALID)
    
    # After
    GET /response-headers?trailer=x  → 400 { "error": "The header name \"trailer\" is not permitted." }

Documentation

Internal

Contributors

Full List of Changes

Full diff: v3.0.2...v4.0.0

Verification

  • pnpm install --frozen-lockfile succeeds
  • pnpm build succeeds
  • pnpm test:ci passes locally
  • No uncommitted changes outside the version bump
  • Test audit: this pull request does not add, change, or delete a test. The version field is the only change.

Post-merge

  • Merge, then create a GitHub Release at tag v4.0.0. The release.yaml workflow publishes to npm.
Open in Web Open in Cursor 

Move the version from 3.0.2 to 4.0.0.
This cut ships the owner token change.

Co-authored-by: Jared Wray <me@jaredwray.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T22:40:42.399673Z 2c0ca46 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (6ecc479) to head (2c0ca46).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #288   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           44        44           
  Lines         2012      2012           
  Branches       434       434           
=========================================
  Hits          2012      2012           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jaredwray
jaredwray merged commit 9120450 into main Nov 19, 2026
14 checks passed
@jaredwray
jaredwray deleted the release/v4.0.0 branch November 19, 2026 22:48
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