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

fix: remove unneeded type exports in mongodb instrumentation #1194

Merged
merged 4 commits into from
Sep 22, 2022

Conversation

Flarna
Copy link
Member

@Flarna Flarna commented Sep 21, 2022

Which problem is this PR solving?

fixes: #1190

Short description of the changes

Avoid leaking types from mongodb instrumentation by splitting types.ts into a public and internal file.
Added type Document to avoid that lib dom needs to be added in build.

change typescript config to exclude lib dom on default and add it only where needed (web plugins and AWS SDK).

Checklist

  • Ran npm run test-all-versions for the edited package(s) on the latest commit if applicable.

Avoid leaking types from mongodb instrumentation by splitting types.ts into a public
and internal file.
Added type Document to avoid that lib dom needs to be added in build.
@codecov
Copy link

codecov bot commented Sep 21, 2022

Codecov Report

Merging #1194 (e8a7679) into main (b35277b) will decrease coverage by 5.27%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1194      +/-   ##
==========================================
- Coverage   96.08%   90.80%   -5.28%     
==========================================
  Files          14       17       +3     
  Lines         893     1185     +292     
  Branches      191      266      +75     
==========================================
+ Hits          858     1076     +218     
- Misses         35      109      +74     
Impacted Files Coverage Δ
...try-instrumentation-mongodb/src/instrumentation.ts 68.93% <ø> (ø)
...etry-instrumentation-mongodb/src/internal-types.ts 100.00% <100.00%> (ø)
...tapackages/auto-instrumentations-node/src/utils.ts 98.03% <0.00%> (ø)

@github-actions github-actions bot requested a review from osherv September 21, 2022 21:28
@Flarna
Copy link
Member Author

Flarna commented Sep 21, 2022

reverted the commit to remove lib dom from build. This worked fine in my local environment but in hoisting is done different so lib dom is needed everywhere.

@Flarna Flarna changed the title fix: remove unneded type exports in mongodb instrumentation fix: remove unneeded type exports in mongodb instrumentation Sep 22, 2022
@vmarchaud vmarchaud merged commit 6920a55 into open-telemetry:main Sep 22, 2022
@dyladan dyladan mentioned this pull request Sep 22, 2022
@Flarna Flarna deleted the mongodb-types branch September 22, 2022 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(instrumentation-mongodb) - Cannot find name 'Document'.
8 participants