Skip to content
Myr

Fix Node 24-specific deprecation warning (#1199)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by ehmicky · committed by GitHub · parent 2f1012f · Browse files · 6 files+29 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

6 files+29 added−4 removed

  • tests:+10 added−0 removed
  • other:+19 added−4 removed

6 files+29 added−4 removed

modified:.github/workflows/main.yml+2 added-2 removed
added:lib/arguments/shell.js+12 added
modified:lib/methods/main-async.js+2 added-1 removed
2 unmodified lines
3import {MaxBufferError} from 'get-stream';4import {handleCommand} from '../arguments/command.js';5import {normalizeOptions} from '../arguments/options.js';6import {SUBPROCESS_OPTIONS} from '../arguments/fd-options.js';7import {concatenateShell} from '../arguments/shell.js';8import {addIpcMethods} from '../ipc/methods.js';9import {makeError, makeSuccessResult} from '../return/result.js';10import {handleResult} from '../return/reject.js';11import {handleEarlyError} from '../return/early-error.js';
63 unmodified lines
7576const spawnSubprocessAsync = ({file, commandArguments, options, startTime, verboseInfo, command, escapedCommand, fileDescriptors}) => {77 let subprocess;78 try {78 subprocess = spawn(file, commandArguments, options);79 subprocess = spawn(...concatenateShell(file, commandArguments, options));80 } catch (error) {81 return handleEarlyError({82 error,83 command,
111 unmodified lines
modified:lib/methods/main-sync.js+2 added-1 removed
1import {spawnSync} from 'node:child_process';2import {handleCommand} from '../arguments/command.js';3import {normalizeOptions} from '../arguments/options.js';4import {concatenateShell} from '../arguments/shell.js';5import {makeError, makeEarlyError, makeSuccessResult} from '../return/result.js';6import {handleResult} from '../return/reject.js';7import {handleStdioSync} from '../stdio/handle-sync.js';8import {stripNewline} from '../io/strip-newline.js';
106 unmodified lines
115const runSubprocessSync = ({file, commandArguments, options, command, escapedCommand, fileDescriptors, startTime}) => {116 try {117 addInputOptionsSync(fileDescriptors, options);118 const normalizedOptions = normalizeSpawnSyncOptions(options);118 return spawnSync(file, commandArguments, normalizedOptions);119 return spawnSync(...concatenateShell(file, commandArguments, normalizedOptions));120 } catch (error) {121 return makeEarlyError({122 error,123 command,
40 unmodified lines
modified:test/helpers/fixtures-directory.js+10 added
modified:package.json+1 added