Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Jul 4, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.2)

Can you help keep this open source service alive? 💖 Please sponsor : )

Summary by Sourcery

Refine SSG parameter middleware to correctly handle dynamic routes by centralizing route detection, prevent duplicate callback executions and unintended handler calls, and add tests to verify the updated behavior

Bug Fixes:

  • Ensure ssgParams callback runs only once during static generation
  • Prevent execution of subsequent handlers after ssgParams on dynamic routes

Enhancements:

  • Extract isDynamicRoute utility into shared utils
  • Update ssgParams middleware to use isDynamicRoute and return 404 for dynamic routes

Tests:

  • Add tests for single invocation of ssgParams callback
  • Add tests to confirm handler bypass for dynamic routes

* fix(ssg): invoke callback when it's only a dynamic route

Co-authored-by: Taku Amano <[email protected]>

* should not invoke handler after ssgParams for dynamic route request

---------

Co-authored-by: Taku Amano <[email protected]>
@pull pull bot locked and limited conversation to collaborators Jul 4, 2025
@pull pull bot added the ⤵️ pull label Jul 4, 2025
@pull pull bot merged commit ed9d72f into Stars1233:main Jul 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant