@netlify/build 35.3.2 → 35.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,6 @@ export declare const handleBuildCommandOutput: ({ stdout: commandStdout, stderr:
16
16
  stdout: string;
17
17
  stderr: string;
18
18
  }, logs: Logs) => void;
19
- export declare const pipePluginOutput: (childProcess: ChildProcess, logs: Logs, standardStreams: StandardStreams) => LogsListeners | undefined;
19
+ export declare const pipePluginOutput: (childProcess: ChildProcess, logs: Logs, standardStreams: StandardStreams) => void | LogsListeners;
20
20
  export declare const unpipePluginOutput: (childProcess: ChildProcess, logs: Logs, listeners: LogsListeners, standardStreams: StandardStreams) => Promise<void>;
21
21
  export {};
package/lib/log/stream.js CHANGED
@@ -24,17 +24,12 @@ const pushBuildCommandOutput = function (output, logsArray) {
24
24
  }
25
25
  logsArray.push(output);
26
26
  };
27
- const pipedPluginProcesses = new WeakMap();
28
27
  // Start plugin step output
29
28
  export const pipePluginOutput = function (childProcess, logs, standardStreams) {
30
- if (pipedPluginProcesses.has(childProcess)) {
31
- return pipedPluginProcesses.get(childProcess);
29
+ if (!logsAreBuffered(logs)) {
30
+ return streamOutput(childProcess, standardStreams);
32
31
  }
33
- const listeners = !logsAreBuffered(logs)
34
- ? streamOutput(childProcess, standardStreams)
35
- : pushOutputToLogs(childProcess, logs, standardStreams.outputFlusher);
36
- pipedPluginProcesses.set(childProcess, listeners);
37
- return listeners;
32
+ return pushOutputToLogs(childProcess, logs, standardStreams.outputFlusher);
38
33
  };
39
34
  // Stop streaming/buffering plugin step output
40
35
  export const unpipePluginOutput = async function (childProcess, logs, listeners, standardStreams) {
@@ -44,7 +39,6 @@ export const unpipePluginOutput = async function (childProcess, logs, listeners,
44
39
  return unstreamOutput(childProcess, standardStreams);
45
40
  }
46
41
  unpushOutputToLogs(childProcess, listeners.stdoutListener, listeners.stderrListener);
47
- pipedPluginProcesses.delete(childProcess);
48
42
  };
49
43
  // Usually, we stream stdout/stderr because it is more efficient
50
44
  const streamOutput = function (childProcess, standardStreams) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "35.3.2",
3
+ "version": "35.3.3",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -152,5 +152,5 @@
152
152
  "engines": {
153
153
  "node": ">=18.14.0"
154
154
  },
155
- "gitHead": "f1cca80e2c1860d689cb366ea7c0220fbc1ee014"
155
+ "gitHead": "4f7e46fc7c57a80edcb7b7df6e278f9b6648651d"
156
156
  }