Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use esm #250

Merged
merged 1 commit into from
Sep 29, 2024
Merged

refactor: use esm #250

merged 1 commit into from
Sep 29, 2024

Conversation

LeoDog896
Copy link
Contributor

@LeoDog896 LeoDog896 commented Sep 25, 2024

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.

@varkor varkor merged commit 4dd4fee into varkor:master Sep 29, 2024
@varkor
Copy link
Owner

varkor commented Sep 29, 2024

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!

@LeoDog896 LeoDog896 mentioned this pull request Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants