Skip to content

Commit 3b101a0

Browse files
FrozenPandazclaude
andcommitted
fix(core): remove windowsHide from fork() calls where it is not typed
ForkOptions in @types/node does not include windowsHide, causing typecheck failures. Since fork() spawns Node.js processes (not shell commands), there is no console window to hide on Windows. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5e62255 commit 3b101a0

File tree

10 files changed

+0
-21
lines changed

10 files changed

+0
-21
lines changed

astro-docs/src/plugins/utils/cnw-generation.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export async function loadCnwPackage(
4040
const child = fork(subprocessPath, [], {
4141
cwd: workspaceRoot,
4242
silent: true,
43-
windowsHide: true,
4443
});
4544

4645
let stdout = '';

packages/expo/src/executors/export/export.impl.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ function exportAsync(
4747
{
4848
cwd: pathResolve(workspaceRoot, projectRoot),
4949
env: process.env,
50-
windowsHide: true,
5150
}
5251
);
5352

packages/expo/src/executors/prebuild/prebuild.impl.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export function prebuildAsync(
5454
{
5555
cwd: join(workspaceRoot, projectRoot),
5656
env: process.env,
57-
windowsHide: true,
5857
}
5958
);
6059

packages/expo/src/executors/update/update.impl.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ function runCliUpdate(
4646
{
4747
cwd: pathResolve(workspaceRoot, projectRoot),
4848
env: process.env,
49-
windowsHide: true,
5049
}
5150
);
5251

packages/nx/src/tasks-runner/fork.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const childProcess = fork(script, {
1818
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
1919
env: process.env,
2020
execArgv,
21-
windowsHide: true,
2221
});
2322

2423
const pseudoIPC = new PseudoIPCClient(pseudoIPCPath);

packages/nx/src/tasks-runner/forked-process-task-runner.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export class ForkedProcessTaskRunner {
7171
...env,
7272
NX_FORKED_TASK_EXECUTOR: 'true',
7373
},
74-
windowsHide: true,
7574
});
7675

7776
// Register batch worker process with all tasks
@@ -218,7 +217,6 @@ export class ForkedProcessTaskRunner {
218217
const childId = task.id;
219218
const pseudoTerminal = await this.createPseudoTerminal();
220219
this.pseudoTerminals.add(pseudoTerminal);
221-
// eslint-disable-next-line @nx/workspace/require-windows-hide -- this is the Rust pseudo-terminal fork, not child_process.fork
222220
const p = await pseudoTerminal.fork(childId, forkScript, {
223221
cwd: process.cwd(),
224222
execArgv: process.execArgv,
@@ -289,7 +287,6 @@ export class ForkedProcessTaskRunner {
289287
...env,
290288
NX_FORKED_TASK_EXECUTOR: 'true',
291289
},
292-
windowsHide: true,
293290
});
294291

295292
// Register forked process for metrics collection
@@ -356,7 +353,6 @@ export class ForkedProcessTaskRunner {
356353
...env,
357354
NX_FORKED_TASK_EXECUTOR: 'true',
358355
},
359-
windowsHide: true,
360356
});
361357

362358
// Register forked process for metrics collection

packages/remix/src/executors/build/build.impl.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ async function runBuild(
3434
const p = fork(remixBin, args, {
3535
cwd: join(context.root, projectRoot),
3636
stdio: 'inherit',
37-
windowsHide: true,
3837
});
3938
p.on('exit', (code) => {
4039
if (code === 0) resolve();

packages/remix/src/executors/serve/serve.impl.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export default async function* serveExecutor(
6565
const server = fork(remixBin, ['dev', ...args], {
6666
cwd: join(workspaceRoot, projectRoot),
6767
stdio: 'inherit',
68-
windowsHide: true,
6968
});
7069

7170
server.once('exit', (code) => {

tools/eslint-rules/rules/require-windows-hide.spec.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ ruleTester.run(RULE_NAME, rule, {
1010
// spawn with windowsHide: true
1111
`import { spawn } from 'child_process';
1212
spawn('echo', ['hello'], { stdio: 'inherit', windowsHide: true });`,
13-
// fork with windowsHide: true
14-
`import { fork } from 'child_process';
15-
fork('script.js', { stdio: 'inherit', windowsHide: true });`,
1613
// execSync with windowsHide: true
1714
`import { execSync } from 'child_process';
1815
execSync('echo hello', { windowsHide: true });`,
@@ -41,12 +38,6 @@ ruleTester.run(RULE_NAME, rule, {
4138
spawn('echo', ['hello'], { stdio: 'inherit', windowsHide: false });`,
4239
errors: [{ messageId: 'windowsHideMustBeTrue' }],
4340
},
44-
// fork missing windowsHide
45-
{
46-
code: `import { fork } from 'child_process';
47-
fork('script.js', { stdio: ['inherit', 'pipe', 'pipe', 'ipc'] });`,
48-
errors: [{ messageId: 'missingWindowsHide' }],
49-
},
5041
// execSync missing windowsHide
5142
{
5243
code: `import { execSync } from 'child_process';

tools/eslint-rules/rules/require-windows-hide.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export const RULE_NAME = 'require-windows-hide';
66
const SPAWN_FUNCTIONS = new Set([
77
'spawn',
88
'spawnSync',
9-
'fork',
109
'exec',
1110
'execSync',
1211
'execFile',

0 commit comments

Comments
 (0)