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

@reporters/github

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reporters/github - npm Package Compare versions

Comparing version 1.5.4 to 1.6.0

28

index.js

@@ -46,2 +46,17 @@ 'use strict';

function extractLocation(data) {
let { line, column, file } = data;
const error = data.details?.error;
file = getFilePath(file);
if (error) {
const errorLocation = parseStack(error, file);
file = getFilePath(errorLocation?.file ?? file) ?? file;
line = errorLocation?.line ?? line;
column = errorLocation?.column ?? column;
}
return { file, startLine: line, startColumn: column };
}
module.exports = async function githubReporter(source) {

@@ -71,9 +86,4 @@ if (!process.env.GITHUB_ACTIONS) {

}
let filePath = getFilePath(event.data.file);
const location = parseStack(error, filePath);
filePath = getFilePath(location?.file ?? filePath) ?? filePath;
core.error(util.inspect(error, { colors: false, breakLength: Infinity }), {
file: filePath,
startLine: location?.line,
startColumn: location?.column,
...extractLocation(event.data),
title: event.data.name,

@@ -84,6 +94,8 @@ });

} case 'test:diagnostic':
if (event.data.nesting === 0) {
if (event.data.file === undefined
|| event.data.line === undefined
|| event.data.column === undefined) {
diagnostics.push(event.data.message);
} else {
core.notice(event.data.message, { file: getFilePath(event.data.file) });
core.notice(event.data.message, extractLocation(event.data));
}

@@ -90,0 +102,0 @@ break;

{
"name": "@reporters/github",
"version": "1.5.4",
"version": "1.6.0",
"description": "A github actions reporter for `node:test`",

@@ -5,0 +5,0 @@ "type": "commonjs",

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