Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

Conversation

JakobJingleheimer
Copy link
Contributor

Resolves #33

@jsf-clabot
Copy link

jsf-clabot commented Mar 19, 2019

CLA assistant check
All committers have signed the CLA.

src/index.js Outdated
value = JSON5.parse(source);
} catch (e) {
throw new Error('Error parsing JSON5', (e));
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was not doing anything except swallowing JSON5's error info. An error is thrown either way, so might as well do nothing and get the useful info.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean switch it from throwing entirely (even though it was not emitting before)?

Copy link
Member

Choose a reason for hiding this comment

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

Before loader swallow error, with this.emitError it will work as expected. Just:

try {	
    value = JSON5.parse(source);	
  } catch (e) {	
    this.emitError(e);	
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. Will do when I get home from work.

@JakobJingleheimer
Copy link
Contributor Author

I signed the CLA, so I dunno why it says Pending.

Travis is failing because it's configuration is wrong/outdated:

warning You are using Node "4.3.2" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"

@codecov
Copy link

codecov bot commented Mar 19, 2019

Codecov Report

Merging #34 into master will decrease coverage by 8.33%.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #34      +/-   ##
=======================================
- Coverage   83.33%   75%   -8.34%     
=======================================
  Files           2     2              
  Lines           6     4       -2     
=======================================
- Hits            5     3       -2     
  Misses          1     1
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08be680...f049f69. Read the comment docs.

@codecov
Copy link

codecov bot commented Mar 19, 2019

Codecov Report

Merging #34 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #34   +/-   ##
=======================================
  Coverage   83.33%   83.33%           
=======================================
  Files           2        2           
  Lines           6        6           
=======================================
  Hits            5        5           
  Misses          1        1
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 08be680...293cbed. Read the comment docs.

src/index.js Outdated
value = JSON5.parse(source);
} catch (e) {
throw new Error('Error parsing JSON5', (e));
}
Copy link
Member

Choose a reason for hiding this comment

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

@alexander-akait
Copy link
Member

Don't see on CI

@JakobJingleheimer
Copy link
Contributor Author

Weird. Travis was failing with that error before you closed and re-opened the PR.

@JakobJingleheimer JakobJingleheimer changed the title Remove try/catch throw to avoid swallowing JSON5 error output Avoid swallowing JSON5 error output Mar 20, 2019
@alexander-akait
Copy link
Member

Please accept CLA, code looks good!

@JakobJingleheimer
Copy link
Contributor Author

@evilebottnawi I already did (I mentioned above). I got an email confirmation too.

@alexander-akait
Copy link
Member

Looks commit email is not same as you send in CLA

@JakobJingleheimer
Copy link
Contributor Author

JakobJingleheimer commented Mar 20, 2019

Correct. My github privacy settings do not expose my actual email address.

https://help.github.com/en/articles/about-commit-email-addresses

Your CLA bot does not support providing the correct one.

@alexander-akait
Copy link
Member

Very strange, can you check this again? I can't merge without CLA

@JakobJingleheimer
Copy link
Contributor Author

Yay! It worked this time :)

@alexander-akait
Copy link
Member

@jshado1 Thanks, i will update some deps and fix CI in near PR and release new version

@alexander-akait alexander-akait merged commit d050827 into webpack-contrib:master Mar 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants