FormidableLabs / inspectpack

An inspection tool for Webpack frontend JavaScript bundles.
MIT License
592 stars 20 forks source link

BUG: Handle null chunks in webpack stats object. #111

Closed ryan-roemer closed 5 years ago

ryan-roemer commented 5 years ago

@westbrook-asapp - If you have a moment, want to try this one out? (No worries if not, I'm pretty sure this fixes the issue as your stats file now is parseable with this change. Thanks again so much for generating it -- it dramatically reduced the amount of time needed to fix this!)

/cc @parkerziegler

codecov[bot] commented 5 years ago

Codecov Report

Merging #111 into master will increase coverage by 0.28%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #111      +/-   ##
==========================================
+ Coverage   90.56%   90.84%   +0.28%     
==========================================
  Files          15       13       -2     
  Lines         763      732      -31     
  Branches      122      122              
==========================================
- Hits          691      665      -26     
+ Misses         41       36       -5     
  Partials       31       31
Impacted Files Coverage Δ
src/lib/actions/base.ts 93.33% <100%> (+0.12%) :arrow_up:
src/lib/interfaces/webpack-stats.ts 100% <100%> (ø) :arrow_up:
src/lib/util/files.ts 86.66% <0%> (-4.64%) :arrow_down:
src/lib/util/strings.ts 100% <0%> (ø) :arrow_up:
src/lib/util/promise.ts 100% <0%> (ø) :arrow_up:
src/lib/index.ts
src/lib/interfaces/modules.ts
src/lib/actions.ts 100% <0%> (+33.33%) :arrow_up:

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 ebaad26...fa6ea38. Read the comment docs.

westbrook-asapp commented 5 years ago

I'd be happy to test this out. What's a good way to push this into the workflow? I checked for an @next but other than that, being it's a dependency of a dependency, I'm not 100% sure the steps to test this.

ryan-roemer commented 5 years ago

@westbrook-asapp -- Good point. I think I'll just release tomorrow and we can test it then 😛

(You could check it out, build the TS to JS, and manually drop into node_modules alone -- no other deps for inspectpack have changed -- but no need if a hassle)

parkerziegler commented 5 years ago

@ryan-roemer if you want to release a new version of inspectpack with this fix I'd be happy to push out an alpha version of 3.0.2 for webpack-dashboard to confirm it does indeed fix things for @westbrook-asapp. Probably wouldn't get to it until later tonight // tomorrow morning, but definitely doable!

ryan-roemer commented 5 years ago

I yolo-ed it. Released in inspectpack@4.2.1

parkerziegler commented 5 years ago

Nice! @westbrook-asapp, I'll get a patch version of webpack-dashboard out early tomorrow and ping here so you can install it and test. Thanks a ton @ryan-roemer 💯!

westbrook-asapp commented 5 years ago

I can report that early signs here are very positive via a manual copy/paste of the inspectpack code @4.2.1. Look forward to the real thing in the morning. Thanks for you hard work on this, gentlemen.

parkerziegler commented 5 years ago

@westbrook-asapp v3.0.2 of webpack-dashboard was just published. Let us know if it fixes your issue! Thanks for your help on this.

westbrook-asapp commented 5 years ago

This is working great on my end, thank you all!