@rushstack/node-core-library
Advanced tools
+8
-1
| # Change Log - @rushstack/node-core-library | ||
| This log was last generated on Wed, 23 Jul 2025 20:55:57 GMT and should not be manually modified. | ||
| This log was last generated on Tue, 30 Sep 2025 20:33:51 GMT and should not be manually modified. | ||
| ## 5.15.0 | ||
| Tue, 30 Sep 2025 20:33:51 GMT | ||
| ### Minor changes | ||
| - Add `FileError.getProblemMatcher()` which returns the problem matcher compatible with `IOperationExecutionResult.problemCollector` as well as VS Code, GitHub Actions | ||
| ## 5.14.0 | ||
@@ -6,0 +13,0 @@ Wed, 23 Jul 2025 20:55:57 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.8" | ||
| "packageVersion": "7.52.11" | ||
| } | ||
| ] | ||
| } |
@@ -0,1 +1,2 @@ | ||
| import type { IProblemPattern } from '@rushstack/problem-matcher'; | ||
| import { type FileLocationStyle } from './Path'; | ||
@@ -78,2 +79,9 @@ /** | ||
| getFormattedErrorMessage(options?: IFileErrorFormattingOptions): string; | ||
| /** | ||
| * Get the problem matcher pattern for parsing error messages. | ||
| * | ||
| * @param options - Options for the error message format. | ||
| * @returns The problem matcher pattern. | ||
| */ | ||
| static getProblemMatcher(options?: Pick<IFileErrorFormattingOptions, 'format'>): IProblemPattern; | ||
| private _evaluateBaseFolder; | ||
@@ -80,0 +88,0 @@ static [Symbol.hasInstance](instance: object): boolean; |
+35
-0
@@ -10,2 +10,20 @@ "use strict"; | ||
| const baseFolderEnvVar = 'RUSHSTACK_FILE_ERROR_BASE_FOLDER'; | ||
| const unixProblemMatcherPattern = { | ||
| regexp: '^\\[[^\\]]+\\]\\s+(Error|Warning):\\s+([^:]+):(\\d+):(\\d+)\\s+-\\s+(?:\\(([^)]+)\\)\\s+)?(.*)$', | ||
| severity: 1, | ||
| file: 2, | ||
| line: 3, | ||
| column: 4, | ||
| code: 5, | ||
| message: 6 | ||
| }; | ||
| const vsProblemMatcherPattern = { | ||
| regexp: '^\\[[^\\]]+\\]\\s+(Error|Warning):\\s+([^\\(]+)\\((\\d+),(\\d+)\\)\\s+-\\s+(?:\\(([^)]+)\\)\\s+)?(.*)$', | ||
| severity: 1, | ||
| file: 2, | ||
| line: 3, | ||
| column: 4, | ||
| code: 5, | ||
| message: 6 | ||
| }; | ||
| /** | ||
@@ -63,2 +81,19 @@ * An `Error` subclass that should be thrown to report an unexpected state that specifically references | ||
| } | ||
| /** | ||
| * Get the problem matcher pattern for parsing error messages. | ||
| * | ||
| * @param options - Options for the error message format. | ||
| * @returns The problem matcher pattern. | ||
| */ | ||
| static getProblemMatcher(options) { | ||
| const format = (options === null || options === void 0 ? void 0 : options.format) || 'Unix'; | ||
| switch (format) { | ||
| case 'Unix': | ||
| return unixProblemMatcherPattern; | ||
| case 'VisualStudio': | ||
| return vsProblemMatcherPattern; | ||
| default: | ||
| throw new Error(`The FileError format "${format}" is not supported for problem matchers.`); | ||
| } | ||
| } | ||
| _evaluateBaseFolder() { | ||
@@ -65,0 +100,0 @@ // Cache the sanitized environment variable. This means that we don't support changing |
+1
-0
@@ -15,2 +15,3 @@ /// <reference types="node" preserve="true" /> | ||
| export { type IFileErrorOptions, type IFileErrorFormattingOptions, FileError } from './FileError'; | ||
| export type { IProblemPattern } from '@rushstack/problem-matcher'; | ||
| export type { INodePackageJson, IPackageJson, IPackageJsonDependencyTable, IPackageJsonScriptTable, IPackageJsonRepository, IPeerDependenciesMetaTable, IDependenciesMetaTable, IPackageJsonExports } from './IPackageJson'; | ||
@@ -17,0 +18,0 @@ export { Import, type IImportResolveOptions, type IImportResolveAsyncOptions, type IImportResolveModuleOptions, type IImportResolveModuleAsyncOptions, type IImportResolvePackageOptions, type IImportResolvePackageAsyncOptions } from './Import'; |
+3
-2
| { | ||
| "name": "@rushstack/node-core-library", | ||
| "version": "5.14.0", | ||
| "version": "5.15.0", | ||
| "description": "Core libraries that every NodeJS toolchain project should use", | ||
@@ -24,3 +24,3 @@ "main": "lib/index.js", | ||
| "devDependencies": { | ||
| "@rushstack/heft": "0.74.0", | ||
| "@rushstack/heft": "0.74.3", | ||
| "@types/fs-extra": "7.0.0", | ||
@@ -31,2 +31,3 @@ "@types/jju": "1.4.1", | ||
| "eslint": "~9.25.1", | ||
| "@rushstack/problem-matcher": "0.1.0", | ||
| "decoupled-local-node-rig": "1.0.0" | ||
@@ -33,0 +34,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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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 3 instances 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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
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 3 instances 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
1244674
0.49%17730
0.57%115
-2.54%8
14.29%