Skip to content

fix Next.js static routes with server actions#6664

Merged
leoortizz merged 19 commits intomasterfrom
leoortizz_staticRouteServerActionsFix
Mar 4, 2024
Merged

fix Next.js static routes with server actions#6664
leoortizz merged 19 commits intomasterfrom
leoortizz_staticRouteServerActionsFix

Conversation

@leoortizz
Copy link
Member

@leoortizz leoortizz commented Jan 5, 2024

Description

Fixes #6653

  • Require a Cloud Function for static routes with server action
  • Skip routes using server action in static routes

Scenarios Tested

Sample Commands

@codecov-commenter
Copy link

codecov-commenter commented Jan 5, 2024

Codecov Report

Attention: Patch coverage is 52.00000% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 54.23%. Comparing base (06220c3) to head (6ddcd9a).

Files Patch % Lines
src/frameworks/next/index.ts 0.00% 11 Missing ⚠️
src/frameworks/next/utils.ts 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6664   +/-   ##
=======================================
  Coverage   54.22%   54.23%           
=======================================
  Files         352      352           
  Lines       24500    24524   +24     
  Branches     5069     5073    +4     
=======================================
+ Hits        13285    13300   +15     
- Misses      10001    10010    +9     
  Partials     1214     1214           

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

@leoortizz leoortizz changed the title fix static routes with server actions fix Next.js static routes with server actions Jan 5, 2024
@leoortizz leoortizz marked this pull request as ready for review January 9, 2024 11:29
@leoortizz leoortizz requested a review from jamesdaniels January 9, 2024 11:50
Copy link
Member

@jamesdaniels jamesdaniels left a comment

Choose a reason for hiding this comment

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

LGTM, tackle TODOs. I'll see if next/index.ts:477-482 is needed or if it's considered a hosting bug. Add changelog.


export const ESBUILD_VERSION = "0.19.2";

// TODO: import from next/constants after bumping Next.js dependency
Copy link
Member Author

Choose a reason for hiding this comment

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

@jamesdaniels this depends on #6816

@leoortizz leoortizz merged commit 730aeae into master Mar 4, 2024
@leoortizz leoortizz deleted the leoortizz_staticRouteServerActionsFix branch March 4, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nextjs Server Action is not working on hosting

3 participants