Skip to content

Commit 74b3f0f

Browse files
MaxLeitershudingijjk
authored
Server Action tests (#62655)
### What? Backports some Server Action changes from Shu to 14.1.1. [Improve the Server Actions SWC transform ](bf6460e) [Fix Server Reference being double registered](ef81b10) [Improve the Server Actions SWC transform (part 2)](6e59c22) [Fix module-level Server Action creation with closure-closed values](51c6a07) [Rename internal utility naming for clarification](00d8e6e) ### Why? ### How? --------- Co-authored-by: Shu Ding <[email protected]> Co-authored-by: JJ Kasper <[email protected]>
1 parent a6946b6 commit 74b3f0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+601
-440
lines changed

.github/workflows/build_and_test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: ['canary', 'next-14-1']
66
pull_request:
77
types: [opened, synchronize]
8+
branches: ['canary', 'next-14-1']
89

910
env:
1011
NAPI_CLI_VERSION: 2.14.7

packages/next-swc/crates/next-core/src/next_import_map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -829,10 +829,10 @@ async fn insert_next_shared_aliases(
829829
);
830830

831831
import_map.insert_exact_alias(
832-
"private-next-rsc-action-proxy",
832+
"private-next-rsc-server-reference",
833833
request_to_import_mapping(
834834
project_path,
835-
"next/dist/build/webpack/loaders/next-flight-loader/action-proxy",
835+
"next/dist/build/webpack/loaders/next-flight-loader/server-reference",
836836
),
837837
);
838838
import_map.insert_exact_alias(

packages/next-swc/crates/next-core/src/next_server/resolve.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl ResolvePlugin for ExternalCjsModulesResolvePlugin {
8686
}
8787

8888
// from https://github.com/vercel/next.js/blob/8d1c619ad650f5d147207f267441caf12acd91d1/packages/next/src/build/handle-externals.ts#L188
89-
let never_external_regex = lazy_regex::regex!("^(?:private-next-pages\\/|next\\/(?:dist\\/pages\\/|(?:app|document|link|image|legacy\\/image|constants|dynamic|script|navigation|headers|router)$)|string-hash|private-next-rsc-action-validate|private-next-rsc-action-client-wrapper|private-next-rsc-action-proxy$)");
89+
let never_external_regex = lazy_regex::regex!("^(?:private-next-pages\\/|next\\/(?:dist\\/pages\\/|(?:app|document|link|image|legacy\\/image|constants|dynamic|script|navigation|headers|router)$)|string-hash|private-next-rsc-action-validate|private-next-rsc-action-client-wrapper|private-next-rsc-server-reference$)");
9090

9191
if never_external_regex.is_match(&request_value.request().unwrap_or_default()) {
9292
return Ok(ResolveResultOption::none());

0 commit comments

Comments
 (0)