Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rushstack/heft

Package Overview
Dependencies
Maintainers
3
Versions
360
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rushstack/heft - npm Package Compare versions

Comparing version 0.45.10 to 0.45.11

13

dist/heft.d.ts

@@ -10,2 +10,3 @@ import { AsyncParallelHook } from 'tapable';

import { CommandLineStringParameter } from '@rushstack/ts-command-line';
import { FileLocationStyle } from '@rushstack/node-core-library';
import { IBaseCommandLineDefinition } from '@rushstack/ts-command-line';

@@ -18,2 +19,3 @@ import { ICommandLineChoiceDefinition } from '@rushstack/ts-command-line';

import { ICommandLineStringListDefinition } from '@rushstack/ts-command-line';
import { IFileErrorFormattingOptions } from '@rushstack/node-core-library';
import { IPackageJson } from '@rushstack/node-core-library';

@@ -95,7 +97,2 @@ import { ITerminal } from '@rushstack/node-core-library';

declare const enum FileErrorFormat {
Unix = 0,
VisualStudio = 1
}
/**

@@ -709,5 +706,5 @@ * @beta

requestScopedLogger(plugin: IHeftPlugin, loggerName: string): ScopedLogger;
getErrorStrings(fileErrorFormat?: FileErrorFormat): string[];
getWarningStrings(fileErrorFormat?: FileErrorFormat): string[];
static getErrorMessage(error: Error, fileErrorFormat?: FileErrorFormat): string;
getErrorStrings(fileLocationStyle?: FileLocationStyle): string[];
getWarningStrings(fileErrorFormat?: FileLocationStyle): string[];
static getErrorMessage(error: Error, options?: IFileErrorFormattingOptions): string;
}

@@ -714,0 +711,0 @@

@@ -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.25.3"
"packageVersion": "7.26.0"
}
]
}
import { IHeftPlugin } from '../IHeftPlugin';
import { ScopedLogger } from './ScopedLogger';
import { ITerminalProvider } from '@rushstack/node-core-library';
import { FileErrorFormat } from './FileError';
import { FileLocationStyle, ITerminalProvider, IFileErrorFormattingOptions } from '@rushstack/node-core-library';
export interface ILoggingManagerOptions {

@@ -17,6 +16,6 @@ terminalProvider: ITerminalProvider;

requestScopedLogger(plugin: IHeftPlugin, loggerName: string): ScopedLogger;
getErrorStrings(fileErrorFormat?: FileErrorFormat): string[];
getWarningStrings(fileErrorFormat?: FileErrorFormat): string[];
static getErrorMessage(error: Error, fileErrorFormat?: FileErrorFormat): string;
getErrorStrings(fileLocationStyle?: FileLocationStyle): string[];
getWarningStrings(fileErrorFormat?: FileLocationStyle): string[];
static getErrorMessage(error: Error, options?: IFileErrorFormattingOptions): string;
}
//# sourceMappingURL=LoggingManager.d.ts.map

@@ -7,3 +7,3 @@ "use strict";

const ScopedLogger_1 = require("./ScopedLogger");
const FileError_1 = require("./FileError");
const node_core_library_1 = require("@rushstack/node-core-library");
class LoggingManager {

@@ -40,6 +40,7 @@ constructor(options) {

}
getErrorStrings(fileErrorFormat) {
getErrorStrings(fileLocationStyle) {
const result = [];
for (const scopedLogger of this._scopedLoggers.values()) {
result.push(...scopedLogger.errors.map((error) => `[${scopedLogger.loggerName}] ${LoggingManager.getErrorMessage(error, fileErrorFormat)}`));
result.push(...scopedLogger.errors.map((error) => `[${scopedLogger.loggerName}] ` +
LoggingManager.getErrorMessage(error, { format: fileLocationStyle })));
}

@@ -51,9 +52,10 @@ return result;

for (const scopedLogger of this._scopedLoggers.values()) {
result.push(...scopedLogger.warnings.map((warning) => `[${scopedLogger.loggerName}] ${LoggingManager.getErrorMessage(warning, fileErrorFormat)}`));
result.push(...scopedLogger.warnings.map((warning) => `[${scopedLogger.loggerName}] ` +
LoggingManager.getErrorMessage(warning, { format: fileErrorFormat })));
}
return result;
}
static getErrorMessage(error, fileErrorFormat) {
if (error instanceof FileError_1.FileError) {
return error.toString(fileErrorFormat);
static getErrorMessage(error, options) {
if (error instanceof node_core_library_1.FileError) {
return error.getFormattedErrorMessage(options);
}

@@ -60,0 +62,0 @@ else {

@@ -32,4 +32,4 @@ "use strict";

const semver = __importStar(require("semver"));
const node_core_library_1 = require("@rushstack/node-core-library");
const LinterBase_1 = require("./LinterBase");
const FileError_1 = require("../../pluginFramework/logging/FileError");
class Eslint extends LinterBase_1.LinterBase {

@@ -62,3 +62,2 @@ constructor(options) {

for (const eslintFileResult of this._lintResult) {
const buildFolderRelativeFilePath = path.relative(this._buildFolderPath, eslintFileResult.filePath);
for (const message of eslintFileResult.messages) {

@@ -70,3 +69,8 @@ eslintFailureCount++;

: message.message;
const errorObject = new FileError_1.FileError(formattedMessage, buildFolderRelativeFilePath, message.line, message.column);
const errorObject = new node_core_library_1.FileError(formattedMessage, {
absolutePath: eslintFileResult.filePath,
projectFolder: this._buildFolderPath,
line: message.line,
column: message.column
});
switch (message.severity) {

@@ -73,0 +77,0 @@ case 2 /* error */: {

@@ -33,3 +33,2 @@ "use strict";

const LinterBase_1 = require("./LinterBase");
const FileError_1 = require("../../pluginFramework/logging/FileError");
class Tslint extends LinterBase_1.LinterBase {

@@ -91,6 +90,10 @@ constructor(options) {

for (const tslintFailure of this._lintResult.failures) {
const buildFolderRelativeFilename = path.relative(this._buildFolderPath, tslintFailure.getFileName());
const { line, character } = tslintFailure.getStartPosition().getLineAndCharacter();
const formattedFailure = `(${tslintFailure.getRuleName()}) ${tslintFailure.getFailure()}`;
const errorObject = new FileError_1.FileError(formattedFailure, buildFolderRelativeFilename, line + 1, character + 1);
const errorObject = new node_core_library_1.FileError(formattedFailure, {
absolutePath: tslintFailure.getFileName(),
projectFolder: this._buildFolderPath,
line: line + 1,
column: character + 1
});
switch (tslintFailure.getRuleSeverity()) {

@@ -97,0 +100,0 @@ case 'error': {

@@ -36,3 +36,2 @@ "use strict";

const Eslint_1 = require("./Eslint");
const FileError_1 = require("../../pluginFramework/logging/FileError");
const EmitFilesPatch_1 = require("./EmitFilesPatch");

@@ -454,5 +453,9 @@ const EmitCompletedCallbackManager_1 = require("./EmitCompletedCallbackManager");

const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
const buildFolderRelativeFilename = path.relative(this._configuration.buildFolder, diagnostic.file.fileName);
const formattedMessage = `(TS${diagnostic.code}) ${message}`;
errorObject = new FileError_1.FileError(formattedMessage, buildFolderRelativeFilename, line + 1, character + 1);
errorObject = new node_core_library_1.FileError(formattedMessage, {
absolutePath: diagnostic.file.fileName,
projectFolder: this._configuration.buildFolder,
line: line + 1,
column: character + 1
});
diagnosticMessage = errorObject.toString();

@@ -459,0 +462,0 @@ }

@@ -13,3 +13,4 @@ export declare enum SupportedSerializableArgType {

export interface ISerializedFileErrorValue extends ISerializedErrorValue {
filePath: string;
absolutePath: string;
projectFolder: string;
line: number | undefined;

@@ -16,0 +17,0 @@ column: number | undefined;

@@ -36,3 +36,2 @@ "use strict";

const SubprocessLoggerManager_1 = require("./SubprocessLoggerManager");
const FileError_1 = require("../../pluginFramework/logging/FileError");
const SubprocessTerminator_1 = require("./SubprocessTerminator");

@@ -224,3 +223,3 @@ exports.SUBPROCESS_RUNNER_CLASS_LABEL = Symbol('IsSubprocessModule');

case 'object': {
if (arg instanceof FileError_1.FileError) {
if (arg instanceof node_core_library_1.FileError) {
const result = {

@@ -231,3 +230,4 @@ type: SubprocessCommunication_1.SupportedSerializableArgType.FileError,

errorStack: arg.stack,
filePath: arg.filePath,
absolutePath: arg.absolutePath,
projectFolder: arg.projectFolder,
line: arg.line,

@@ -279,3 +279,8 @@ column: arg.column

const typedArg = arg;
const result = new FileError_1.FileError(typedArg.value.errorMessage, typedArg.value.filePath, typedArg.value.line, typedArg.value.column);
const result = new node_core_library_1.FileError(typedArg.value.errorMessage, {
absolutePath: typedArg.value.absolutePath,
projectFolder: typedArg.value.projectFolder,
line: typedArg.value.line,
column: typedArg.value.column
});
result.stack = typedArg.value.errorStack;

@@ -282,0 +287,0 @@ return result;

{
"name": "@rushstack/heft",
"version": "0.45.10",
"version": "0.45.11",
"description": "Build all your JavaScript projects the same way: A way that works.",

@@ -31,4 +31,4 @@ "keywords": [

"dependencies": {
"@rushstack/heft-config-file": "0.8.6",
"@rushstack/node-core-library": "3.45.7",
"@rushstack/heft-config-file": "0.8.7",
"@rushstack/node-core-library": "3.46.0",
"@rushstack/rig-package": "0.3.12",

@@ -48,3 +48,3 @@ "@rushstack/ts-command-line": "4.12.0",

"devDependencies": {
"@microsoft/api-extractor": "7.26.0",
"@microsoft/api-extractor": "7.26.1",
"@rushstack/eslint-config": "2.6.1",

@@ -51,0 +51,0 @@ "@rushstack/heft": "0.45.6",

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc