Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
a0ba5450
Unverified
Commit
a0ba5450
authored
Sep 06, 2021
by
Tobias Koppers
Committed by
GitHub
Sep 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exclude test files from copy in trace-next-server (#28819)
parent
4141aaef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
trace-next-server.js
scripts/trace-next-server.js
+8
-2
No files found.
scripts/trace-next-server.js
View file @
a0ba5450
...
@@ -21,10 +21,16 @@ async function main() {
...
@@ -21,10 +21,16 @@ async function main() {
const
origRepoDir
=
path
.
join
(
__dirname
,
'..'
)
const
origRepoDir
=
path
.
join
(
__dirname
,
'..'
)
const
repoDir
=
path
.
join
(
tmpdir
,
`tmp-next-
${
Date
.
now
()}
`
)
const
repoDir
=
path
.
join
(
tmpdir
,
`tmp-next-
${
Date
.
now
()}
`
)
const
workDir
=
path
.
join
(
tmpdir
,
`trace-next-
${
Date
.
now
()}
`
)
const
workDir
=
path
.
join
(
tmpdir
,
`trace-next-
${
Date
.
now
()}
`
)
const
origTestDir
=
path
.
join
(
origRepoDir
,
'test'
)
const
dotDir
=
path
.
join
(
origRepoDir
,
'./'
)
+
'.'
await
fs
.
copy
(
origRepoDir
,
repoDir
,
{
await
fs
.
copy
(
origRepoDir
,
repoDir
,
{
filter
:
(
item
)
=>
{
filter
:
(
item
)
=>
{
return
!
item
.
includes
(
'node_modules'
)
return
(
!
item
.
startsWith
(
origTestDir
)
&&
!
item
.
startsWith
(
dotDir
)
&&
!
item
.
includes
(
'node_modules'
)
)
},
},
})
})
...
@@ -88,7 +94,7 @@ async function main() {
...
@@ -88,7 +94,7 @@ async function main() {
if
(
result
.
reasons
[
file
].
type
===
'initial'
)
{
if
(
result
.
reasons
[
file
].
type
===
'initial'
)
{
continue
continue
}
}
tracedDeps
.
add
(
file
)
tracedDeps
.
add
(
file
.
replace
(
/
\\
/g
,
'/'
)
)
const
stat
=
await
fs
.
stat
(
path
.
join
(
workDir
,
file
))
const
stat
=
await
fs
.
stat
(
path
.
join
(
workDir
,
file
))
if
(
stat
.
isFile
())
{
if
(
stat
.
isFile
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment