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 package.json dependency issues #847

Merged
merged 2 commits into from
Sep 24, 2021

Conversation

darthtrevino
Copy link
Member

@darthtrevino darthtrevino commented Sep 23, 2021

When using Yarn v2, packages that are explicitly imported within a package scope need to be marked as either a direct dependency or a peer. This prevents tacit module resolution from creeping into dependencies.

1: Move @opentelemetry/semantic-conventions to dependencies.

Justification: it's directly imported in the following locations:

2: Add @opentelemetry/core to dependencies

Justification it's directly imported in the following location:

3: Mark applicationinsights-native-metrics as an optional peer dependency.

Justification: it's conditionally imported in the following location:

const NativeMetricsEmitters = require("applicationinsights-native-metrics");

This can be resolved on the client-side, but clients have to monkey-patch in proper dependencies: https://github.com/microsoft/community-organization-operations-suite/blob/b04c9fe9bec52aba50f50ac68a90e398ab620a56/.yarnrc.yml#L45-L48

Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution

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.

None yet

2 participants