Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: eggjs/egg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.33.0
Choose a base ref
...
head repository: eggjs/egg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.33.1
Choose a head ref
  • 2 commits
  • 6 files changed
  • 2 contributors

Commits on Jan 16, 2026

  1. fix: egg-mock for httpclient_next proxy (#5768)

    ## Background
    Previously, app.httpclient was initialized lazily. However, certain
    plugins might access the instance earlier than expected—potentially
    before the final configuration is fully composed. To address this, a
    Proxy wrapper was introduced so that the actual HTTP client is only
    instantiated when its properties or methods are actually accessed.
    
    ## Issue
    This Proxy implementation broke compatibility with egg-mock.
    Specifically, mocking via:
    ```js
    mm(app.httpclient, 'request', async () => ({ status: 500 }))
    ```
    
    no longer works as expected due to improper handling in the Proxy’s
    traps (e.g., missing or incorrect get/set behavior).
    
    ## Solution
    Refactor the Proxy to be more robust and compliant with standard object
    semantics, ensuring it correctly supports property access, method calls,
    and mocking libraries like egg-mock.
    
    ## Impact
    Only the httpclient_next initialization logic in egg.js and utils.js is
    affected. Existing behavior remains unchanged for all other use cases.
    Dipper30 authored Jan 16, 2026
    Configuration menu
    Copy the full SHA
    04cfa1b View commit details
    Browse the repository at this point in the history
  2. Release 3.33.1

    [skip ci]
    
    ## <small>3.33.1 (2026-01-16)</small>
    
    * fix: egg-mock for httpclient_next proxy (#5768) ([04cfa1b](04cfa1b)), closes [#5768](#5768)
    semantic-release-bot committed Jan 16, 2026
    Configuration menu
    Copy the full SHA
    6307e97 View commit details
    Browse the repository at this point in the history
Loading