This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Fix specs on Windows...again #99
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6a0783d
:white_check_mark: :checkered_flag: Fix specs on Windows...again
50Wliu c54ddcc
Fix incorrect options.detail regex
50Wliu 035ba16
Combine and move filepath logic
50Wliu 22f69bd
:art: Fully revert options.detail if block back to the way it was before
50Wliu 5c5522c
:art:
50Wliu 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 |
---|---|---|
|
@@ -183,6 +183,12 @@ class NotificationIssue | |
packagePaths[packageName] = fs.realpathSync(packagePath) | ||
|
||
getPackageName = (filePath) => | ||
filePath = /(\((.+?):\d+|\((.+)\)|(.+))/.exec(filePath)[1] | ||
|
||
# Stack traces may be a file URI | ||
if /file:\/\/(\w*)\/(.*)/.test(filePath) | ||
filePath = /file:\/\/(\w*)\/(.*)/.exec(filePath)[2] | ||
|
||
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 looks like the same regex is created and executed twice here, and the first capture group is unused. Also, sometimes when regexps have multiple # somewhere at the top of the file
FileURLRegExp = new RegExp('file://\w*/(.*)')
# ...
if match = FileURLRegExp.exec(filePath)
filePath = match[1] |
||
if path.isAbsolute(filePath) | ||
for packName, packagePath of packagePaths | ||
continue if filePath is 'node.js' | ||
|
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
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.
I'm a little confused by the nesting of capture groups here. Does item
1
in the match array represent the entire match, because the entire thing is wrapped in parens? If so, maybe you could just remove the outer parens and use item0
?