esbuild: ensure aws-sdk can be built#3591
Conversation
Overall package sizeSelf size: 5.22 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report
@@ Coverage Diff @@
## master #3591 +/- ##
=======================================
Coverage 84.77% 84.77%
=======================================
Files 219 219
Lines 8961 8961
Branches 33 33
=======================================
Hits 7597 7597
Misses 1364 1364 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
BenchmarksBenchmark execution time: 2023-09-26 00:29:34 Comparing candidate commit bf6af96 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 384 metrics, 8 unstable metrics. |
…njecting instrumentation code directly with file code
e84b742 to
e62901d
Compare
| // Module code from ${args.path} | ||
| (function() { | ||
| ${fileCode} | ||
| })(...arguments); |
There was a problem hiding this comment.
For future reviewers: This is for a weird case where a user can access arguments from the root of a commonJS file, which contains [exports, require, module, __filename, __dirname]. Surely nobody would use arguments directly but we've certainly seen weirder things happen.
|
I suspect we may have an issue when a third party module begins with a |
|
Actually, the shebang shouldn't really matter for modules. It's beneficial for application code but surely it's super rare that a module would use it. I won't block the PR for it. |
* fix esbuild aws-sdk issue by forgoing use of proxy file in favor of injecting instrumentation code directly into the module code --------- Co-authored-by: Ayan Khan <[email protected]>
* fix esbuild aws-sdk issue by forgoing use of proxy file in favor of injecting instrumentation code directly into the module code --------- Co-authored-by: Ayan Khan <[email protected]>
* fix esbuild aws-sdk issue by forgoing use of proxy file in favor of injecting instrumentation code directly into the module code --------- Co-authored-by: Ayan Khan <[email protected]>
* fix esbuild aws-sdk issue by forgoing use of proxy file in favor of injecting instrumentation code directly into the module code --------- Co-authored-by: Ayan Khan <[email protected]>
| "devDependencies": { | ||
| "@types/node": ">=16", | ||
| "autocannon": "^4.5.2", | ||
| "aws-sdk": "^2.1446.0", |
There was a problem hiding this comment.
Any way to not need this? Can't we use what gets installed in the versions folder somehow? If we start depending on all our integrations this will become way too bloated.
What does this PR do?
datadognamespace to wrap a moduleMotivation
Plugin Checklist