Skip to content
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

refactor: refactor lib/reporter.js #3021

Merged
merged 1 commit into from
May 30, 2018
Merged

refactor: refactor lib/reporter.js #3021

merged 1 commit into from
May 30, 2018

Conversation

lusarz
Copy link
Contributor

@lusarz lusarz commented May 26, 2018

No description provided.

lib/reporter.js Outdated

return function (input, indentation) {
indentation = _.isString(indentation) ? indentation : ''
indentation = helper.isString(indentation) ? indentation : ''
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than introduce helper just for this one case while keeping lodash for the other cases, I'd rather consistently use one or the other.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

lib/reporter.js Outdated
return cache.get(sourceMap)
}

function formatFullPath (path, line, column) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "formatPathMapping"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

lib/reporter.js Outdated

// When no column is given and we default to 0, it doesn't make sense to only search for smaller
// or equal columns in the sourcemap, let's search for equal or greater columns.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment is helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted

lib/reporter.js Outdated
.originalPositionFor({line: line, column: (column || 0), bias: bias})

// Source maps often only have a local file name, resolve to turn into a full path if
// the path is not absolute yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted

@johnjbarton johnjbarton merged commit 0ca3a26 into karma-runner:master May 30, 2018
@lusarz lusarz deleted the refactor-lib-reporter branch June 9, 2018 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants