-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: upgrade some deps #8692
Merged
Merged
chore: upgrade some deps #8692
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4fc6cbb
chore: refresh lockfile
SimenB d4debe4
mess with error lines
SimenB 7c4be33
review feedback
SimenB edbd882
revert snapshot change
SimenB d548b1e
rollback some babel changes
SimenB 0a7d5d8
bah, snapshot
SimenB 5ac7fe2
downgrade rtl for node 6
SimenB e83d8e6
rtl changed node version compat in a minor, because of course it did
SimenB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"lerna": "3.13.1", | ||
"lerna": "3.15.0", | ||
"version": "24.8.0", | ||
"npmClient": "yarn", | ||
"packages": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,13 +115,9 @@ export default class Jasmine2Reporter implements Reporter { | |
private _addMissingMessageToStack(stack: string, message?: string) { | ||
// Some errors (e.g. Angular injection error) don't prepend error.message | ||
// to stack, instead the first line of the stack is just plain 'Error' | ||
const ERROR_REGEX = /^Error\s*\n/; | ||
if ( | ||
stack && | ||
message && | ||
ERROR_REGEX.test(stack) && | ||
stack.indexOf(message) === -1 | ||
) { | ||
const ERROR_REGEX = /^Error:?\s*\n/; | ||
|
||
if (stack && message && !stack.includes(message)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it doesn't hurt to always try to replace |
||
return message + stack.replace(ERROR_REGEX, '\n'); | ||
} | ||
return stack; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,8 @@ const getRenderedCallsite = ( | |
return renderedCallsite; | ||
}; | ||
|
||
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. | ||
|
@@ -119,7 +121,7 @@ export const formatExecError = ( | |
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; | ||
} | ||
|
@@ -131,7 +133,7 @@ export const formatExecError = ( | |
? '\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'; | ||
} | ||
|
@@ -331,6 +333,16 @@ export const formatResultsErrors = ( | |
.join('\n'); | ||
}; | ||
|
||
const errorRegexp = /^Error:?\s*$/; | ||
|
||
const removeBlankErrorLine = (str: string) => | ||
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. | ||
|
@@ -344,13 +356,13 @@ export const separateMessageFromStack = (content: string) => { | |
// If the error is a plain "Error:" instead of a SyntaxError or TypeError we | ||
// 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]*)$/, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. intellij told me I didn't need to escape the |
||
); | ||
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}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newer versions of
p-each-series
has types, but they are node 8 only. for some reason the types published as1.0.1
makes type check fail for us...