-
-
Notifications
You must be signed in to change notification settings - Fork 112
chore(deps): update dependency execa to v9 #381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deploying unplugin-vue-router with
|
| Latest commit: |
9a0f0b8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://25511d5a.unplugin-vue-router.pages.dev |
| Branch Preview URL: | https://renovate-execa-9-x.unplugin-vue-router.pages.dev |
c3ec3e0 to
e4024ac
Compare
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
|
|
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is an install script?Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts. Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
10ae48c to
88e41ac
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #381 +/- ##
=======================================
Coverage 74.86% 74.86%
=======================================
Files 33 33
Lines 5554 5554
Branches 546 546
=======================================
Hits 4158 4158
Misses 1387 1387
Partials 9 9 ☔ View full report in Codecov by Sentry. |
88e41ac to
f752d62
Compare
f752d62 to
9a0f0b8
Compare
This PR contains the following updates:
^8.0.1->^9.1.0Release Notes
sindresorhus/execa (execa)
v9.1.0Compare Source
Features (types)
TemplateExpressiontype. (#1049)v9.0.2Compare Source
Types (bug fixes)
--lib domfor TypeScript users (#1043, #1044)rejectoption (#1046)v9.0.1Compare Source
Types (bug fixes)
3bdab606cc519bfee011dv9.0.0Compare Source
This major release brings many important features including:
Please check the release post for a high-level overview! For the full list of breaking changes, features and bug fixes, please read below.
Thanks @younggglcy, @koshic, @am0o0 and @codesmith-emmy for your help!
One of the maintainers @ehmicky is looking for a remote full-time position. Specialized in Node.js back-ends and CLIs, he led Netlify Build, Plugins and Configuration for 2.5 years. Feel free to contact him on his website or on LinkedIn!
Breaking changes
Minimal supported Node.js version is now
18.19.0. (834e372)When the
encodingoption is'buffer', the output (result.stdout,result.stderr,result.all) is now anUint8Arrayinstead of aBuffer. For more information, see this blog post. (by @younggglcy) (#586)encodingoption. (#586, #928)subprocess.pipeStdout(),subprocess.pipeStderr()andsubprocess.pipeAll()has been removed. Instead, a{file: './path'}object should be passed to thestdoutorstderroption. (#752)subprocess.pipeStdout(),subprocess.pipeStderr()andsubprocess.pipeAll()has been removed. Instead, the stream should be passed to thestdoutorstderroption. If the stream does not have a file descriptor,['pipe', stream]should be passed instead. (#752)subprocess.pipeStdout(),subprocess.pipeStderr()andsubprocess.pipeAll()methods have been renamed tosubprocess.pipe(). The command and its arguments can be passed tosubprocess.pipe()directly, without callingexeca()a second time. Thefrompiping option can specify'stdout'(the default value),'stderr'or'all'. (#757)signaloption tocancelSignal. (#880)error.killedtoerror.isTerminated. (#625)try { await execa('node', ['file.js']); } catch (error) { - if (error.killed) { + if (error.isTerminated) { // ... } }subprocess.cancel()has been removed. Please use eithersubprocess.kill()or thecancelSignaloption instead. (#711)forceKillAfterTimeoutoption toforceKillAfterDelay. Also, it is now passed toexeca()instead ofsubprocess.kill(). (#714, #723)verboseoption is now a string enum instead of a boolean.falsehas been renamed to'none'andtruehas been renamed to'short'. (#884)execPathoption has been renamed tonodePath. It is now a noop unless thenodeoption istrue. Also, it now works even if thepreferLocaloption isfalse. (#812, #815)serializationoption is now'advanced'instead of'json'. In particular, when callingsubprocess.send(object)with an object that contains functions or symbols, those were previously silently removed. Now this will throw an exception. (#905)subprocess.stdout,subprocess.stderrorsubprocess.allis manually piped, the.pipe()call must now happen as soon assubprocessis created. Otherwise, the output at the beginning of the subprocess might be missing. (#658, #747)const subprocess = execa('node', ['file.js']); - setTimeout(() => { subprocess.stdout.pipe(process.stdout); - }, 0);subprocess.kill()and to thekillSignaloption cannot be lowercase anymore. (#1025)Features
Execution
execa()), as opposed to only$. Conversely,$can now use the regular array syntax. (#933)execa(options). (#933, #965)execa(),execaNode(), theinputFileoption, thenodePathoption or theshelloption. (#630, #631, #632, #635)Text lines
linesoption. (#741, #929, #931, #948, #951, #957)Piping multiple subprocesses
subprocess.pipe()without callingexeca(). A template string can also be used. (#840, #859, #864)result.pipedFromanderror.pipedFrom. (#834)stdin/stdout/stderrby using thefromandtopiping options. (#757, #834, #903, #920)unpipeSignalpiping option. (#834, #852)Input/output
stdin,stdoutandstderroptions. For example,stdout: ['inherit', 'pipe']prints the output to the terminal while still returning it asresult.stdout. (#643, #765, #941, #954){file: './path'}object or a file URL to thestdin,stdoutorstderroption. (#610, #614, #621, #671, #1004)stdin,stdoutorstderroption. (#693, #697, #698, #699, #709, #736, #737, #739, #740, #746, #748, #755, #756, #780, #783, #867, #915, #916, #917, #919, #924, #926, #945, #969)Uint8Arrayto theinputorstdinoption. (834e372, #670, #1029)stdinoption. (#604, #944)stdin,inputandinputFileoptions. (#666)result.stdoutandresult.stderrby usingresult.stdio. (#676)stdoutandstderrwith the following options:verbose,lines,stripFinalNewline,maxBuffer,buffer. (#966, #970, #971, #972, #973, #974)Streams
ReadableStreamorWritableStreamto thestdin,stdoutorstderroption. (#615, #619, #645)Duplex, Node.jsTransformor webTransformStreamto thestdin,stdoutorstderroption. (#937, #938)subprocess.readable(),subprocess.writable()orsubprocess.duplex(). (#912, #922, #958)Verbose mode
verbose: 'short'orverbose: 'full'option. (#887, #890)verbose: 'full'option. (#884, #950, #962, #990)verboseoption. (#883, #893, #894)Debugging
result.durationMsanderror.durationMs. (#896)result.cwd. Previously onlyerror.cwdwas available. Also,result.cwdanderror.cwdare now normalized to absolute file paths. (#803)result.escapedCommandin a terminal is now safe. (#875)Errors
ExecaErrorandExecaSyncErrorclasses are now exported. (#911)error.cause. (#911)maxBufferoption by usingerror.isMaxBuffer. (#963)error.message:error.stdoutanderror.stderrare now interleaved if thealloption istrue. Additional file descriptors are now printed too. Also, the formatting has been improved. (#676, #705, #991, #992)error.messageare now escaped, so they don't result in visual bugs when printed in a terminal. (#879)errorevent is emitted onsubprocess.stdoutorsubprocess.stderr. (#814)Termination
subprocess.kill(). (#811, #836, #1023)forceKillAfterDelayandkillSignaloptions now apply to terminations due not only tosubprocess.kill()but also to thecancelSignal,timeout,maxBufferandcleanupoptions. (#714, #728)Node.js files
nodePathandnodeOptionsoptions with any method, as opposed to onlyexecaNode(), by passing thenode: trueoption. (#804, #812, #815)execaNode()or thenode: trueoption, the current Node.js version is now inherited deeply. If the subprocess spawns other subprocesses, they will all use the same Node.js version. (#812, #815, #1011)Synchronous execution
allandbuffer: falseoptions withexecaSync(), as opposed to onlyexeca(). (#953, #956)$.salias for$.sync. (#594)Inter-process communication
ipc: trueoption, as opposed to the more verbosestdio: ['pipe', 'pipe', 'pipe', 'ipc']option. (#794)Input validation
input,timeout,cwd,detached,cancelSignalandencodingoptions. (#668, #715, #803, #928, #940)execa()and the other exported methods. (#838, #873, #899)subprocess.kill()and to thekillSignaloption. (#1025)Bug fixes
undefinedvalues as options. This now uses the option's default value. (#712)inputFileoption points to a missing file. (#609)bufferoption isfalseandsubprocess.stdouterrors. (#729)'overlapped'to thestdoutorstderroption withexecaSync(). (#949)'error'events are emitted on the subprocess. (#790)reject: falseoption not being used when the subprocess fails to spawn. (#734)error.isTerminated. (#625, #719)truewhen the subprocess fails due to thetimeoutoption.truewhen callingprocess.kill(subprocess.pid), except on Windows.falsewhen using non-terminating signals such assubprocess.kill(0).error.signalanderror.signalDescriptionwhen the subprocess is terminated by thecancelSignaloption. (#724)execa()call might be modified by anotherexeca()call. (#796, #806, #911)verboseoption printing the command in the wrong order. (#600)maxBufferandencodingoptions. For example, when usingencoding: 'hex',maxBufferwill now be measured in hexadecimal characters. Also,error.stdout,error.stderranderror.allwere previously not applying themaxBufferoption. (#652, #696)maxBufferoption not truncatingresult.stdoutandresult.stderrwhen usingexecaSync(). (#960)buffer: trueoption (its default value) and iterating oversubprocess.stdoutorsubprocess.stderr. (#908)subprocess.allstream incorrectly being in object mode. (#717)subprocess.stdoutandsubprocess.stderrare properly flushed when the subprocess fails. (#647)timeoutoption. (#727)Types (breaking changes)
CommonOptionstype toOptions(forexeca()) andSyncOptions(forexecaSync()). (#678, #682)import type {Options} from 'execa'; - const options: CommonOptions = {timeout: 1000}; + const options: Options = {timeout: 1000};NodeOptionstype toOptions. (#804)import type {Options} from 'execa'; - const options: NodeOptions = {nodeOptions: ['--no-warnings']}; + const options: Options = {nodeOptions: ['--no-warnings']};KillOptionstype toOptions. (#714)import type {Options} from 'execa'; - const options: KillOptions = {forceKillAfterTimeout: 1000}; + const options: Options = {forceKillAfterDelay: 1000};OptionsandSyncOptionstypes. (#681)import type {Options} from 'execa'; - const options: Options<'utf8'> = {encoding: 'utf8'}; + const options: Options = {encoding: 'utf8'};ExecaChildProcesstype toResultPromise. This is the type ofexeca()'s return value, which is both aPromise<Result>and aSubprocess. (#897, #1007, #1009)import type {ResultPromise, Result} from 'execa'; - const promiseOrSubprocess: ExecaChildProcess = execa('node', ['file.js']); + const promiseOrSubprocess: ResultPromise = execa('node', ['file.js']); const result: Result = await promiseOrSubprocess; promiseOrSubprocess.kill();ExecaChildPromisetype toSubprocess. This is the type of the subprocess instance. (#897, #1007, #1009)import type {Subprocess} from 'execa'; - const subprocess: ExecaChildPromise = execa('node', ['file.js']); + const subprocess: Subprocess = execa('node', ['file.js']); subprocess.kill();ExecaReturnBase,ExecaReturnValueandExecaSyncReturnValuetype toResult(forexeca()) andSyncResult(forexecaSync()). (#897, #1009)import type {Result, SyncResult} from 'execa'; - const result: ExecaReturnBase = await execa('node', ['file.js']); + const result: Result = await execa('node', ['file.js']); - const result: ExecaReturnValue = await execa('node', ['file.js']); + const result: Result = await execa('node', ['file.js']); - const result: ExecaSyncReturnValue = execaSync('node', ['file.js']); + const result: SyncResult = execaSync('node', ['file.js']);stdinoption fromStdioOptiontoStdinOption(forexeca()) andStdinSyncOption(forexecaSync()). (#942, #1008, #1012)import {execa, type StdinOption} from 'execa'; - const stdin: StdioOption = 'inherit'; + const stdin: StdinOption = 'inherit'; await execa('node', ['file.js'], {stdin});stdoutandstderroptions fromStdioOptiontoStdoutStderrOption(forexeca()) andStdoutStderrSyncOption(forexecaSync()). (#942, #1008, #1012)import {execa, type StdoutStderrOption} from 'execa'; - const stdout: StdioOption = 'inherit'; + const stdout: StdoutStderrOption = 'inherit'; - const stderr: StdioOption = 'inherit'; + const stderr: StdoutStderrOption = 'inherit'; await execa('node', ['file.js'], {stdout, stderr});stdiooption fromStdioOption[]toOptions['stdio'](forexeca()) andSyncOptions['stdio'](forexecaSync()). (#942, #1008)import {execa, type Options} from 'execa'; - const stdio: readonly StdioOption[] = ['inherit', 'pipe', 'pipe'] as const; + const stdio: Options['stdio'] = ['inherit', 'pipe', 'pipe'] as const; await execa('node', ['file.js'], {stdio});Result,SyncResult,ExecaError,ExecaSyncError,ResultPromiseandSubprocesstypes is now anOptionstype. (#681)import type {Result} from 'execa'; - const result: ExecaReturnValue<Buffer> = await execa('node', ['file.js'], {encoding: 'buffer'}); + const result: Result<{encoding: 'buffer'}> = await execa('node', ['file.js'], {encoding: 'buffer'}); // Or even better, since it is inferred: + const result: Result = await execa('node', ['file.js'], {encoding: 'buffer'});Types (improvements)
stdin,stdout,stderrandstdiooptions. (#634, #943, #952)result.stdout,result.stderr,result.all,subprocess.stdout,subprocess.stderrandsubprocess.all. (#681, #684, #687, #689, #833)execaSync(). (#678, #939)rejectoption. (#688)error.signaland thekillSignaloption. (#1025)error.exitCode, since that field is sometimesundefined. (#680)Documentation
Configuration
📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.