diff --git a/patches/node-pty@1.2.0-beta.15.patch b/patches/node-pty@1.2.0-beta.15.patch new file mode 100644 index 000000000000..2232766cdb65 --- /dev/null +++ b/patches/node-pty@1.2.0-beta.15.patch @@ -0,0 +1,35 @@ +diff --git a/lib/windowsConoutConnection.js b/lib/windowsConoutConnection.js +--- a/lib/windowsConoutConnection.js ++++ b/lib/windowsConoutConnection.js +@@ -63,7 +63,11 @@ + conoutPipeName: _conoutPipeName + }; + var scriptPath = __dirname.replace('node_modules.asar', 'node_modules.asar.unpacked'); +- this._worker = new worker_threads_1.Worker((0, path_1.join)(scriptPath, 'worker/conoutSocketWorker.js'), { workerData: workerData }); ++ // Node's watch mode reports dependencies through worker messages. ++ // Keep the host's watch environment out of this protocol worker. ++ var workerEnv = Object.assign({}, process.env); ++ delete workerEnv.WATCH_REPORT_DEPENDENCIES; ++ this._worker = new worker_threads_1.Worker((0, path_1.join)(scriptPath, 'worker/conoutSocketWorker.js'), { workerData: workerData, env: workerEnv, execArgv: [] }); + this._worker.on('message', function (message) { + switch (message) { + case 1 /* ConoutWorkerMessage.READY */: +diff --git a/lib/windowsPtyAgent.js b/lib/windowsPtyAgent.js +--- a/lib/windowsPtyAgent.js ++++ b/lib/windowsPtyAgent.js +@@ -218,8 +218,14 @@ + return Promise.resolve([]); + } + return new Promise(function (resolve) { +- var agent = (0, child_process_1.fork)(path.join(__dirname, 'conpty_console_list_agent'), [_this._innerPid.toString()]); ++ // Node's watch mode sends its own messages over the helper's IPC channel. ++ var agentEnv = Object.assign({}, process.env); ++ delete agentEnv.WATCH_REPORT_DEPENDENCIES; ++ var agent = (0, child_process_1.fork)(path.join(__dirname, 'conpty_console_list_agent'), [_this._innerPid.toString()], { env: agentEnv, execArgv: [] }); + agent.on('message', function (message) { ++ if (!Array.isArray(message.consoleProcessList)) { ++ return; ++ } + clearTimeout(timeout); + resolve(message.consoleProcessList); + }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f579bfa8a5a8..d244cfee891c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -107,6 +107,7 @@ patchedDependencies: expo-notifications@57.0.15: f89252c2c08dc7b3acb8415f319ebbe15fff8c9f88a64ebe1830cd5ac5c9ac40 expo-sharing@57.0.17: 8d2e3b10eb3f52036a9a086800180ec6cebf3b75bccc5b1775117a7244d4ac45 expo-widgets@57.0.15: 319a9ded5db49c5b5215c511a138b33f44c7ea2972eb418192e8d5342fe75ce6 + node-pty@1.2.0-beta.15: f2fe901c61cde17986240002d05c172d5d0272d83ffaab8d0ebeb922763be414 react-native-gesture-handler@2.32.0: 0579f8e4dad02bf3183d95b02620358412983c36f9bda7425dc8bcb9643b5ce2 react-native-keyboard-controller@1.21.13: 6e4339347bc5bb3c9ea67d85ff5c814058b211c5750f247aba59d07869a2e787 react-native-nitro-markdown@0.5.8: 642b47830730acff3761fe29cf54271d18b493c0070c750097850b7ea032e00c @@ -532,7 +533,7 @@ importers: version: 4.0.0-rc.115(patch_hash=0dfc4bb8ebd80fb3e06b91ef61346f5259517ab0f2437644fe95ae531084b1f5) node-pty: specifier: ^1.2.0-beta.15 - version: 1.2.0-beta.15 + version: 1.2.0-beta.15(patch_hash=f2fe901c61cde17986240002d05c172d5d0272d83ffaab8d0ebeb922763be414) stream-chain: specifier: ^4.2.5 version: 4.2.5 @@ -20110,7 +20111,7 @@ snapshots: node-mock-http@1.0.5: {} - node-pty@1.2.0-beta.15: + node-pty@1.2.0-beta.15(patch_hash=f2fe901c61cde17986240002d05c172d5d0272d83ffaab8d0ebeb922763be414): dependencies: node-addon-api: 7.1.1 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 56c740febf1f..8313ab360b27 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -196,6 +196,7 @@ patchedDependencies: expo-notifications@57.0.15: patches/expo-notifications@57.0.15.patch expo-sharing@57.0.17: patches/expo-sharing@57.0.17.patch expo-widgets@57.0.15: patches/expo-widgets@57.0.15.patch + node-pty@1.2.0-beta.15: patches/node-pty@1.2.0-beta.15.patch react-native-gesture-handler@2.32.0: patches/react-native-gesture-handler@2.32.0.patch react-native-keyboard-controller@1.21.13: patches/react-native-keyboard-controller@1.21.13.patch react-native-nitro-modules@0.35.9: patches/react-native-nitro-modules@0.35.9.patch