Socket
Socket
Sign inDemoInstall

execa

Package Overview
Dependencies
Maintainers
2
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

execa - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1

48

index.d.ts

@@ -15,3 +15,23 @@ import {type Buffer} from 'node:buffer';

export type CommonOptions<EncodingType> = {
type EncodingOption =
| 'utf8'
// eslint-disable-next-line unicorn/text-encoding-identifier-case
| 'utf-8'
| 'utf16le'
| 'utf-16le'
| 'ucs2'
| 'ucs-2'
| 'latin1'
| 'binary'
| 'ascii'
| 'hex'
| 'base64'
| 'base64url'
| 'buffer'
| null
| undefined;
type DefaultEncodingOption = 'utf8';
type BufferEncodingOption = 'buffer' | null;
export type CommonOptions<EncodingType extends EncodingOption = DefaultEncodingOption> = {
/**

@@ -180,3 +200,3 @@ Kill the spawned process when the parent process exits unless either:

/**
Specify the character encoding used to decode the `stdout` and `stderr` output. If set to `null`, then `stdout` and `stderr` will be a `Buffer` instead of a string.
Specify the character encoding used to decode the `stdout` and `stderr` output. If set to `'buffer'` or `null`, then `stdout` and `stderr` will be a `Buffer` instead of a string.

@@ -258,3 +278,3 @@ @default 'utf8'

export type Options<EncodingType = string> = {
export type Options<EncodingType extends EncodingOption = DefaultEncodingOption> = {
/**

@@ -275,3 +295,3 @@ Write some input to the `stdin` of your binary.

export type SyncOptions<EncodingType = string> = {
export type SyncOptions<EncodingType extends EncodingOption = DefaultEncodingOption> = {
/**

@@ -292,3 +312,3 @@ Write some input to the `stdin` of your binary.

export type NodeOptions<EncodingType = string> = {
export type NodeOptions<EncodingType extends EncodingOption = DefaultEncodingOption> = {
/**

@@ -633,6 +653,6 @@ The Node.js executable to use.

arguments?: readonly string[],
options?: Options<null>
options?: Options<BufferEncodingOption>
): ExecaChildProcess<Buffer>;
export function execa(file: string, options?: Options): ExecaChildProcess;
export function execa(file: string, options?: Options<null>): ExecaChildProcess<Buffer>;
export function execa(file: string, options?: Options<BufferEncodingOption>): ExecaChildProcess<Buffer>;

@@ -707,3 +727,3 @@ /**

arguments?: readonly string[],
options?: SyncOptions<null>
options?: SyncOptions<BufferEncodingOption>
): ExecaSyncReturnValue<Buffer>;

@@ -713,3 +733,3 @@ export function execaSync(file: string, options?: SyncOptions): ExecaSyncReturnValue;

file: string,
options?: SyncOptions<null>
options?: SyncOptions<BufferEncodingOption>
): ExecaSyncReturnValue<Buffer>;

@@ -740,3 +760,3 @@

export function execaCommand(command: string, options?: Options): ExecaChildProcess;
export function execaCommand(command: string, options?: Options<null>): ExecaChildProcess<Buffer>;
export function execaCommand(command: string, options?: Options<BufferEncodingOption>): ExecaChildProcess<Buffer>;

@@ -760,3 +780,3 @@ /**

export function execaCommandSync(command: string, options?: SyncOptions): ExecaSyncReturnValue;
export function execaCommandSync(command: string, options?: SyncOptions<null>): ExecaSyncReturnValue<Buffer>;
export function execaCommandSync(command: string, options?: SyncOptions<BufferEncodingOption>): ExecaSyncReturnValue<Buffer>;

@@ -796,3 +816,3 @@ type TemplateExpression =

(options: Options): Execa$;
(options: Options<null>): Execa$<Buffer>;
(options: Options<BufferEncodingOption>): Execa$<Buffer>;
(

@@ -943,5 +963,5 @@ templates: TemplateStringsArray,

arguments?: readonly string[],
options?: NodeOptions<null>
options?: NodeOptions<BufferEncodingOption>
): ExecaChildProcess<Buffer>;
export function execaNode(scriptPath: string, options?: NodeOptions): ExecaChildProcess;
export function execaNode(scriptPath: string, options?: NodeOptions<null>): ExecaChildProcess<Buffer>;
export function execaNode(scriptPath: string, options?: NodeOptions<BufferEncodingOption>): ExecaChildProcess<Buffer>;

@@ -105,3 +105,3 @@ import {createReadStream, readFileSync} from 'node:fs';

if (encoding === null) {
if (encoding === null || encoding === 'buffer') {
return getStreamAsBuffer(stream, {maxBuffer});

@@ -108,0 +108,0 @@ }

{
"name": "execa",
"version": "8.0.0",
"version": "8.0.1",
"description": "Process execution for humans",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -685,3 +685,3 @@ <picture>

Specify the character encoding used to decode the `stdout` and `stderr` output. If set to `null`, then `stdout` and `stderr` will be a `Buffer` instead of a string.
Specify the character encoding used to decode the `stdout` and `stderr` output. If set to `'buffer'` or `null`, then `stdout` and `stderr` will be a `Buffer` instead of a string.

@@ -688,0 +688,0 @@ #### timeout

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc