TurboWarp / packager

Converts Scratch projects into HTML files, zip archives, or executable programs for Windows, macOS, and Linux.
https://packager.turbowarp.org/
Mozilla Public License 2.0
242 stars 153 forks source link

Fix packaging very large projects as HTML files in Chrome #862

Closed GarboMuffin closed 6 months ago

GarboMuffin commented 6 months ago

Actually fixes https://github.com/TurboWarp/packager/issues/528

https://github.com/TurboWarp/packager/pull/861 fixed running large projects in Chrome, but packaging still used string concatenation so it remained broken. Now the concatenation part is done using TextEncoder & Uint8Arrays and a template tag function to keep it readable.

This time I have actually tested it with a 1.0GB sb3.

Breaking Node API change: The data property returned by Packager#package() is now always a Uint8Array instead of sometimes string and sometimes ArrayBuffer.