Skip to content
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

chore(examples) Update dependency execa to v9 #1448

Merged
merged 1 commit into from May 18, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 11, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
execa 8.0.1 -> 9.1.0 age adoption passing confidence

Release Notes

sindresorhus/execa (execa)

v9.1.0

Compare Source

Features (types)

v9.0.2

Compare Source

Types (bug fixes)

v9.0.1

Compare Source

Types (bug fixes)

v9.0.0

Compare 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

const {stdout} = await execa('node', ['file.js'], {encoding: 'buffer'});
console.log(stdout); // This is now an Uint8Array
- await execa('node', ['file.js'], {encoding: null});
+ await execa('node', ['file.js'], {encoding: 'buffer'});

- await execa('node', ['file.js'], {encoding: 'utf-8'});
+ await execa('node', ['file.js'], {encoding: 'utf8'});

- await execa('node', ['file.js'], {encoding: 'UTF8'});
+ await execa('node', ['file.js'], {encoding: 'utf8'});

- await execa('node', ['file.js'], {encoding: 'utf-16le'});
+ await execa('node', ['file.js'], {encoding: 'utf16le'});

- await execa('node', ['file.js'], {encoding: 'ucs2'});
+ await execa('node', ['file.js'], {encoding: 'utf16le'});

- await execa('node', ['file.js'], {encoding: 'ucs-2'});
+ await execa('node', ['file.js'], {encoding: 'utf16le'});

- await execa('node', ['file.js'], {encoding: 'binary'});
+ await execa('node', ['file.js'], {encoding: 'latin1'});
  • Passing a file path to subprocess.pipeStdout(), subprocess.pipeStderr() and subprocess.pipeAll() has been removed. Instead, a {file: './path'} object should be passed to the stdout or stderr option. (#​752)
- await execa('node', ['file.js']).pipeStdout('output.txt');
+ await execa('node', ['file.js'], {stdout: {file: 'output.txt'}});

- await execa('node', ['file.js']).pipeStderr('output.txt');
+ await execa('node', ['file.js'], {stderr: {file: 'output.txt'}});

- await execa('node', ['file.js']).pipeAll('output.txt');
+ await execa('node', ['file.js'], {
+	stdout: {file: 'output.txt'},
+	stderr: {file: 'output.txt'},
+});
- await execa('node', ['file.js']).pipeStdout(stream);
+ await execa('node', ['file.js'], {stdout: ['pipe', stream]});

- await execa('node', ['file.js']).pipeStderr(stream);
+ await execa('node', ['file.js'], {stderr: ['pipe', stream]});

- await execa('node', ['file.js']).pipeAll(stream);
+ await execa('node', ['file.js'], {
+	stdout: ['pipe', stream],
+	stderr: ['pipe', stream],
+});
  • The subprocess.pipeStdout(), subprocess.pipeStderr() and subprocess.pipeAll() methods have been renamed to subprocess.pipe(). The command and its arguments can be passed to subprocess.pipe() directly, without calling execa() a second time. The from piping option can specify 'stdout' (the default value), 'stderr' or 'all'. (#​757)
- await execa('node', ['file.js']).pipeStdout(execa('node', ['other.js']));
+ await execa('node', ['file.js']).pipe('node', ['other.js']);

- await execa('node', ['file.js']).pipeStderr(execa('node', ['other.js']));
+ await execa('node', ['file.js']).pipe('node', ['other.js'], {from: 'stderr'});

- await execa('node', ['file.js']).pipeAll(execa('node', ['other.js']));
+ await execa('node', ['file.js']).pipe('node', ['other.js'], {from: 'all'});
- await execa('node', ['file.js'], {signal: abortController.signal});
+ await execa('node', ['file.js'], {cancelSignal: abortController.signal});
try {
	await execa('node', ['file.js']);
} catch (error) {
- if (error.killed) {
+ if (error.isTerminated) {
		// ...
	}
}
- subprocess.cancel();
+ subprocess.kill();
- const subprocess = execa('node', ['file.js']);
- subprocess.kill('SIGTERM', {forceKillAfterTimeout: 1000});
+ const subprocess = execa('node', ['file.js'], {forceKillAfterDelay: 1000});
+ subprocess.kill('SIGTERM');
  • The verbose option is now a string enum instead of a boolean. false has been renamed to 'none' and true has been renamed to 'short'. (#​884)
- await execa('node', ['file.js'], {verbose: false});
+ await execa('node', ['file.js'], {verbose: 'none'});

- await execa('node', ['file.js'], {verbose: true});
+ await execa('node', ['file.js'], {verbose: 'short'});
- await execa('node', ['file.js'], {execPath: './path/to/node'});
+ await execa('node', ['file.js'], {nodePath: './path/to/node'});
- subprocess.send({example: true, getExample() {}});
+ subprocess.send({example: true});
const subprocess = execa('node', ['file.js']);
- setTimeout(() => {
	subprocess.stdout.pipe(process.stdout);
- }, 0);
- const subprocess = execa('node', ['file.js'], {killSignal: 'sigterm'});
+ const subprocess = execa('node', ['file.js'], {killSignal: 'SIGTERM'});

- subprocess.kill('sigterm');
+ subprocess.kill('SIGTERM');

Features

Execution
Text lines
Piping multiple subprocesses
Input/output
Streams
Verbose mode
Debugging
Errors
Termination
Node.js files
Synchronous execution
Inter-process communication
Input validation

Bug fixes

Types (breaking changes)

import type {Options} from 'execa';

- const options: CommonOptions = {timeout: 1000};
+ const options: Options = {timeout: 1000};
import type {Options} from 'execa';

- const options: NodeOptions = {nodeOptions: ['--no-warnings']};
+ const options: Options = {nodeOptions: ['--no-warnings']};
import type {Options} from 'execa';

- const options: KillOptions = {forceKillAfterTimeout: 1000};
+ const options: Options = {forceKillAfterDelay: 1000};
import type {Options} from 'execa';

- const options: Options<'utf8'> = {encoding: 'utf8'};
+ const options: Options = {encoding: 'utf8'};
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();
import type {Subprocess} from 'execa';

- const subprocess: ExecaChildPromise = execa('node', ['file.js']);
+ const subprocess: Subprocess = execa('node', ['file.js']);
subprocess.kill();
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']);
import {execa, type StdinOption} from 'execa';

- const stdin: StdioOption = 'inherit';
+ const stdin: StdinOption = 'inherit';
await execa('node', ['file.js'], {stdin});
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});
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});
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)

Documentation


Configuration

📅 Schedule: Branch creation - "before 3am" (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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the chore label May 11, 2024
Copy link

socket-security bot commented May 11, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/helper-plugin-utils@7.10.4 None 0 4.05 kB jlhwung
npm/@babel/highlight@7.24.2 environment 0 20.4 kB nicolo-ribaudo
npm/@babel/plugin-proposal-class-properties@7.10.4 None +4 73.1 kB jlhwung
npm/@babel/plugin-proposal-json-strings@7.10.4 None +1 6.01 kB jlhwung
npm/@babel/plugin-proposal-numeric-separator@7.10.4 None +1 5.97 kB jlhwung
npm/@babel/plugin-proposal-unicode-property-regex@7.10.4 None +3 17.2 kB jlhwung
npm/@babel/plugin-transform-dotall-regex@7.10.4 None +3 16.8 kB jlhwung
npm/@babel/runtime@7.10.4 None 0 99.8 kB jlhwung
npm/@quasar/app@3.3.3 Transitive: environment, filesystem +86 2.99 MB rstoenescu
npm/@quasar/extras@1.16.11 None 0 75.9 MB rstoenescu
npm/@tauri-apps/api@1.5.6 network 0 550 kB tauri-apps-ci-user
npm/@tauri-apps/tauri-webpack@0.2.0 environment 0 7.1 kB lucasfernog
npm/@types/express-serve-static-core@4.17.19 None +3 762 kB types
npm/@vue/eslint-config-standard@8.0.1 Transitive: environment, filesystem, unsafe +12 4.48 MB soda
npm/acorn@8.11.3 None 0 531 kB marijn
npm/ajv@6.12.4 eval 0 923 kB esp
npm/align-text@0.1.4 None 0 8.83 kB shinnn
npm/ansi-escapes@4.3.1 None +1 101 kB sindresorhus
npm/ansi-styles@4.2.1 None +1 21.7 kB sindresorhus
npm/array-includes@3.1.7 None 0 25.4 kB ljharb
npm/array.prototype.flat@1.3.2 None 0 18.7 kB ljharb
npm/async@3.2.4 None 0 821 kB hargasinski

🚮 Removed packages: npm/@babel/helper-annotate-as-pure@7.16.7, npm/@babel/helper-create-class-features-plugin@7.18.0, npm/@babel/helper-create-regexp-features-plugin@7.17.12, npm/@babel/helper-plugin-utils@7.17.12, npm/@babel/helper-regex@7.8.3, npm/@babel/helper-replace-supers@7.18.2, npm/@babel/highlight@7.24.5, npm/@babel/plugin-proposal-class-properties@7.17.12, npm/@babel/plugin-proposal-unicode-property-regex@7.17.12, npm/@babel/plugin-syntax-jsx@7.17.12, npm/@babel/plugin-transform-dotall-regex@7.16.7, npm/@babel/runtime@7.18.3, npm/@hapi/hoek@9.3.0, npm/@types/mime@1.3.2, npm/@types/serve-static@1.13.10, npm/@vue/cli-plugin-babel@5.0.8, npm/@vue/cli-plugin-eslint@5.0.8, npm/@vue/cli-service@5.0.8, npm/@vue/component-compiler-utils@3.3.0, npm/acorn-walk@8.2.0, npm/acorn@8.7.1, npm/ajv-keywords@3.5.2, npm/ansi-regex@3.0.0, npm/ansi-styles@4.2.0, npm/browserslist@4.23.0, npm/caniuse-lite@1.0.30001359

View full report↗︎

Copy link

socket-security bot commented May 11, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@renovate renovate bot force-pushed the renovate/major-allvue branch 4 times, most recently from 9b5be15 to 0227145 Compare May 16, 2024 10:46
@renovate renovate bot merged commit 68a5b17 into dev May 18, 2024
2 checks passed
@renovate renovate bot deleted the renovate/major-allvue branch May 18, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants