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

feat: pass loaderContext as 2nd parameter #47

Merged

Conversation

MiniGod
Copy link
Contributor

@MiniGod MiniGod commented Dec 13, 2019

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

fixes #46

Breaking Changes

Shouldn't be any (I wouldn't consider the change I had to do in test/args.js a breaking change).

Additional Information

The tests are covering the two exact use-cases I mentioned in #46, i.e. it does not check that it is the actual loader context, but rather uses it. Hope that's good enough testing for this.

@jsf-clabot
Copy link

jsf-clabot commented Dec 13, 2019

CLA assistant check
All committers have signed the CLA.

@@ -1,9 +1,8 @@
function args(...args) {
function args(options) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: Without this change, the following test fails: loader › should call the function with the loader options with:
TypeError: Converting circular structure to JSON.

I.e. the loaderContext can't matched with a snapshot as it can't be serialized to JSON.

@alexander-akait
Copy link
Member

@MiniGod good work, can you improve readme?

@MiniGod
Copy link
Contributor Author

MiniGod commented Dec 13, 2019

Done 👍

@alexander-akait
Copy link
Member

Thanks! Release will be tomorrow

@alexander-akait alexander-akait merged commit cd5dd47 into webpack-contrib:master Dec 13, 2019
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.

Need a way to output errors / emitError
3 participants