ComponentizeJS icon indicating copy to clipboard operation
ComponentizeJS copied to clipboard

refactor: componentize changes

Open vados-cosmonic opened this issue 10 months ago • 6 comments

This refactoring makes a few changes to the code to make componentize-js a bit easier to debug:

  • enable passing debug options all together
  • enable passing where to output debug output
  • split out function for easier reading

vados-cosmonic avatar Mar 19 '25 10:03 vados-cosmonic

Setting this to draft while https://github.com/bytecodealliance/ComponentizeJS/pull/202 lands -- the functionality in here will have to change quite a bit.

vados-cosmonic avatar Mar 19 '25 15:03 vados-cosmonic

(I appreciate that my last big PR to this repo did a lot of the same. I tried minimizing code movement in that, but in hindsight should nevertheless have split the movement that I did apply off into its own commit.)

tschneidereit avatar Mar 21 '25 15:03 tschneidereit

Definitely can do -- I'll split this into more commits so it's a bit easier

vados-cosmonic avatar Mar 22 '25 01:03 vados-cosmonic

Hey @tschneidereit so it turned into 8 commits :sweat_smile: -- hopefully these changes are easier to follow.

vados-cosmonic avatar Mar 27 '25 18:03 vados-cosmonic

Putting this in draft until it's rebased and ready to be looked at again to avoid taking attention from other PRs!

vados-cosmonic avatar May 01 '25 00:05 vados-cosmonic

OK, tests are passing so I'm taking this out of draft -- it's back into one commit, which I think isn't too difficult to review now, given that some changes have already made it into main, the diff is much more tame.

This PR does two things:

  • Expands the feature-set and granularity of "debug" options to componentize-js
  • refactors the code to be a bit more readable.

vados-cosmonic avatar May 19 '25 14:05 vados-cosmonic