Skip to content

Commit 3a30312

Browse files
authored
refactor(actions): Remove turbopack magic comments (#77063)
### What? Remove magic comments for disabling export merging in the advanced tree shaking of turbopack. ### Why? Turbopack magic comments for tree shaking + server actions are not required anymore since #76938.
1 parent 4ef4087 commit 3a30312

Some content is hidden

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

66 files changed

+126
-142
lines changed

crates/next-custom-transforms/src/transforms/server_actions.rs

-16
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,6 @@ impl<C: Comments> ServerActions<C> {
446446
.collect(),
447447
action_id.clone(),
448448
);
449-
add_turbopack_disable_export_merging_comment(action_ident.span, &self.comments);
450449

451450
if let BlockStmtOrExpr::BlockStmt(block) = &mut *arrow.body {
452451
block.visit_mut_with(&mut ClosureReplacer {
@@ -593,7 +592,6 @@ impl<C: Comments> ServerActions<C> {
593592
.collect(),
594593
action_id.clone(),
595594
);
596-
add_turbopack_disable_export_merging_comment(action_ident.span, &self.comments);
597595

598596
function.body.visit_mut_with(&mut ClosureReplacer {
599597
used_ids: &ids_from_closure,
@@ -770,7 +768,6 @@ impl<C: Comments> ServerActions<C> {
770768
reference_id.clone(),
771769
arrow.span,
772770
);
773-
add_turbopack_disable_export_merging_comment(cache_ident.span, &self.comments);
774771

775772
// If there're any bound args from the closure, we need to hoist the
776773
// register action expression to the top-level, and return the bind
@@ -842,7 +839,6 @@ impl<C: Comments> ServerActions<C> {
842839
reference_id.clone(),
843840
function.span,
844841
);
845-
add_turbopack_disable_export_merging_comment(cache_ident.span, &self.comments);
846842

847843
function.body.visit_mut_with(&mut ClosureReplacer {
848844
used_ids: &ids_from_closure,
@@ -1943,7 +1939,6 @@ impl<C: Comments> VisitMut for ServerActions<C> {
19431939
ident.span,
19441940
)),
19451941
}));
1946-
add_turbopack_disable_export_merging_comment(ident.span, &self.comments);
19471942
}
19481943
}
19491944

@@ -2351,17 +2346,6 @@ fn annotate_ident_as_server_reference(ident: Ident, action_id: Atom, original_sp
23512346
})
23522347
}
23532348

2354-
fn add_turbopack_disable_export_merging_comment(span: Span, comments: &dyn Comments) {
2355-
comments.add_leading(
2356-
span.lo,
2357-
Comment {
2358-
kind: CommentKind::Block,
2359-
span: DUMMY_SP,
2360-
text: "#__TURBOPACK_DISABLE_EXPORT_MERGING__".into(),
2361-
},
2362-
);
2363-
}
2364-
23652349
fn bind_args_to_ref_expr(expr: Expr, bound: Vec<Option<ExprOrSpread>>, action_id: Atom) -> Expr {
23662350
if bound.is_empty() {
23672351
expr

crates/next-custom-transforms/tests/errors/server-actions/server-graph/1/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* __next_internal_action_entry_do_not_use__ {"00ab21efdafbe611287bc25c0462b1e0510d13e48b":"foo"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export function /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo() {}
3+
export function foo() {}
44
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
55
ensureServerEntryExports([
66
foo

crates/next-custom-transforms/tests/errors/server-actions/server-graph/2/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* __next_internal_action_entry_do_not_use__ {"00ac840dcaf5e8197cb02b7f3a43c119b7a770b272":"bar"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
'use strict';
4-
export function /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ bar() {}
4+
export function bar() {}
55
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
66
ensureServerEntryExports([
77
bar

crates/next-custom-transforms/tests/errors/server-actions/server-graph/6/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* __next_internal_action_entry_do_not_use__ {"00c18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = ()=>{};
3+
export default $$RSC_SERVER_ACTION_0 = ()=>{};
44
var $$RSC_SERVER_ACTION_0;
55
Object["defineProperty"]($$RSC_SERVER_ACTION_0, "name", {
66
value: "default",

crates/next-custom-transforms/tests/errors/server-actions/server-graph/8/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* __next_internal_action_entry_do_not_use__ {"006a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function foo() {
3+
export const $$RSC_SERVER_ACTION_0 = async function foo() {
44
'use strict';
55
};
66
const foo = registerServerReference($$RSC_SERVER_ACTION_0, "006a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);

crates/next-custom-transforms/tests/fixture/next-font-with-directive/use-cache/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc
33
import { cache as $$cache__ } from "private-next-rsc-cache-wrapper";
44
import React from 'react';
55
import inter from '@next/font/google/target.css?{"path":"app/test.tsx","import":"Inter","arguments":[],"variableName":"inter"}';
6-
export var /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_CACHE_0 = $$cache__("default", "c0dd5bb6fef67f5ab84327f5164ac2c3111a159337", 0, async function Cached({ children }) {
6+
export var $$RSC_SERVER_CACHE_0 = $$cache__("default", "c0dd5bb6fef67f5ab84327f5164ac2c3111a159337", 0, async function Cached({ children }) {
77
return <div className={inter.className}>{children}</div>;
88
});
99
Object["defineProperty"]($$RSC_SERVER_CACHE_0, "name", {

crates/next-custom-transforms/tests/fixture/next-font-with-directive/use-server/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
import React from 'react';
44
import inter from '@next/font/google/target.css?{"path":"app/test.tsx","import":"Inter","arguments":[],"variableName":"inter"}';
5-
export async function /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ myCoolServerAction() {
5+
export async function myCoolServerAction() {
66
return <div className={inter.className}>Hello from server action</div>;
77
}
88
import { ensureServerEntryExports } from "private-next-rsc-action-validate";

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/1/output.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
import { Button } from 'components';
44
import deleteFromDb from 'db';
5-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
5+
export const $$RSC_SERVER_ACTION_0 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
66
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
77
await deleteFromDb($$ACTION_ARG_0);
88
await deleteFromDb($$ACTION_ARG_1);
@@ -11,7 +11,7 @@ export function Item({ id1, id2 }) {
1111
var deleteItem = registerServerReference($$RSC_SERVER_ACTION_0, "406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", id1, id2));
1212
return <Button action={deleteItem}>Delete</Button>;
1313
}
14-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function action($$ACTION_CLOSURE_BOUND) {
14+
export const $$RSC_SERVER_ACTION_1 = async function action($$ACTION_CLOSURE_BOUND) {
1515
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("4090b5db271335765a4b0eab01f044b381b5ebd5cd", $$ACTION_CLOSURE_BOUND);
1616
console.log($$ACTION_ARG_0);
1717
console.log($$ACTION_ARG_1);

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/10/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* __next_internal_action_entry_do_not_use__ {"00c18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export default async function /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo() {}
3+
export default async function foo() {}
44
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
55
ensureServerEntryExports([
66
foo

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/11/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* __next_internal_action_entry_do_not_use__ {"00c18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ async function $$RSC_SERVER_ACTION_0() {}
3+
export default async function $$RSC_SERVER_ACTION_0() {}
44
Object["defineProperty"]($$RSC_SERVER_ACTION_0, "name", {
55
value: "default",
66
writable: false

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/12/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* __next_internal_action_entry_do_not_use__ {"7fc18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
async function foo() {}
4-
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo;
4+
export default foo;
55
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
66
ensureServerEntryExports([
77
foo

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/13/output.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* __next_internal_action_entry_do_not_use__ {"7fac840dcaf5e8197cb02b7f3a43c119b7a770b272":"bar","7fc18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
const foo = async function() {};
4-
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo;
4+
export default foo;
55
const bar = async function() {};
6-
export { /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ bar };
6+
export { bar };
77
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
88
ensureServerEntryExports([
99
foo,

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/14/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* __next_internal_action_entry_do_not_use__ {"00ab21efdafbe611287bc25c0462b1e0510d13e48b":"foo"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export async function /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo() {
3+
export async function foo() {
44
async function bar() {}
55
}
66
import { ensureServerEntryExports } from "private-next-rsc-action-validate";

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/15/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* __next_internal_action_entry_do_not_use__ {"60c18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async (a, b)=>{
3+
export default $$RSC_SERVER_ACTION_0 = async (a, b)=>{
44
console.log(a, b);
55
};
66
var $$RSC_SERVER_ACTION_0;

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/16/output.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc
33
import { Button } from 'components';
44
import deleteFromDb from 'db';
55
const v1 = 'v1';
6-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
6+
export const $$RSC_SERVER_ACTION_0 = async function deleteItem($$ACTION_CLOSURE_BOUND) {
77
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
88
await deleteFromDb($$ACTION_ARG_0);
99
await deleteFromDb(v1);
@@ -14,14 +14,14 @@ export function Item({ id1, id2 }) {
1414
const deleteItem = registerServerReference($$RSC_SERVER_ACTION_0, "406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", id1, v2));
1515
return <Button action={deleteItem}>Delete</Button>;
1616
}
17-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function g($$ACTION_CLOSURE_BOUND, y, ...z) {
17+
export const $$RSC_SERVER_ACTION_1 = async function g($$ACTION_CLOSURE_BOUND, y, ...z) {
1818
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("7f90b5db271335765a4b0eab01f044b381b5ebd5cd", $$ACTION_CLOSURE_BOUND);
1919
return $$ACTION_ARG_0 + y + z[0];
2020
};
2121
let f = (x)=>{
2222
var g = registerServerReference($$RSC_SERVER_ACTION_1, "7f90b5db271335765a4b0eab01f044b381b5ebd5cd", null).bind(null, encryptActionBoundArgs("7f90b5db271335765a4b0eab01f044b381b5ebd5cd", x));
2323
};
24-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_2 = async function f($$ACTION_CLOSURE_BOUND, y, ...z) {
24+
export const $$RSC_SERVER_ACTION_2 = async function f($$ACTION_CLOSURE_BOUND, y, ...z) {
2525
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("7f1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$ACTION_CLOSURE_BOUND);
2626
return $$ACTION_ARG_0 + y + // can't be a `ts-expect-error` because the type of `z` changes to `any` in the output
2727
// and it stops being an error

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/17/output.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* __next_internal_action_entry_do_not_use__ {"7fab21efdafbe611287bc25c0462b1e0510d13e48b":"foo","7fac840dcaf5e8197cb02b7f3a43c119b7a770b272":"bar"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo = async ()=>{};
3+
export const foo = async ()=>{};
44
const bar = async ()=>{};
5-
export { /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ bar };
5+
export { bar };
66
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
77
ensureServerEntryExports([
88
foo,

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/18/output.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc
33
import { Button } from 'components';
44
import deleteFromDb from 'db';
55
const v1 = 'v1';
6-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND) {
6+
export const $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND) {
77
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("406a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
88
await deleteFromDb($$ACTION_ARG_0);
99
await deleteFromDb(v1);
1010
await deleteFromDb($$ACTION_ARG_1);
1111
};
12-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function action($$ACTION_CLOSURE_BOUND) {
12+
export const $$RSC_SERVER_ACTION_1 = async function action($$ACTION_CLOSURE_BOUND) {
1313
var [$$ACTION_ARG_0, $$ACTION_ARG_1] = await decryptActionBoundArgs("4090b5db271335765a4b0eab01f044b381b5ebd5cd", $$ACTION_CLOSURE_BOUND);
1414
await deleteFromDb($$ACTION_ARG_0);
1515
await deleteFromDb(v1);

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/19/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* __next_internal_action_entry_do_not_use__ {"606a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
import { Button } from 'components';
4-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND, value2) {
4+
export const $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND, value2) {
55
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
66
return $$ACTION_ARG_0 * value2;
77
};

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/2/output.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
import { validator } from 'auth';
44
import { Button } from 'components';
5-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function myAction(a, b, c) {
5+
export const $$RSC_SERVER_ACTION_0 = async function myAction(a, b, c) {
66
console.log('a');
77
};
88
var myAction = registerServerReference($$RSC_SERVER_ACTION_0, "706a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
99
export default function Page() {
1010
return <Button action={myAction}>Delete</Button>;
1111
}
12-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function() {};
12+
export const $$RSC_SERVER_ACTION_1 = async function() {};
1313
// TODO: should use `action` as function name?
1414
export const action = validator(registerServerReference($$RSC_SERVER_ACTION_1, "0090b5db271335765a4b0eab01f044b381b5ebd5cd", null));

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/20/output.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc
33
/** @type {[any]} */ const [foo] = [
44
null
55
];
6-
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ foo;
6+
export default foo;
77
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
88
ensureServerEntryExports([
99
foo

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/21/output.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc
33
import { validator, another } from 'auth';
44
import { Button } from 'components';
55
const x = 1;
6-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function($$ACTION_CLOSURE_BOUND, z) {
6+
export const $$RSC_SERVER_ACTION_0 = async function($$ACTION_CLOSURE_BOUND, z) {
77
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
88
return x + $$ACTION_ARG_0 + z;
99
};
@@ -12,7 +12,7 @@ export default function Page() {
1212
return <Button // TODO: should use `action` as function name?
1313
action={validator(registerServerReference($$RSC_SERVER_ACTION_0, "606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("606a88810ecce4a4e8b59d53b8327d7e98bbf251d7", y)))}/>;
1414
}
15-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function() {};
15+
export const $$RSC_SERVER_ACTION_1 = async function() {};
1616
validator(registerServerReference($$RSC_SERVER_ACTION_1, "0090b5db271335765a4b0eab01f044b381b5ebd5cd", null));
17-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_2 = async function() {};
17+
export const $$RSC_SERVER_ACTION_2 = async function() {};
1818
another(validator(registerServerReference($$RSC_SERVER_ACTION_2, "001c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", null)));

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/22/output.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* __next_internal_action_entry_do_not_use__ {"7fc18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default","7ff14702b5a021dd117f7ec7a3c838f397c2046d3b":"action"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
33
import { validator } from 'auth';
4-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ action = validator(async ()=>{});
5-
export default /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = validator(async ()=>{});
4+
export const action = validator(async ()=>{});
5+
export default $$RSC_SERVER_ACTION_0 = validator(async ()=>{});
66
var $$RSC_SERVER_ACTION_0;
77
Object["defineProperty"]($$RSC_SERVER_ACTION_0, "name", {
88
value: "default",

crates/next-custom-transforms/tests/fixture/server-actions/server-graph/23/output.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* __next_internal_action_entry_do_not_use__ {"7c6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","7c90b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
22
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
3-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND, a, b, c, d) {
3+
export const $$RSC_SERVER_ACTION_0 = async function action($$ACTION_CLOSURE_BOUND, a, b, c, d) {
44
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("7c6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$ACTION_CLOSURE_BOUND);
55
console.log(a, b, $$ACTION_ARG_0, c, d);
66
};
7-
export const /*#__TURBOPACK_DISABLE_EXPORT_MERGING__*/ $$RSC_SERVER_ACTION_1 = async function action2($$ACTION_CLOSURE_BOUND, a, b, c, d) {
7+
export const $$RSC_SERVER_ACTION_1 = async function action2($$ACTION_CLOSURE_BOUND, a, b, c, d) {
88
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("7c90b5db271335765a4b0eab01f044b381b5ebd5cd", $$ACTION_CLOSURE_BOUND);
99
console.log(a, b, $$ACTION_ARG_0, c, d);
1010
};

0 commit comments

Comments
 (0)