Skip to content

Commit

Permalink
Merge branch 'canary' into 04-18-fix_root_page_revalidation_when_redi…
Browse files Browse the repository at this point in the history
…recting_in_a_server_action
  • Loading branch information
ztanner authored Apr 18, 2024
2 parents 31f2a4b + 1bce086 commit 1892ea8
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions test/lib/create-next-install.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,28 @@ async function createNextInstall({
)
require('console').log('Creating temp repo dir', tmpRepoDir)

for (const item of ['package.json', 'packages']) {
await rootSpan
.traceChild(`copy ${item} to temp dir`)
.traceAsyncFn(() =>
fs.copy(
path.join(origRepoDir, item),
path.join(tmpRepoDir, item),
{
filter: (item) => {
return (
!item.includes('node_modules') &&
!item.includes('pnpm-lock.yaml') &&
!item.includes('.DS_Store') &&
// Exclude Rust compilation files
!/next-swc[\\/]target/.test(item)
)
},
}
)
)
}

await rootSpan
.traceChild('ensure swc binary')
.traceAsyncFn(async () => {
Expand All @@ -81,7 +103,7 @@ async function createNextInstall({
folder
)
const outputPath = path.join(
origRepoDir,
tmpRepoDir,
'packages/next-swc/native'
)
await fs.copy(swcPkgPath, outputPath, {
Expand All @@ -99,33 +121,9 @@ async function createNextInstall({
}
})

for (const item of ['package.json', 'packages']) {
await rootSpan
.traceChild(`copy ${item} to temp dir`)
.traceAsyncFn(() =>
fs.copy(
path.join(origRepoDir, item),
path.join(tmpRepoDir, item),
{
filter: (item) => {
return (
!item.includes('node_modules') &&
!item.includes('pnpm-lock.yaml') &&
!item.includes('.DS_Store') &&
// Exclude Rust compilation files
!/next[\\/]build[\\/]swc[\\/]target/.test(item) &&
!/next-swc[\\/]target/.test(item)
)
},
}
)
)
}

pkgPaths = await rootSpan.traceChild('linkPackages').traceAsyncFn(() =>
linkPackages({
repoDir: tmpRepoDir,
nextSwcVersion: null,
})
)
}
Expand Down

0 comments on commit 1892ea8

Please sign in to comment.