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

package.json should separate dependencies to peerDependencies #126

Open
Aghassi opened this issue Apr 25, 2024 · 0 comments
Open

package.json should separate dependencies to peerDependencies #126

Aghassi opened this issue Apr 25, 2024 · 0 comments

Comments

@Aghassi
Copy link
Contributor

Aghassi commented Apr 25, 2024

"dependencies": {
"@opentelemetry/api": "~1.8.0",
"@opentelemetry/exporter-trace-otlp-http": "~0.50.0",
"@opentelemetry/instrumentation": "~0.50.0",
"@opentelemetry/opentelemetry-browser-detector": "~0.50.0",
"@opentelemetry/resources": "~1.23.0",
"@opentelemetry/sdk-trace-base": "~1.23.0",
"@opentelemetry/sdk-trace-web": "~1.23.0",
"@opentelemetry/semantic-conventions": "~1.23.0",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"axios": "^1.6.7",
"eslint-config-prettier": "^9.1.0",
"prettier": "^3.2.4",
"web-vitals": "^3.5.2"

There a number of @opentelemetry packages in the package.json of this package. However, they are called in the code that is unbundled. If they are expected to be provided by the consumer, then these should be specified as peerDependencies. https://pnpm.io/how-peers-are-resolved

This prevents version duplication as well as forces the end user to specify what version they are on.

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

No branches or pull requests

2 participants