Closed adroitwhiz closed 5 months ago
PS: While any (existing) code style issues can be noted, I don't think they should be blockers here. I see this PR as a prerequisite to other changes (including fixing those issues), and fixing #100 will mean re-coding a substantial portion of this project regardless, which will likely bulldoze over any code style issues.
Since we've gone through a thorough review of this earlier, I'm calling this good to merge.
There are loads of force pushes above on my part - sorry about that! These were to fix unaddressed lint and snapshot issues in-place as they cropped up, rather than later commits. The history should be good here now, it just took a couple tries to get right. ^^;
Resolves #92 Resolves #97
This PR updates TypeScript to the latest release (4.9), updates Prettier to the next major version, and enables strict mode.
Some externally-visible changes have been made to the codebase:
null
block inputs are skipped completely for nowSUBSTACK
will be eithernull
or completely absent in the .sb3's block inputs, depending on whether a stack was ever dragged into the C-block. We previously used to treat the two cases differently, treating the input as{type: "string", value: null}
in the former case (flat-out wrong), and leaving the input out in the latter case. Now, we always leave the input out. It'll be easier to fix this properly once we have a better way to enumerate a block's intended inputs-- see #93.{type: 'boolean', value: false}
, which matches what they are when exported from Scratch.I haven't touched the Leopard serialization code yet, since #90 touches it a lot. I'll go over it and un-draft this PR once it's merged.