refactors dependencies to use ESM internally, allows tracing dependencies, and allows contributors to not hold a mental model of the entire program.
I'm an interested contributor to some open issues, but it's quite hard for me to navigate the codebase without being able to glance at the dependency tree. This could possibly allow for future TypeScript/etc.. usage.
I also noticed a few bugs and other typos while writing this (to find the unresolved imports, I used type-checking on the JS files, which showed a few possible errors).
There are also three circular dependencies between Parser, Quiver, and UI, which should be refactored later. However, I wanted to keep this PR specifically for switching to ESM.
Also note that ESM is strict by default, so I have removed those statements.
I think the reason I didn't do this originally was that it was slightly more of a pain to run a local web server than to open a local file directly, but you're right that this improves things. Thanks for the PR!
refactors dependencies to use ESM internally, allows tracing dependencies, and allows contributors to not hold a mental model of the entire program.
I'm an interested contributor to some open issues, but it's quite hard for me to navigate the codebase without being able to glance at the dependency tree. This could possibly allow for future TypeScript/etc.. usage.
I also noticed a few bugs and other typos while writing this (to find the unresolved imports, I used type-checking on the JS files, which showed a few possible errors).
There are also three circular dependencies between Parser, Quiver, and UI, which should be refactored later. However, I wanted to keep this PR specifically for switching to ESM.
Also note that ESM is strict by default, so I have removed those statements.