refactor(instrumentation-http): fix eslint warnings
Which problem is this PR solving?
Fixes the following eslint warnings:
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/src/http.ts
236:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
251:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
252:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
283:41 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
298:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
299:31 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
508:17 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
931:11 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1032:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1043:13 warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion
1051:15 warning Don't use `Function` as a type @typescript-eslint/ban-types
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/functionals/http-package.test.ts
86:27 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/functionals/https-package.test.ts
86:27 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/functionals/utils.test.ts
81:25 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
156:43 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
161:43 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
213:35 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/integrations/http-enable.test.ts
300:9 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
/home/runner/work/opentelemetry-js/opentelemetry-js/experimental/packages/opentelemetry-instrumentation-http/test/integrations/https-enable.test.ts
274:9 warning 'url.parse' was deprecated since v11.0.0. Use 'url.URL' constructor instead node/no-deprecated-api
Ref #5365
Short description of the changes
There are a fair bit of changes here, but splitting into multiple PRs would just create a lot of conflicts. So instead, each commit is one unit of change with a detailed description in the commit message.
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [x] unit tests
- [x] eslint
- [x] TypeScript
Checklist:
- [x] Followed the style guidelines of this project
- [ ] Unit tests have been added
- [ ] Documentation has been updated
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 94.64%. Comparing base (29d0da5) to head (9f63cf8).
:warning: Report is 261 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5394 +/- ##
=======================================
Coverage 94.64% 94.64%
=======================================
Files 318 318
Lines 8033 8033
Branches 1688 1688
=======================================
Hits 7603 7603
Misses 430 430
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.
Hi @chancancode
could you please resolve the conflict? Also the changelog workflow is failing so you may need to add an entry there.
Thanks!
Closing this one as it has a few conflicts. If anyone's interested in getting these changes in, please feel free to open a new PR. Thanks! :)