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
57fb41b8
Unverified
Commit
57fb41b8
authored
Jan 19, 2023
by
JJ Kasper
Committed by
GitHub
Jan 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure additional windows are not created on Windows OS (#45022)
parent
c50641f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
next-dev.ts
packages/next/src/cli/next-dev.ts
+3
-0
project-id.ts
packages/next/src/telemetry/project-id.ts
+1
-0
storage.ts
packages/next/src/telemetry/storage.ts
+6
-2
No files found.
packages/next/src/cli/next-dev.ts
View file @
57fb41b8
...
...
@@ -487,6 +487,9 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit
return
()
=>
cluster
.
removeListener
(
'exit'
,
callback
)
}
let
clusterExitUnsub
=
handleClusterExit
()
// x-ref: https://nodejs.org/api/cluster.html#clustersettings
// @ts-expect-error type is incorrect
cluster
.
settings
.
windowsHide
=
true
cluster
.
settings
.
stdio
=
[
'ipc'
,
'pipe'
,
'pipe'
]
setupFork
()
...
...
packages/next/src/telemetry/project-id.ts
View file @
57fb41b8
...
...
@@ -18,6 +18,7 @@ function _getProjectIdByGit() {
{
timeout
:
1000
,
stdio
:
`pipe`
,
windowsHide
:
true
,
}
)
...
...
packages/next/src/telemetry/storage.ts
View file @
57fb41b8
...
...
@@ -10,7 +10,9 @@ import { _postPayload } from './post-payload'
import
{
getRawProjectId
}
from
'./project-id'
import
{
AbortController
}
from
'next/dist/compiled/@edge-runtime/primitives/abort-controller'
import
fs
from
'fs'
import
spawn
from
'next/dist/compiled/cross-spawn'
// Note: cross-spawn is not used here as it causes
// a new command window to appear when we don't want it to
import
{
spawn
}
from
'child_process'
// This is the key that stores whether or not telemetry is enabled or disabled.
const
TELEMETRY_KEY_ENABLED
=
'telemetry.enabled'
...
...
@@ -245,8 +247,10 @@ export class Telemetry {
JSON
.
stringify
(
allEvents
)
)
spawn
(
'node'
,
[
require
.
resolve
(
'./deteched-flush'
),
mode
,
dir
],
{
spawn
(
process
.
execPath
,
[
require
.
resolve
(
'./deteched-flush'
),
mode
,
dir
],
{
detached
:
!
this
.
NEXT_TELEMETRY_DEBUG
,
windowsHide
:
true
,
shell
:
false
,
...(
this
.
NEXT_TELEMETRY_DEBUG
?
{
stdio
:
'inherit'
,
...
...
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