Fixed #1 - Fixed the whatsnew-** script for loading release notes into builds
Added test to ensure that release notes are parsed properly Updated to latest dependencies to fix security vulnerability Updated GH Actions Workflow to run test before updating tag Updated README.md to reflect proper whatsnew documentation.
This commit is contained in:
2
node_modules/jest-message-util/build/index.d.ts.map
generated
vendored
2
node_modules/jest-message-util/build/index.d.ts.map
generated
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAMrE,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAgB9B,oBAAY,gBAAgB,GAAG,IAAI,CACjC,MAAM,CAAC,aAAa,EACpB,SAAS,GAAG,WAAW,CACxB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAsDF,eAAO,MAAM,eAAe,+NAoD3B,CAAC;AA6EF,eAAO,MAAM,kBAAkB,0DAG4B,CAAC;AAE5D,eAAO,MAAM,WAAW,mCAcvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,mJAsC5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,2KA8C/B,CAAC;AAKF,eAAO,MAAM,wBAAwB;;;CAmBpC,CAAC"}
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAMrE,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAC,KAAK,EAAC,MAAM,SAAS,CAAC;AAgB9B,oBAAY,gBAAgB,GAAG,IAAI,CACjC,MAAM,CAAC,aAAa,EACpB,SAAS,GAAG,WAAW,CACxB,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAwDF,eAAO,MAAM,eAAe,+NAoD3B,CAAC;AA6EF,eAAO,MAAM,kBAAkB,0DAG4B,CAAC;AAE5D,eAAO,MAAM,WAAW,mCAcvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,mJAsC5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,2KA8C/B,CAAC;AAeF,eAAO,MAAM,wBAAwB;;;CAmBpC,CAAC"}
|
||||
38
node_modules/jest-message-util/build/index.js
generated
vendored
38
node_modules/jest-message-util/build/index.js
generated
vendored
@@ -50,12 +50,8 @@ try {
|
||||
// node internals in the browser though, so no issue.
|
||||
}
|
||||
|
||||
const PATH_NODE_MODULES = `${_path.default.sep}node_modules${
|
||||
_path.default.sep
|
||||
}`;
|
||||
const PATH_JEST_PACKAGES = `${_path.default.sep}jest${
|
||||
_path.default.sep
|
||||
}packages${_path.default.sep}`; // filter for noisy stack trace lines
|
||||
const PATH_NODE_MODULES = `${_path.default.sep}node_modules${_path.default.sep}`;
|
||||
const PATH_JEST_PACKAGES = `${_path.default.sep}jest${_path.default.sep}packages${_path.default.sep}`; // filter for noisy stack trace lines
|
||||
|
||||
const JASMINE_IGNORE = /^\s+at(?:(?:.jasmine\-)|\s+jasmine\.buildExpectationResult)/;
|
||||
const JEST_INTERNALS_IGNORE = /^\s+at.*?jest(-.*?)?(\/|\\)(build|node_modules|packages)(\/|\\)/;
|
||||
@@ -102,7 +98,9 @@ const getRenderedCallsite = (fileContent, line, column) => {
|
||||
renderedCallsite = indentAllLines(renderedCallsite, MESSAGE_INDENT);
|
||||
renderedCallsite = `\n${renderedCallsite}\n`;
|
||||
return renderedCallsite;
|
||||
}; // ExecError is an error thrown outside of the test suite (not inside an `it` or
|
||||
};
|
||||
|
||||
const blankStringRegexp = /^\s*$/; // ExecError is an error thrown outside of the test suite (not inside an `it` or
|
||||
// `before/after each` hooks). If it's thrown, none of the tests in the file
|
||||
// are executed.
|
||||
|
||||
@@ -126,7 +124,7 @@ const formatExecError = (error, config, options, testPath, reuseMessage) => {
|
||||
const separated = separateMessageFromStack(stack || '');
|
||||
stack = separated.stack;
|
||||
|
||||
if (separated.message.indexOf(trim(message)) !== -1) {
|
||||
if (separated.message.includes(trim(message))) {
|
||||
// Often stack trace already contains the duplicate of the message
|
||||
message = separated.message;
|
||||
}
|
||||
@@ -137,7 +135,7 @@ const formatExecError = (error, config, options, testPath, reuseMessage) => {
|
||||
? '\n' + formatStackTrace(stack, config, options, testPath)
|
||||
: '';
|
||||
|
||||
if (message.match(/^\s*$/) && stack.match(/^\s*$/)) {
|
||||
if (blankStringRegexp.test(message) && blankStringRegexp.test(stack)) {
|
||||
// this can happen if an empty object is thrown.
|
||||
message = MESSAGE_INDENT + 'Error: No message was provided';
|
||||
}
|
||||
@@ -358,11 +356,19 @@ const formatResultsErrors = (testResults, config, options, testPath) => {
|
||||
return title + '\n' + message + '\n' + stack;
|
||||
})
|
||||
.join('\n');
|
||||
}; // jasmine and worker farm sometimes don't give us access to the actual
|
||||
// Error object, so we have to regexp out the message from the stack string
|
||||
// to format it.
|
||||
};
|
||||
|
||||
exports.formatResultsErrors = formatResultsErrors;
|
||||
const errorRegexp = /^Error:?\s*$/;
|
||||
|
||||
const removeBlankErrorLine = str =>
|
||||
str
|
||||
.split('\n') // Lines saying just `Error:` are useless
|
||||
.filter(line => !errorRegexp.test(line))
|
||||
.join('\n')
|
||||
.trimRight(); // jasmine and worker farm sometimes don't give us access to the actual
|
||||
// Error object, so we have to regexp out the message from the stack string
|
||||
// to format it.
|
||||
|
||||
const separateMessageFromStack = content => {
|
||||
if (!content) {
|
||||
@@ -376,16 +382,16 @@ const separateMessageFromStack = content => {
|
||||
// remove the prefix from the message because it is generally not useful.
|
||||
|
||||
const messageMatch = content.match(
|
||||
/^(?:Error: )?([\s\S]*?(?=\n\s*at\s.*\:\d*\:\d*)|\s*.*)([\s\S]*)$/
|
||||
/^(?:Error: )?([\s\S]*?(?=\n\s*at\s.*:\d*:\d*)|\s*.*)([\s\S]*)$/
|
||||
);
|
||||
|
||||
if (!messageMatch) {
|
||||
// For flow
|
||||
// For typescript
|
||||
throw new Error('If you hit this error, the regex above is buggy.');
|
||||
}
|
||||
|
||||
const message = messageMatch[1];
|
||||
const stack = messageMatch[2];
|
||||
const message = removeBlankErrorLine(messageMatch[1]);
|
||||
const stack = removeBlankErrorLine(messageMatch[2]);
|
||||
return {
|
||||
message,
|
||||
stack
|
||||
|
||||
Reference in New Issue
Block a user