timotheeg / nestrischamps

A web-based OCR and restreamer system for NES Classic Tetris players
MIT License
45 stars 11 forks source link

Upgrade dependencies + migrate to ESM (FE + BE) #106

Closed timotheeg closed 2 years ago

timotheeg commented 2 years ago

Decided to upgrade to all dependencies, and the latest got is now ESM only so I figured I'd take the plunge.

ESM has been natively supported on chrome and firefox for a while, so there's no difference in browser support.

My code was already mostly modularized, but it was putting stuff all over the global scope, so it took some effort to move everything to ESM properly. There will likely still be breakages in there that I will fix as I go.

I would have liked to move just the frontend, but because the module BinaryFrame is shared with frontend and backend, I decided to big bang update everything.

Because most of my module files were using functions for provate scope, relying on modules instead meant changing the indentations. The changeset is mostly whitespace and so it helps to read the PR with whitespace ignored.

timotheeg commented 2 years ago

I did a bunch of tests locally and things seem to be OK, I will merge this and release when nobody is online.

All commits are gross, so I'm going to squash merge for once :)