New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jest-message-util

Package Overview
Dependencies
Maintainers
3
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-message-util - npm Package Compare versions

Comparing version 19.0.0 to 19.1.0-alpha.eed82034

yarn.lock

44

build/messages.js

@@ -19,8 +19,9 @@ /**

const separateMessageFromStack = require('./separateMessageFromStack');
const slash = require('slash');
// filter for noisy stack trace lines
const JASMINE_IGNORE =
/^\s+at(?:(?:.*?vendor\/|jasmine\-)|\s+jasmine\.buildExpectationResult)/;
const STACK_TRACE_IGNORE =
/^\s+at.*?jest(-.*?)?(\/|\\)(vendor|build|node_modules|packages)(\/|\\)/;
/* eslint-disable max-len */
const JASMINE_IGNORE = /^\s+at(?:(?:.*?vendor\/|jasmine\-)|\s+jasmine\.buildExpectationResult)/;
const STACK_TRACE_IGNORE = /^\s+at.*?jest(-.*?)?(\/|\\)(build|node_modules|packages)(\/|\\)/;
/* eslint-enable max-len */
const TITLE_INDENT = ' ';

@@ -84,6 +85,9 @@ const MESSAGE_INDENT = ' ';

return (
TITLE_INDENT + TITLE_BULLET + EXEC_ERROR_MESSAGE + '\n\n' +
message + stack + '\n');
return TITLE_INDENT +
TITLE_BULLET +
EXEC_ERROR_MESSAGE +
'\n\n' +
message +
stack +
'\n';
};

@@ -111,7 +115,3 @@

const formatPaths = (
config,
relativeTestPath,
line) =>
{
const formatPaths = (config, relativeTestPath, line) => {
// Extract the file path from the trace line.

@@ -123,10 +123,8 @@ const match = line.match(/(^\s*at .*?\(?)([^()]+)(:[0-9]+:[0-9]+\)?.*$)/);

let filePath = path.relative(config.rootDir, match[2]);
let filePath = slash(path.relative(config.rootDir, match[2]));
// highlight paths from the current test file
if (
config.testMatch &&
config.testMatch.length &&
micromatch(filePath, config.testMatch) ||
filePath === relativeTestPath)

@@ -152,6 +150,7 @@ {

const relativeTestPath = testPath ?
path.relative(config.rootDir, testPath) :
slash(path.relative(config.rootDir, testPath)) :
null;
lines = removeInternalStackEntries(lines, config);
return lines.map(trimPaths).
return lines.
map(trimPaths).
map(formatPaths.bind(null, config, relativeTestPath)).

@@ -179,3 +178,4 @@ map(line => STACK_INDENT + line).

return failedResults.map((_ref) => {let result = _ref.result,content = _ref.content;var _separateMessageFromS =
return failedResults.
map((_ref) => {let result = _ref.result,content = _ref.content;var _separateMessageFromS =
separateMessageFromStack(content);let message = _separateMessageFromS.message,stack = _separateMessageFromS.stack;

@@ -192,3 +192,4 @@ stack = config.noStackTrace ?

const title = chalk.bold.red(
TITLE_INDENT + TITLE_BULLET +
TITLE_INDENT +
TITLE_BULLET +
result.ancestorTitles.join(ANCESTRY_SEPARATOR) + (

@@ -200,3 +201,4 @@ result.ancestorTitles.length ? ANCESTRY_SEPARATOR : '') +

return title + '\n' + message + '\n' + stack;
}).join('\n');
}).
join('\n');
};

@@ -203,0 +205,0 @@

{
"name": "jest-message-util",
"version": "19.0.0",
"version": "19.1.0-alpha.eed82034",
"repository": {

@@ -11,5 +11,6 @@ "type": "git",

"dependencies": {
"chalk": "^1.1.1",
"micromatch": "^2.3.11"
"chalk": "^1.1.3",
"micromatch": "^2.3.11",
"slash": "^1.0.0"
}
}
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