Skip to content

Fix for Next 15.4+ #928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 21, 2025
Merged

Fix for Next 15.4+ #928

merged 8 commits into from
Jul 21, 2025

Conversation

conico974
Copy link
Contributor

@conico974 conico974 commented Jul 16, 2025

Migrate to a canary version for now (we need to wait for 15.4.2)
Enable local execution of some examples (first step to run e2e test without deploying)
And fix the page router functionality. This one needs additional testing and be restricted to versions above 15.4.2.
All e2e works on this PR.

It should also close #848 (again needs additional testing)

Copy link

changeset-bot bot commented Jul 16, 2025

🦋 Changeset detected

Latest commit: 4b40c74

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@opennextjs/aws Patch
app-pages-router Patch
app-router Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

pkg-pr-new bot commented Jul 16, 2025

Open in StackBlitz

pnpm add https://pkg.pr.new/@opennextjs/aws@928

commit: 4b40c74

@conico974 conico974 changed the title Update to Canary and Enhance Local Testing Fix for Next 15.4+ Jul 16, 2025
@sommeeeer
Copy link
Contributor

sommeeeer commented Jul 18, 2025

Good job on this Nico!

I tested that the rewrites will have the correct request.url now. That is of the original request url, and not the destination.

Is there any possibility that we might fix that the request.url is wrong in rewrites on earlier versions aswell?

@@ -266,6 +267,12 @@ async function processRequest(
//#endOverride

// Next Server
// TODO: only enable this on Next 15.4+
const reqUrl = new URL(routingResult.initialURL);
Copy link
Contributor

Choose a reason for hiding this comment

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

We compute initialURL above on L242

Copy link
Contributor

github-actions bot commented Jul 19, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 26.9% 2639 / 9810
🔵 Statements 26.9% 2639 / 9810
🔵 Functions 54.26% 140 / 258
🔵 Branches 73.23% 621 / 848
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/build/createServerBundle.ts 0% 0% 0% 0% 1-396
packages/open-next/src/core/requestHandler.ts 0% 0% 0% 0% 1-360
Generated in workflow #1365 for commit 4b40c74 by the Vitest Coverage Report Action

@conico974 conico974 marked this pull request as ready for review July 20, 2025 08:06
Copy link
Contributor

@khuezy khuezy left a comment

Choose a reason for hiding this comment

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

LGTM

@conico974
Copy link
Contributor Author

Thanks for the review

@conico974 conico974 merged commit 071d94e into main Jul 21, 2025
3 checks passed
@conico974 conico974 deleted the conico/fix-15.4 branch July 21, 2025 19:47
@github-actions github-actions bot mentioned this pull request Jul 15, 2025
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.

[BUG] next.config rewrites result in request URL being rewrite destination
3 participants