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
Copy Markdown
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
Copy Markdown

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 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
Copy Markdown
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
Copy Markdown
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