Skip to content
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

Server Action tests #62655

Merged
merged 11 commits into from
Feb 28, 2024
1 change: 1 addition & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: ['canary', 'next-14-1']
pull_request:
types: [opened, synchronize]
branches: ['canary', 'next-14-1']

env:
NAPI_CLI_VERSION: 2.14.7
Expand Down
4 changes: 2 additions & 2 deletions packages/next-swc/crates/next-core/src/next_import_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,10 +829,10 @@ async fn insert_next_shared_aliases(
);

import_map.insert_exact_alias(
"private-next-rsc-action-proxy",
"private-next-rsc-server-reference",
request_to_import_mapping(
project_path,
"next/dist/build/webpack/loaders/next-flight-loader/action-proxy",
"next/dist/build/webpack/loaders/next-flight-loader/server-reference",
),
);
import_map.insert_exact_alias(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl ResolvePlugin for ExternalCjsModulesResolvePlugin {
}

// from https://github.com/vercel/next.js/blob/8d1c619ad650f5d147207f267441caf12acd91d1/packages/next/src/build/handle-externals.ts#L188
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$)");
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$)");

if never_external_regex.is_match(&request_value.request().unwrap_or_default()) {
return Ok(ResolveResultOption::none());
Expand Down
Loading
Loading