@rushstack/node-core-library
Advanced tools
+8
-1
| # Change Log - @rushstack/node-core-library | ||
| This log was last generated on Wed, 08 Oct 2025 00:13:28 GMT and should not be manually modified. | ||
| This log was last generated on Wed, 22 Oct 2025 00:57:54 GMT and should not be manually modified. | ||
| ## 5.17.1 | ||
| Wed, 22 Oct 2025 00:57:54 GMT | ||
| ### Patches | ||
| - Update the return type of `Executable.waitForExitAsync` to omit `stdout` and `stderr` if an `encoding` parameter isn't passed to the options object. | ||
| ## 5.17.0 | ||
@@ -6,0 +13,0 @@ Wed, 08 Oct 2025 00:13:28 GMT |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
| "packageName": "@microsoft/api-extractor", | ||
| "packageVersion": "7.52.15" | ||
| "packageVersion": "7.53.1" | ||
| } | ||
| ] | ||
| } |
+20
-11
@@ -128,16 +128,9 @@ import * as child_process from 'node:child_process'; | ||
| /** | ||
| * The result of running a process to completion using {@link Executable.(waitForExitAsync:3)}. | ||
| * The result of running a process to completion using {@link Executable.(waitForExitAsync:3)}. This | ||
| * interface does not include stdout or stderr output because an {@link IWaitForExitOptions.encoding} was not specified. | ||
| * | ||
| * @public | ||
| */ | ||
| export interface IWaitForExitResult<T extends Buffer | string | never = never> { | ||
| export interface IWaitForExitResultWithoutOutput { | ||
| /** | ||
| * The process stdout output, if encoding was specified. | ||
| */ | ||
| stdout: T; | ||
| /** | ||
| * The process stderr output, if encoding was specified. | ||
| */ | ||
| stderr: T; | ||
| /** | ||
| * The process exit code. If the process was terminated, this will be null. | ||
@@ -152,2 +145,18 @@ */ | ||
| /** | ||
| * The result of running a process to completion using {@link Executable.(waitForExitAsync:1)}, | ||
| * or {@link Executable.(waitForExitAsync:2)}. | ||
| * | ||
| * @public | ||
| */ | ||
| export interface IWaitForExitResult<T extends Buffer | string = never> extends IWaitForExitResultWithoutOutput { | ||
| /** | ||
| * The process stdout output, if encoding was specified. | ||
| */ | ||
| stdout: T; | ||
| /** | ||
| * The process stderr output, if encoding was specified. | ||
| */ | ||
| stderr: T; | ||
| } | ||
| /** | ||
| * Process information sourced from the system. This process info is sourced differently depending | ||
@@ -281,3 +290,3 @@ * on the operating system: | ||
| */ | ||
| static waitForExitAsync(childProcess: child_process.ChildProcess, options?: IWaitForExitOptions): Promise<IWaitForExitResult<never>>; | ||
| static waitForExitAsync(childProcess: child_process.ChildProcess, options?: IWaitForExitOptions): Promise<IWaitForExitResultWithoutOutput>; | ||
| /** | ||
@@ -284,0 +293,0 @@ * Get the list of processes currently running on the system, keyed by the process ID. |
+23
-14
@@ -336,18 +336,27 @@ "use strict"; | ||
| }); | ||
| let stdout; | ||
| let stderr; | ||
| if (encoding === 'buffer') { | ||
| stdout = Buffer.concat(collectedStdout); | ||
| stderr = Buffer.concat(collectedStderr); | ||
| let result; | ||
| if (encoding) { | ||
| let stdout; | ||
| let stderr; | ||
| if (encoding === 'buffer') { | ||
| stdout = Buffer.concat(collectedStdout); | ||
| stderr = Buffer.concat(collectedStderr); | ||
| } | ||
| else if (encoding !== undefined) { | ||
| stdout = collectedStdout.join(''); | ||
| stderr = collectedStderr.join(''); | ||
| } | ||
| result = { | ||
| stdout: stdout, | ||
| stderr: stderr, | ||
| exitCode, | ||
| signal | ||
| }; | ||
| } | ||
| else if (encoding !== undefined) { | ||
| stdout = collectedStdout.join(''); | ||
| stderr = collectedStderr.join(''); | ||
| else { | ||
| result = { | ||
| exitCode, | ||
| signal | ||
| }; | ||
| } | ||
| const result = { | ||
| stdout: stdout, | ||
| stderr: stderr, | ||
| exitCode, | ||
| signal | ||
| }; | ||
| return result; | ||
@@ -354,0 +363,0 @@ } |
+1
-1
@@ -13,3 +13,3 @@ /// <reference types="node" preserve="true" /> | ||
| export { EnvironmentMap, type IEnvironmentEntry } from './EnvironmentMap'; | ||
| export { type ExecutableStdioStreamMapping, type ExecutableStdioMapping, type IExecutableResolveOptions, type IExecutableSpawnSyncOptions, type IExecutableSpawnOptions, type IWaitForExitOptions, type IWaitForExitWithBufferOptions, type IWaitForExitWithStringOptions, type IWaitForExitResult, type IProcessInfo, Executable } from './Executable'; | ||
| export { type ExecutableStdioStreamMapping, type ExecutableStdioMapping, type IExecutableResolveOptions, type IExecutableSpawnSyncOptions, type IExecutableSpawnOptions, type IWaitForExitOptions, type IWaitForExitWithBufferOptions, type IWaitForExitWithStringOptions, type IWaitForExitResult, type IWaitForExitResultWithoutOutput, type IProcessInfo, Executable } from './Executable'; | ||
| export { type IFileErrorOptions, type IFileErrorFormattingOptions, FileError } from './FileError'; | ||
@@ -16,0 +16,0 @@ export type { IProblemPattern } from '@rushstack/problem-matcher'; |
+3
-3
| { | ||
| "name": "@rushstack/node-core-library", | ||
| "version": "5.17.0", | ||
| "version": "5.17.1", | ||
| "description": "Core libraries that every NodeJS toolchain project should use", | ||
@@ -24,3 +24,3 @@ "main": "lib/index.js", | ||
| "devDependencies": { | ||
| "@rushstack/heft": "1.0.0", | ||
| "@rushstack/heft": "1.1.1", | ||
| "@types/fs-extra": "7.0.0", | ||
@@ -30,3 +30,3 @@ "@types/jju": "1.4.1", | ||
| "@types/semver": "7.5.0", | ||
| "eslint": "~9.25.1", | ||
| "eslint": "~9.37.0", | ||
| "@rushstack/problem-matcher": "0.1.1", | ||
@@ -33,0 +33,0 @@ "decoupled-local-node-rig": "1.0.0" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1254704
0.2%17854
0.22%