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

fix(profiling): Don't put require, __filename and __dirname on global object #14470

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented Nov 25, 2024

Fixes our CJS detection by no longer storing a reference to require on globalThis.

Fixes #14525, #13662

@JonasBa JonasBa force-pushed the jb/profiling/local-require branch from fc0e866 to 531e99b Compare November 25, 2024 17:56
@JonasBa JonasBa force-pushed the jb/profiling/local-require branch from 531e99b to 7b07ab9 Compare November 25, 2024 20:10
@JonasBa JonasBa force-pushed the jb/profiling/local-require branch 2 times, most recently from f2ef50c to 5f6dba9 Compare November 30, 2024 14:20
@JonasBa JonasBa force-pushed the jb/profiling/local-require branch from 5f6dba9 to 98e4eec Compare November 30, 2024 14:51
@JonasBa JonasBa force-pushed the jb/profiling/local-require branch 2 times, most recently from a45f224 to 32633bf Compare December 2, 2024 21:55
@JonasBa JonasBa force-pushed the jb/profiling/local-require branch from 32633bf to de1a11f Compare December 2, 2024 21:56
@JonasBa JonasBa marked this pull request as ready for review December 3, 2024 18:23
@lforst lforst self-assigned this Dec 12, 2024
@lforst lforst changed the title ref(profiling) test local require ref(profiling): Test local require Dec 12, 2024
@lforst lforst changed the title ref(profiling): Test local require fix(profiling): Test local require Dec 12, 2024
@lforst lforst force-pushed the jb/profiling/local-require branch from 1eefeac to 5aa22a2 Compare December 12, 2024 12:12
@lforst lforst changed the title fix(profiling): Test local require fix(profiling): Don't put require, __filename and __dirname on global object Dec 12, 2024
@lforst lforst force-pushed the jb/profiling/local-require branch from 5f9438b to 4d46401 Compare December 12, 2024 13:47
@lforst lforst force-pushed the jb/profiling/local-require branch from 4d46401 to 31653f3 Compare December 12, 2024 13:49
Copy link

codecov bot commented Dec 12, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
665 1 664 291
View the top 1 failed tests by shortest run time
instrumentation.test.ts Sends correct context when instrumentation was set up incorrectly
Stack Traces | 0.131s run time
instrumentation.test.ts:4:5 Sends correct context when instrumentation was set up incorrectly

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@lforst
Copy link
Member

lforst commented Dec 13, 2024

I am gonna skip the test for now. I am not even sure what exactly we are testing here.

@JonasBa
Copy link
Member Author

JonasBa commented Dec 16, 2024

@lforst I think it's fine to skip the test. The intention was to run a mjs script that uses profiling and check that globalThis.require was not available.

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.

[express] express auto instrumentation no longer works if you enable profiling
2 participants