Home > @rushstack/node-core-library
node-core-library package
Core libraries that every NodeJS toolchain project should use.
Classes
Class | Description |
|---|---|
This exception can be thrown to indicate that an operation failed and an error message has already been reported appropriately. Thus, the catch handler does not have responsibility for reporting the error. | |
Utilities for parallel asynchronous operations, for use with the system | |
A queue that allows for asynchronous iteration. During iteration, the queue will wait until the next item is pushed into the queue before yielding. If instead all queue items are consumed and all callbacks have been called, the queue will return. | |
A helper for looking up TypeScript | |
A map data structure that stores process environment variables. On Windows operating system, the variable names are case-insensitive. | |
The Executable class provides a safe, portable, recommended solution for tools that need to launch child processes. | |
An | |
The FileSystem API provides a complete set of recommended operations for interacting with the file system. | |
API for interacting with file handles. | |
Helpers for resolving and importing Node.js modules. | |
An | |
Utilities for reading/writing JSON files. | |
Represents a JSON schema that can be used to validate JSON data files loaded by the JsonFile class. | |
Helper functions used when interacting with APIs that do not follow modern coding practices. | |
The | |
Helper functions for working with the | |
Implements a standard heap data structure for items of type T and a custom comparator. The root will always be the minimum value as determined by the comparator. | |
This class provides methods for finding the nearest "package.json" for a folder and retrieving the name of the package. The results are cached. | |
Provides basic operations for validating and manipulating NPM package names such as | |
A configurable parser for validating and manipulating NPM package names such as | |
Common operations for manipulating file and directory paths. | |
The ProtectableMap provides an easy way for an API to expose a | |
This class encapsulates a caching resolver for symlinks in node_modules directories. It assumes that the only symlinks that exist in input paths are those that correspond to npm packages. | |
Operations for sorting collections. | |
This class allows a large text string to be constructed incrementally by appending small chunks. The final string can be obtained by calling StringBuilder.toString(). | |
(BETA) When a child process is created, registering it with the SubprocessTerminator will ensure that the child gets terminated when the current process terminates. | |
Operations for working with strings that contain text. | |
Provides a version-independent implementation of the JavaScript |
Enumerations
Enumeration | Description |
|---|---|
Specifies the behavior of APIs such as FileSystem.copyFile() or FileSystem.createSymbolicLinkFile() when the output file path already exists. | |
The allowed types of encodings, as supported by Node.js | |
Specifies the variant of JSON syntax to be used. | |
Enumeration controlling conversion of newline characters. | |
An integer value used to specify file permissions for POSIX-like operating systems. |
Interfaces
Interface | Description |
|---|---|
Options for controlling the parallelism of asynchronous operations. | |
This interface is part of the IPackageJson file format. It is used for the "dependenciesMeta" field. | |
A process environment variable name and its value. Used by EnvironmentMap. | |
Options for Executable.tryResolve(). | |
Options for Executable.spawn() | |
Options for Executable.spawnSync() | |
Provides options for the output message of a file error. | |
Provides options for the creation of a FileError. | |
The options for FileSystem.copyFile() | |
The options for FileSystem.copyFilesAsync() | |
The options for FileSystem.copyFiles() | |
The options for FileSystem.createSymbolicLinkJunction(), FileSystem.createSymbolicLinkFile(), FileSystem.createSymbolicLinkFolder(), and FileSystem.createHardLink(). | |
The options for FileSystem.deleteFile() | |
The options for FileSystem.move() | |
The options for FileSystem.readFile() | |
The options for FileSystem.readFolderItems() and FileSystem.readFolderItemNames(). | |
The options for FileSystem.updateTimes() Both times must be specified. | |
The options for FileSystem.writeBuffersToFile() | |
The options for FileSystem.writeFile() | |
Interface which represents the flags about which mode the file should be opened in. | |
Common options shared by IImportResolveModuleAsyncOptions and IImportResolvePackageAsyncOptions | |
Options for Import.resolveModuleAsync() | |
Options for Import.resolveModule() | |
Common options shared by IImportResolveModuleOptions and IImportResolvePackageOptions | |
Options for Import.resolvePackageAsync() | |
Options for Import.resolvePackage() | |
Options for JsonFile.loadAndValidate() and JsonFile.loadAndValidateAsync() | |
Options for JsonFile.parseString(), JsonFile.load(), and JsonFile.loadAsync(). | |
Options for JsonFile.save() and JsonFile.saveAsync(). | |
Options for JsonFile.stringify() | |
A definition for a custom format to consider during validation. | |
Callback function arguments for JsonSchema.validateObjectWithCallback() | |
Options for JsonSchema.fromFile() and JsonSchema.fromLoadedObject() | |
Options for JsonSchema.validateObjectWithCallback() | |
Options for JsonSchema.validateObject() | |
An interface for accessing common fields from a package.json file whose version field may be missing. | |
An interface for accessing common fields from a package.json file. | |
This interface is part of the IPackageJson file format. It is used for the "dependencies", "optionalDependencies", and "devDependencies" fields. | |
This interface is part of the IPackageJson file format. It is used for the values of the "exports" field. See Node.js documentation on Conditional Exports and Node.js documentation on Community Conditional Exports. | |
Constructor parameters for PackageJsonLookup | |
This interface is part of the IPackageJson file format. It is used for the "repository" field. | |
This interface is part of the IPackageJson file format. It is used for the "scripts" field. | |
Options that configure the validation rules used by a PackageNameParser instance. | |
A package name that has been separated into its scope and unscoped name. | |
Result object returned by PackageName.tryParse() | |
Options for Path.formatConcisely(). | |
Options for Path.formatFileLocation(). | |
This interface is part of the IPackageJson file format. It is used for the "peerDependenciesMeta" field. | |
VS Code style problem matcher pattern definition. | |
Process information sourced from the system. This process info is sourced differently depending on the operating system: - On Windows, this uses | |
Constructor parameters for ProtectableMap | |
Options used when calling the Text.readLinesFromIterable() or Text.readLinesFromIterableAsync() methods. | |
Arguments used to create a function that resolves symlinked node_modules in a path | |
An interface for a builder object that allows a large text string to be constructed incrementally by appending small chunks. | |
(BETA) Details about how the | |
The options for running a process to completion using Executable.waitForExitAsync(). | |
The result of running a process to completion using Executable.waitForExitAsync(), or Executable.waitForExitAsync(). | |
The result of running a process to completion using Executable.waitForExitAsync(). This interface does not include stdout or stderr output because an IWaitForExitOptions.encoding was not specified. | |
The options for running a process to completion using Executable.waitForExitAsync(). | |
The options for running a process to completion using Executable.waitForExitAsync(). | |
Namespaces
Namespace | Description |
|---|---|
Variables
Variable | Description |
|---|---|
String constants for common filenames and parts of filenames. | |
String constants for common folder names. |
Type Aliases
Type Alias | Description |
|---|---|
A "branded type" is a primitive type with a compile-type key that makes it incompatible with other aliases for the primitive type. | |
Types for IExecutableSpawnSyncOptions.stdio and IExecutableSpawnOptions.stdio | |
Typings for one of the streams inside IExecutableSpawnSyncOptions.stdio. | |
The format that the FileError message should conform to. The supported formats are: - Unix: | |
Callback function type for IFileSystemCopyFilesAsyncOptions.filter | |
Callback function type for IFileSystemCopyFilesOptions.filter | |
An alias for the Node.js | |
An alias for the Node.js | |
Options for JsonSchema.fromFile() | |
Options for JsonSchema.fromLoadedObject() | |
The Rush Stack lint rules discourage usage of | |
Represents a JSON-serializable object whose type has not been determined yet. | |
Specifies the version of json-schema to be validated against. https://json-schema.org/specification | |
Callback used by LegacyAdapters. |