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

Work around issue with Node 22 and Jiti #15421

Merged
merged 1 commit into from
Dec 17, 2024
Merged

Conversation

thecrypticace
Copy link
Contributor

Fixes #15374

If we always use Jiti the problem should, in theory, go away (I hope). It does mean that loading configs is slower than it would be if they're written in CJS but 🤷‍♂️

Wanna get this running with the integration tests to see if anything breaks.

@thecrypticace thecrypticace requested a review from a team as a code owner December 17, 2024 13:54
@thecrypticace thecrypticace changed the base branch from next to main December 17, 2024 13:54
@thecrypticace thecrypticace reopened this Dec 17, 2024
Copy link
Member

@RobinMalfait RobinMalfait left a comment

Choose a reason for hiding this comment

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

I think this is a good quickfix solution

@thecrypticace thecrypticace merged commit 0a836f7 into main Dec 17, 2024
13 checks passed
@thecrypticace thecrypticace deleted the fix/node-22-workaround branch December 17, 2024 18:43
// Always use jiti for now. There is a a bug that occurs in Node v22.12+
// where imported files return invalid results
return lazyJiti()(path)

// Always use jiti for ESM or TS files
if (
Copy link

Choose a reason for hiding this comment

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

Dead code after the new line.

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.

Plugins no longer load when using Node 22.12.0 and 23.*
3 participants