refactor: componentize changes
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
Setting this to draft while https://github.com/bytecodealliance/ComponentizeJS/pull/202 lands -- the functionality in here will have to change quite a bit.
(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.)
Definitely can do -- I'll split this into more commits so it's a bit easier
Hey @tschneidereit so it turned into 8 commits :sweat_smile: -- hopefully these changes are easier to follow.
Putting this in draft until it's rebased and ready to be looked at again to avoid taking attention from other PRs!
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.