-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(profiling): Conditionally shim cjs globals #13267
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
Conversation
|
96bdbdf
to
f1f9bd4
Compare
@AbhiPrasad mind taking another look, I added the check to run experimental modules and bumped to v22 of nodejs for profiling e2e tests |
@@ -1168,7 +1168,7 @@ jobs: | |||
- name: Set up Node | |||
uses: actions/setup-node@v4 | |||
with: | |||
node-version-file: 'dev-packages/e2e-tests/package.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little hesitant about this because it means that CI runs differently than local - but I guess we can try this out, cc @mydea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it is OK - this is just for the e2e tests, we do not test if this works in node 18 then, not sure how important this is to us.
Thanks for the reviews @AbhiPrasad @mydea! |
The shims should only be applied if the globals are not present, else it results in double decl and a runtime error. The profiling SDK should gracefully handle env where the shims are already provided.
I couldn't find a way to modify the shim as it is hardcoded in the plugin we are using so I went with the replace plugin approach and a placeholder value #poormansmacros.
Fixes #13259