Skip to content

Commit 1892ea8

Browse files
authored
Merge branch 'canary' into 04-18-fix_root_page_revalidation_when_redirecting_in_a_server_action
2 parents 31f2a4b + 1bce086 commit 1892ea8

File tree

1 file changed

+23
-25
lines changed

1 file changed

+23
-25
lines changed

test/lib/create-next-install.js

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,28 @@ async function createNextInstall({
6666
)
6767
require('console').log('Creating temp repo dir', tmpRepoDir)
6868

69+
for (const item of ['package.json', 'packages']) {
70+
await rootSpan
71+
.traceChild(`copy ${item} to temp dir`)
72+
.traceAsyncFn(() =>
73+
fs.copy(
74+
path.join(origRepoDir, item),
75+
path.join(tmpRepoDir, item),
76+
{
77+
filter: (item) => {
78+
return (
79+
!item.includes('node_modules') &&
80+
!item.includes('pnpm-lock.yaml') &&
81+
!item.includes('.DS_Store') &&
82+
// Exclude Rust compilation files
83+
!/next-swc[\\/]target/.test(item)
84+
)
85+
},
86+
}
87+
)
88+
)
89+
}
90+
6991
await rootSpan
7092
.traceChild('ensure swc binary')
7193
.traceAsyncFn(async () => {
@@ -81,7 +103,7 @@ async function createNextInstall({
81103
folder
82104
)
83105
const outputPath = path.join(
84-
origRepoDir,
106+
tmpRepoDir,
85107
'packages/next-swc/native'
86108
)
87109
await fs.copy(swcPkgPath, outputPath, {
@@ -99,33 +121,9 @@ async function createNextInstall({
99121
}
100122
})
101123

102-
for (const item of ['package.json', 'packages']) {
103-
await rootSpan
104-
.traceChild(`copy ${item} to temp dir`)
105-
.traceAsyncFn(() =>
106-
fs.copy(
107-
path.join(origRepoDir, item),
108-
path.join(tmpRepoDir, item),
109-
{
110-
filter: (item) => {
111-
return (
112-
!item.includes('node_modules') &&
113-
!item.includes('pnpm-lock.yaml') &&
114-
!item.includes('.DS_Store') &&
115-
// Exclude Rust compilation files
116-
!/next[\\/]build[\\/]swc[\\/]target/.test(item) &&
117-
!/next-swc[\\/]target/.test(item)
118-
)
119-
},
120-
}
121-
)
122-
)
123-
}
124-
125124
pkgPaths = await rootSpan.traceChild('linkPackages').traceAsyncFn(() =>
126125
linkPackages({
127126
repoDir: tmpRepoDir,
128-
nextSwcVersion: null,
129127
})
130128
)
131129
}

0 commit comments

Comments
 (0)