engines-wrapper icon indicating copy to clipboard operation
engines-wrapper copied to clipboard

Update dependencies (major) (major)

Open renovate[bot] opened this issue 3 years ago β€’ 2 comments

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@sindresorhus/slugify 1.1.2 -> 2.2.1 age adoption passing confidence
chalk 4.1.2 -> 5.3.0 age adoption passing confidence
execa 5.1.1 -> 9.5.1 age adoption passing confidence
husky 7.0.4 -> 9.1.6 age adoption passing confidence
node-fetch 2.7.0 -> 3.3.2 age adoption passing confidence
prettier (source) 2.8.8 -> 3.3.3 age adoption passing confidence
typescript (source) 4.9.5 -> 5.6.3 age adoption passing confidence

Release Notes

sindresorhus/slugify (@​sindresorhus/slugify)

v2.2.1

Compare Source

  • Improve compatibility with partial strings

v2.2.0

Compare Source

v2.1.1

Compare Source

v2.1.0

Compare Source

v2.0.0

Compare Source

Breaking
  • Require Node.js 12 12498c9
  • This package is now pure ESM. Please read this.
  • slugify.counter moved to a named export slugifyWithCounter
chalk/chalk (chalk)

v5.3.0

Compare Source

v5.2.0

Compare Source

v5.1.2

Compare Source

v5.1.1

Compare Source

  • Improved the names of exports introduced in 5.1.0 (#​567) 6e0df05
    • We of course preserved the old names.

v5.1.0

Compare Source

v5.0.1

Compare Source

  • Add main field to package.json for backwards compatibility with some developer tools 85f7e96

v5.0.0

Compare Source

Breaking
  • This package is now pure ESM. Please read this.
    • If you use TypeScript, you need to use TypeScript 4.7 or later. Why.
    • If you use a bundler, make sure it supports ESM and that you have correctly configured it for ESM.
    • The Chalk issue tracker is not a support channel for your favorite build/bundler tool.
    • It's totally fine to stay on Chalk v4. It's been stable for years.
  • Require Node.js 12.20 fa16f4e
  • Move some properties off the default export to individual named exports:
    • chalk.Instance β†’ Chalk
    • chalk.supportsColor β†’ supportsColor
    • chalk.stderr β†’ chalkStderr
    • chalk.stderr.supportsColor β†’ supportsColorStderr
  • Remove .keyword(), .hsl(), .hsv(), .hwb(), and .ansi() coloring methods (#​433) 4cf2e40
    • These were not commonly used and added a lot of bloat to Chalk. You can achieve the same by using the color-convert package.
  • The tagged template literal support moved into a separate package: chalk-template (#​524) c987c61
-import chalk from 'chalk';
+import chalkTemplate from 'chalk-template';

-chalk`2 + 3 = {bold ${2 + 3}}`;
+chalkTemplate`2 + 3 = {bold ${2 + 3}}`;
Improvements
sindresorhus/execa (execa)

v9.5.1

Compare Source

v9.5.0

Compare Source

v9.4.1

Compare Source

Bug fixes

v9.4.0

Compare Source

Features

  • We've created a separate package called nano-spawn. It is similar to Execa but with fewer features, for a much smaller package size. More info.

Bug fixes

Documentation

v9.3.1

Compare Source

v9.3.0

Compare Source

Features

  • The verbose option can now be a function to customize logging. (#​1130)

v9.2.0

Compare Source

This release includes a new set of methods to exchange messages between the current process and a Node.js subprocess, also known as "IPC". This allows passing and returning almost any message type to/from a Node.js subprocess. Also, debugging IPC is now much easier.

Moreover, a new gracefulCancel option has also been added to terminate a subprocess gracefully.

For a deeper dive-in, please check and share the release post!

Thanks @​iiroj for your contribution, @​SimonSiefke and @​adymorz for reporting the bugs fixed in this release, and @​karlhorky for improving the documentation!

Deprecations

  • Passing 'ipc' to the stdio option has been deprecated. It will be removed in the next major release. Instead, the ipc: true option should be used. (#​1056)
- await execa('npm', ['run', 'build'], {stdio: ['pipe', 'pipe', 'pipe', 'ipc']});
+ await execa('npm', ['run', 'build'], {ipc: true});
  • The execaCommand() method has been deprecated. It will be removed in the next major release. If most cases, the template string syntax should be used instead.
- import {execaCommand} from 'execa';
+ import {execa} from 'execa';

- await execaCommand('npm run build');
+ await execa`npm run build`;

const taskName = 'build';
- await execaCommand(`npm run ${taskName}`);
+ await execa`npm run ${taskName}`;

const commandArguments = ['run', 'task with space'];
await execa`npm ${commandArguments}`;

If the file and/or multiple arguments are supplied as a single string, parseCommandString(command) can split that string into an array. More info. (#​1054)

- import {execaCommand} from 'execa';
+ import {execa, parseCommandString} from 'execa';

const commandString = 'npm run task';
- await execaCommand(commandString);
+ const commandArray = parseCommandString(commandString); // ['npm', 'run', 'task']
+ await execa`${commandArray}`;

// Or alternatively:
const [file, ...commandArguments] = commandArray;
await execa(file, commandArguments);

Features

  • Add gracefulCancel option and getCancelSignal() method to terminate a subprocess gracefully. error.isGracefullyCanceled was also added. (#​1109)
  • Add error.isForcefullyTerminated. It is true when the subprocess was terminated by the forceKillAfterDelay option. (#​1111)
  • New methods to simplify exchanging messages between the current process and the subprocess. More info. (#​1059, #​1061, #​1076, #​1077, #​1079, #​1082, #​1083, #​1086, #​1087, #​1088, #​1089, #​1090, #​1091, #​1092, #​1094, #​1095, #​1098, #​1104, #​1107)
    • The current process sends messages with subprocess.sendMessage(message) and receives them with subprocess.getOneMessage(). subprocess.getEachMessage() listens to multiple messages.
    • The subprocess uses sendMessage(message), getOneMessage() and getEachMessage() instead. Those are the same methods, but imported directly from the 'execa' module.
  • The ipcInput option sends an IPC message from the current process to the subprocess as it starts. This enables passing almost any input type to a Node.js subprocess. (#​1068)
  • The result.ipcOutput array contains all the IPC messages sent by the subprocess to the current process. This enables returning almost any output type from a Node.js subprocess. (#​1067, #​1071, #​1075)
  • The error message now contains every IPC message sent by the subprocess. (#​1067)
  • The verbose: 'full' option now logs every IPC message sent by the subprocess, for debugging. More info here and there. (#​1063)

Types

  • Add ExecaMethod, ExecaNodeMethod and ExecaScriptMethod, ExecaSyncMethod and ExecaScriptSyncMethod types. (#​1066)
  • Export the Message type, for IPC. (#​1059)
  • Fix type of forceKillAfterDelay: true option. (#​1116)

Bug fixes

  • Fix passing a {file} to both the stdin and the stdout or stderr options. (#​1058)
  • Fix multiple minor problems with the cancelSignal option. (#​1108)
  • Fix accidental publishing of Vim backup files. (#​1074)
  • Fix engines.node field in package.json. Supported Node.js version is ^18.19.0 or >=20.5.0. (by @​iiroj) (#​1101)

v9.1.0

Compare Source

Features (types)

v9.0.2

Compare Source

Bug fixes (types)

v9.0.1

Compare Source

Bug fixes (types)

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'},
+});
  • Passing a writable stream to subprocess.pipeStdout(), subprocess.pipeStderr() and subprocess.pipeAll() has been removed. Instead, the stream should be passed to the stdout or stderr option. If the stream does not have a file descriptor, ['pipe', stream] should be passed instead. (#​752)
- 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'});
  • Renamed the signal option to cancelSignal. (#​880)
- await execa('node', ['file.js'], {signal: abortController.signal});
+ await execa('node', ['file.js'], {cancelSignal: abortController.signal});
  • Renamed error.killed to error.isTerminated. (#​625)
try {
	await execa('node', ['file.js']);
} catch (error) {
- if (error.killed) {
+ if (error.isTerminated) {
		// ...
	}
}
  • subprocess.cancel() has been removed. Please use either subprocess.kill() or the cancelSignal option instead. (#​711)
- subprocess.cancel();
+ subprocess.kill();
  • Renamed the forceKillAfterTimeout option to forceKillAfterDelay. Also, it is now passed to execa() instead of subprocess.kill(). (#​714, #​723)
- 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'});
  • The execPath option has been renamed to nodePath. It is now a noop unless the node option is true. Also, it now works even if the preferLocal option is false. (#​812, #​815)
- await execa('node', ['file.js'], {execPath: './path/to/node'});
+ await execa('node', ['file.js'], {nodePath: './path/to/node'});
  • The default value for the serialization option is now 'advanced' instead of 'json'. In particular, when calling subprocess.send(object) with an object that contains functions or symbols, those were previously silently removed. Now this will throw an exception. (#​905)
- subprocess.send({example: true, getExample() {}});
+ subprocess.send({example: true});
  • If subprocess.stdout, subprocess.stderr or subprocess.all is manually piped, the .pipe() call must now happen as soon as subprocess is 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);
  • Signals passed to subprocess.kill() and to the killSignal option cannot be lowercase anymore. (#​1025)
- const subprocess = execa('node', ['file.js'], {killSignal: 'sigterm'});
+ const subprocess = execa('node', ['file.js'], {killSignal: 'SIGTERM'});

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

Features

Execution
  • Use the template string syntax with any method (including execa()), as opposed to only $. Conversely, $ can now use the regular array syntax. (#​933)
  • A command's template string can span multiple lines. (#​843)
  • Share options between multiple calls, or set global options, by using execa(options). (#​933, #​965)
  • Pass a file URL (as opposed to a file path string) to execa(), execaNode(), the inputFile option, the nodePath option or the shell option. (#​630, #​631, #​632, #​635)
Text lines
Piping multiple subprocesses
Input/output
Streams
Verbose mode
Debugging
  • Retrieve the subprocess' duration by using result.durationMs and error.durationMs. (#​896)
  • Retrieve the subprocess' current directory by using result.cwd. Previously only error.cwd was available. Also, result.cwd and error.cwd are now normalized to absolute file paths. (#​803)
  • Printing result.escapedCommand in a terminal is now safe. (#​875)
Errors
  • The ExecaError and ExecaSyncError classes are now exported. (#​911)
  • Find the subprocess failure's root cause by using error.cause. (#​911)
  • Know whether the subprocess failed due to the maxBuffer option by using error.isMaxBuffer. (#​963)
  • Improved error.message: error.stdout and error.stderr are now interleaved if the all option is true. Additional file descriptors are now printed too. Also, the formatting has been improved. (#​676, #​705, #​991, #​992)
  • Control characters in error.message are now escaped, so they don't result in visual bugs when printed in a terminal. (#​879)
  • Improved stack trace when an error event is emitted on subprocess.stdout or subprocess.stderr. (#​814)
Termination
  • Specify an error message or stack trace when terminating a subprocess by passing an error instance to subprocess.kill(). (#​811, #​836, #​1023)
  • The forceKillAfterDelay and killSignal options now apply to terminations due not only to subprocess.kill() but also to the cancelSignal, timeout, maxBuffer and cleanup options. (#​714, #​728)
Node.js files
  • Use the nodePath and nodeOptions options with any method, as opposed to only execaNode(), by passing the node: true option. (#​804, #​812, #​815)
  • When using execaNode() or the node: true option, 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
  • Use the all and buffer: false options with execaSync(), as opposed to only execa(). (#​953, #​956)
  • Added the $.s alias for $.sync. (#​594)
Inter-process communication
  • Use the ipc: true option, as opposed to the more verbose stdio: ['pipe', 'pipe', 'pipe', 'ipc'] option. (#​794)
Input validation

Bug fixes

  • Fixed passing undefined values as options. This now uses the option's default value. (#​712)
  • Fixed the process crashing when the inputFile option points to a missing file. ([#​609](https://redirect.g

Configuration

πŸ“… Schedule: Branch creation - "before 8am on Wednesday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ‘» Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


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

This PR was generated by Mend Renovate. View the repository job log.

renovate[bot] avatar Aug 10 '22 01:08 renovate[bot]

πŸ‘ 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β†—οΈŽ

socket-security[bot] avatar Mar 30 '23 22:03 socket-security[bot]

New and removed dependencies detected. Learn more about Socket for GitHub β†—οΈŽ

Package New capabilities Transitives Size Publisher

View full reportβ†—οΈŽ

socket-security[bot] avatar Jun 14 '23 08:06 socket-security[bot]