-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Working as expected on first line diagnostic.start #190
Conversation
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.
Thanks for contributing! Could you get the tests to pass please?
src/NormalizedMessage.ts
Outdated
@@ -51,7 +51,7 @@ export class NormalizedMessage { | |||
let character: number | undefined; | |||
if (diagnostic.file) { | |||
file = diagnostic.file.fileName; | |||
if (!diagnostic.start) { | |||
if (typeof diagnostic.start === 'undefined') { |
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.
Could this be diagnostic.start === undefined
instead please? Marginally more performant and my personal preference.
Oh and yes updating |
package.json and CHANGELOG.md bump
@johnnyreilly looks like the tests were not passing in master as well due to |
Thanks! |
Should be released in 30 mins or so - thanks for the contribution! 🌻 |
@@ -46,7 +48,7 @@ export class CancellationToken { | |||
if (duration > 10) { | |||
// check no more than once every 10ms | |||
this.lastCancellationCheckTime = time; | |||
this.isCancelled = fs.existsSync(this.getCancellationFilePath()); | |||
this.isCancelled = FsHelper.existsSync(this.getCancellationFilePath()); |
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.
existsSync
is NOT deprecated!
See https://nodejs.org/api/fs.html#fs_fs_existssync_path
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.
Oh that's correct! Would you care to submit a PR reverting that change?
If Typescript diagnostic starts on line 0, fork-ts-checker-webpack-plugin as of 0.5.1 fails and throws an error, which it shouldn't. This humble and small PR fixes it :) I'll update package.json and changelog.md if needed.