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

feat(node): Make getModuleFromFilename compatible with ESM #10061

Merged

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jan 4, 2024

Ref #10046

This removes usage of require.main.filename to bring better ESM compatability.

An extra bonus in that now createGetModuleFromFilename is ESM compatible, we can use it in the Anr worker when appRootPath is supplied (ie. Electron only for now).

⚠️ Fingerprinting

This may change module fingerprinting for ESM since previously when require.main.filename was not available, process.cwd() was used.

@timfish timfish marked this pull request as ready for review January 5, 2024 11:22
@AbhiPrasad AbhiPrasad merged commit eff57fa into getsentry:develop Jan 9, 2024
55 checks passed
@timfish timfish deleted the feat/getModuleFromFilename-esm branch January 10, 2024 16:11
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.

None yet

2 participants