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

Webpack 5 #66

Merged
merged 3 commits into from Mar 12, 2021
Merged

Webpack 5 #66

merged 3 commits into from Mar 12, 2021

Conversation

Brian-McBride
Copy link
Contributor

Fix for #61

The real problem is that Webpack 5 isn't exporting most of its typings.
I opened a ticket that addresses this:
webpack/webpack#12869

Until then, I had to define the apply method as apply(untypedResolver: Resolver | unknown): void then cast it to this module's Resolver.

Once the webpack maintainers export their Resolver class definition, then that can be imported and directly replace all the references in this lib and it will work. (I did take the time to test that)

I also added some Jest unit tests. It is probably worth adding the testing to the Husky scripts. During the testing, I found that the logInfoToStdOut was not working properly and all logs were going to standard, not error when defined.

While I was in there, I updated the deps, adjusted the new chalk to work,

I suggest moving from tslint to eslint as the former is depreciated.

Proper fix gated by webpack/webpack#12869
Added unit tests
Found issue with Logger not using `stderrConsole` when option was set to do so.
Proper fix gated by webpack/webpack#12869
Added unit tests
Found issue with Logger not using `stderrConsole` when option was set to do so.
@Brian-McBride
Copy link
Contributor Author

Update:
I've added the types we really need exposed as a webpack PR.

webpack/webpack#12875

If it is still open, maybe leave a note there to get it more attention?

@jonaskello
Copy link
Member

Thanks for the PR! :-)

I noticed there are some formatting changes in this PR like changing " to '. This should be handled by prettier and the husky pre-commit hook so everything should be formatted with prettier. I'm not sure why this is not working as intended. Does prettier run when you commit?

@Brian-McBride
Copy link
Contributor Author

Brian-McBride commented Mar 12, 2021

Husky is there, but I went ahead and manually ran prettier and pushed back up.
I bet it is the IDE. I'm not sure webstorm runs husky hooks on commits unless you set it up that way.
Webstorm is great for tracing down all these type changes though. It follows code better than vscode when you need to investigate.

@jonaskello jonaskello merged commit 3e875f6 into dividab:master Mar 12, 2021
@jonaskello
Copy link
Member

Released in 3.4.0.

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.

None yet

2 participants