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

chore: Update planx-core to ESM module #601

Merged
merged 10 commits into from
Jan 7, 2025
Merged

chore: Update planx-core to ESM module #601

merged 10 commits into from
Jan 7, 2025

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Dec 24, 2024

What does this PR do?

  • Converts this project from CommonJS to ESM
  • Associated changes -
    • Convert from jest to vitest
    • Convert from ts-node to tsx
    • Convert from lodash to lodash-es
    • Add type assertions to JSON imports
    • Fix imports to use .js in filenames

Some of these changes were a bit haphazard - one following the other as I hit issues. If anything is too unclear / too big, please shout and I'll work on splitting this up.

Why?

  • Required for feat: Import schema from library #600 (import ESM schema lib)
  • Similarly, this might be needed if we decide to publish this repo as a package
  • ESM is the way things are headed - worth making the change and not publishing in CommonJS!

@DafyddLlyr DafyddLlyr marked this pull request as draft January 3, 2025 16:06
@DafyddLlyr DafyddLlyr requested a review from a team January 3, 2025 16:30
@DafyddLlyr DafyddLlyr marked this pull request as ready for review January 3, 2025 16:31
Copy link
Member

@jessicamcinchak jessicamcinchak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this !! Dense changes indeed but all looks good here - and corresponding planx-new PR/pizza seems healthy 🎉

Copy link
Contributor

@freemvmt freemvmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Brings up happy mems of doing the same for the API 😅

My only question is whether there is some way to simplify the tsconfig setup? e.g. is one an extension of another. and can be represented as such? could the base tsconfig.json replace any of the particular tsconfig.x.json files? haven't looked at it closely, but just a thought!

@DafyddLlyr DafyddLlyr merged commit f8cdf5b into main Jan 7, 2025
3 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/node-next branch January 7, 2025 18:05
jessicamcinchak added a commit that referenced this pull request Jan 8, 2025
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.

3 participants