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

Internal: Use import.meta.resolve instead of require.resolve. #17672

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

filipsobol
Copy link
Member

@filipsobol filipsobol commented Dec 19, 2024

Suggested merge commit message (convention)

Internal: Use import.meta.resolve instead of require.resolve. Fixes #17671.


We've added the exports field to the package.json files with types and import fields, but no require because our packages are ESM-only. This is the reason for the require.resolve call fails.

@filipsobol filipsobol requested a review from pomek December 19, 2024 09:11
@Witoso
Copy link
Member

Witoso commented Dec 19, 2024

If this blocks us for good, we can bump it as it is our internal dependency. (But I understand it needs to be tested across all things)

@filipsobol
Copy link
Member Author

According to Node.js docs, it's available in Node 18 too. I use Node 18.20 and it worked.

https://nodejs.org/docs/latest-v18.x/api/esm.html#importmetaresolvespecifier

@filipsobol filipsobol merged commit 4fcaeea into master Dec 19, 2024
10 checks passed
@filipsobol filipsobol deleted the fix-core-resolve branch December 19, 2024 09:44
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.

Fix nightly docs
3 participants