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

chore: peer depend on API #2074

Merged
merged 3 commits into from
Apr 5, 2021
Merged

chore: peer depend on API #2074

merged 3 commits into from
Apr 5, 2021

Conversation

dyladan
Copy link
Member

@dyladan dyladan commented Apr 5, 2021

Depending on the API as a peer dependency in all sdk/instrumention packages leaves the end-user to install a compatible version of the API. In versions of NPM >= 7, this is done automatically. If the user has installed a set of packages which makes this impossible, they will be warned by NPM at install time.

@codecov
Copy link

codecov bot commented Apr 5, 2021

Codecov Report

Merging #2074 (a88514d) into main (02175df) will decrease coverage by 1.42%.
The diff coverage is n/a.

❗ Current head a88514d differs from pull request most recent head c9b74a8. Consider uploading reports for the commit c9b74a8 to get more accurate results

@@            Coverage Diff             @@
##             main    #2074      +/-   ##
==========================================
- Coverage   93.05%   91.63%   -1.43%     
==========================================
  Files         154      137      -17     
  Lines        5975     5032     -943     
  Branches     1246     1044     -202     
==========================================
- Hits         5560     4611     -949     
- Misses        415      421       +6     
Impacted Files Coverage Δ
...resource-detector-gcp/src/detectors/GcpDetector.ts 12.76% <0.00%> (-82.98%) ⬇️
...async-hooks/src/AsyncLocalStorageContextManager.ts 23.52% <0.00%> (-76.48%) ⬇️
...emetry-core/src/platform/node/RandomIdGenerator.ts 87.50% <0.00%> (-6.25%) ⬇️
...kages/opentelemetry-node/src/NodeTracerProvider.ts 94.11% <0.00%> (-5.89%) ⬇️
...sync-hooks/src/AbstractAsyncHooksContextManager.ts 95.31% <0.00%> (-1.57%) ⬇️
...ntelemetry-web/src/enums/PerformanceTimingNames.ts
.../opentelemetry-exporter-collector/src/transform.ts
packages/opentelemetry-web/src/utils.ts
...ry-context-zone-peer-dep/src/ZoneContextManager.ts
...s/opentelemetry-instrumentation-fetch/src/fetch.ts
... and 12 more

Copy link
Member

@Flarna Flarna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add some test which verifies that api is not added as dependency per accident somewhere in future?

@vmarchaud
Copy link
Member

Should we add some test which verifies that api is not added as dependency per accident somewhere in future?

I believe that would be very helpful, as a step within the CI that lerna exec into each package and verify api are within peerDependencies

@dyladan
Copy link
Member Author

dyladan commented Apr 5, 2021

Sure I can probably mock something like that up in the scripts folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants