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

Remove deprecated package @types/mongodb from mongodb instrumentation #1070

Closed
mic-max opened this issue Jun 24, 2022 · 5 comments
Closed

Remove deprecated package @types/mongodb from mongodb instrumentation #1070

mic-max opened this issue Jun 24, 2022 · 5 comments
Labels
bug Something isn't working stale

Comments

@mic-max
Copy link

mic-max commented Jun 24, 2022

The dependency is marked as deprecated here

It says

mongodb provides its own types. @types/mongodb is no longer needed.

This is the package.json file listing the dependency

I noticed this error when performing an npm install on a project that includes this package

Note: I tried simply deleting the line from the package.json but got this error when trying to run npm run compile from \plugins\node\opentelemetry-instrumentation-mongodb

image

The top error is the only one from an src file, all other are from a test, which I believe is based on the npm version (which would need to be updated and create a new release as part of this fix)

@mic-max mic-max added the bug Something isn't working label Jun 24, 2022
@Flarna
Copy link
Member

Flarna commented Jun 24, 2022

The problem is that current version of the instrumentation requires the types. Removing the dependency to @types/mongodb would require to add one to mongodb which would be quite bad.

Work is ongoing to remove the need to include types dependencies in instrumentations (e.g. #1036, #1066) but it will take a while until this is fixed. As usual help is welcome!

@github-actions
Copy link
Contributor

This issue 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.

@github-actions github-actions bot added the stale label Aug 29, 2022
@osherv
Copy link
Member

osherv commented Sep 7, 2022

@mic-max @Flarna Hey :) According to this PR: #1141
The dependencies of @types/mongo are now devDependencies only.
I think it met your requirements, right?

@Flarna
Copy link
Member

Flarna commented Sep 7, 2022

@osherv yes, looks good.

@mic-max
Copy link
Author

mic-max commented Sep 8, 2022

@osherv Yes, I believe that does it! Now projects that use this module will no longer see this message when installing it as it will not fetch devDependencies

@mic-max mic-max closed this as completed Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants