Skip to content

chore(instrumentation-express, instrumentation-fastify): drop unused devDep @types/express #2962

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

trentm
Copy link
Contributor

@trentm trentm commented Jul 31, 2025

For some background, in #1804 the @types/express dep was removed from instr-express's dependencies after some long discussion. At the time it was moved to a devDep.

However, @types/express isn't used at all in these packages. Can we drop them?
Or is there some slight downside for possible IDE completion when developing express examples or similar in this repo by removing these?

Note that I only bothered looking at these because of this bot PR to update these deps: #2925 (comment)

@trentm trentm self-assigned this Jul 31, 2025
@trentm trentm requested a review from a team as a code owner July 31, 2025 23:42
@github-actions github-actions bot added pkg:instrumentation-express pkg:instrumentation-fastify pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found. labels Jul 31, 2025
Copy link

codecov bot commented Jul 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.79%. Comparing base (9d90781) to head (a28636c).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2962   +/-   ##
=======================================
  Coverage   89.79%   89.79%           
=======================================
  Files         188      188           
  Lines        9222     9222           
  Branches     1900     1900           
=======================================
  Hits         8281     8281           
  Misses        941      941           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Aug 1, 2025

This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature.
Are you familiar with this package? Consider becoming a component owner.

@david-luna
Copy link
Contributor

In @opentelemetry/instrumentation-express the types are used internally

So the compilation step should fail if the types are not present. But if we list where the dependency is

npm ls @types/express
[email protected] /Users/david/Documents/repos/otel/opentelemetry-js-contrib
├─┬ @opentelemetry/[email protected] -> ./packages/instrumentation-express
│ └── @types/[email protected]
├─┬ @opentelemetry/[email protected] -> ./packages/instrumentation-fastify
│ └── @types/[email protected] deduped
└─┬ @opentelemetry/[email protected] -> ./packages/instrumentation-koa
  └─┬ @types/[email protected]
    └─┬ @types/[email protected]
      └── @types/[email protected] deduped

We can see that we get the express types as a dependency from @types/koa so the editor and the compiler can see them because they are installed at the root level. That would explain why compilation succeeds.

IMHO removing @types/express from @opentelemetry/instrumentation-fastify is okay but we should keep them for @opentelemetry/instrumentation-express. @opentelemetry/instrumentation-koa is unlikely to change but there is the possibility @types/koa gets an update that removes the dependency.

@david-luna david-luna added the has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions label Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has:sponsor This package or feature has a sponsor that has volunteered to review PRs and respond to questions pkg:instrumentation-express pkg:instrumentation-fastify pkg-status:unmaintained:autoclose-scheduled pkg-status:unmaintained This package is unmaintained. Only bugfixes may be acceped until a new owner has been found.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants