Skip to content

🏷️ Convert to ES Modules and NodeNext #313

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

Closed
wants to merge 4 commits into from
Closed

🏷️ Convert to ES Modules and NodeNext #313

wants to merge 4 commits into from

Conversation

NatoBoram
Copy link

@NatoBoram NatoBoram commented May 22, 2024

Motivation

https://www.typescriptlang.org/tsconfig/#verbatimModuleSyntax

When using verbatimModuleSyntax in a consuming app, compilation fails because Jira.js is a CommonJS library in TypeScript. This can be fixed with disableSourceOfProjectReferenceRedirect, but it's a bit of a shame to lose access to the source code when you have it right there. A better option would be to migrate the library to modern JavaScript standards and improve performance and compatibility along the way.

Changes

@MrRefactoring
Copy link
Owner

Hey @NatoBoram!

I really appreciate your PR; migrating to ESM is important. I also noticed that you plan to transition from ava to vitest, which is something I also wanted to do but haven't found the time for.

A couple of words about the migration: can we use a bundling tool like Rollup to compile the existing code to ESM while also keeping CommonJS for users who are not using modules?

@NatoBoram
Copy link
Author

Thanks! I'm not familiar with Rollup, but I'll see what I can do.

A good exercice in regex :)
@NatoBoram
Copy link
Author

NatoBoram commented May 24, 2024

Got approval from my employer, I'm moving this PR to their repos. Sorry for the duplicate.

@NatoBoram NatoBoram closed this May 24, 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