-
Notifications
You must be signed in to change notification settings - Fork 597
Open
Description
I'm happy to do a PR for this but wanted to check first that it would be accepted since pinning is often done for a reason.
Having the type package pinned makes it harder for us to do updates downstream and makes it very easy to cause type errors due to the package declaring a class in its global namespace meaning typescript errors if you have different versions:
❯ npm ls @types/aws-lambda
[email protected] /home/person/workspace/my-app
├─┬ @sentry/[email protected]
│ ├─┬ @opentelemetry/[email protected]
│ │ └── @types/[email protected]
│ └── @types/[email protected] deduped
└── @types/[email protected]
❯ nrun typecheck
> nrun.js typecheck
> tsc -p . --noEmit
node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/@types/aws-lambda/handler.d.ts:219:15 - error TS2300: Duplicate identifier 'HttpResponseStream'.
219 class HttpResponseStream extends Writable {
~~~~~~~~~~~~~~~~~~
node_modules/@types/aws-lambda/handler.d.ts:220:15
220 class HttpResponseStream extends Writable {
~~~~~~~~~~~~~~~~~~
'HttpResponseStream' was also declared here.
node_modules/@types/aws-lambda/handler.d.ts:220:15 - error TS2300: Duplicate identifier 'HttpResponseStream'.
220 class HttpResponseStream extends Writable {
~~~~~~~~~~~~~~~~~~
node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/@types/aws-lambda/handler.d.ts:219:15
219 class HttpResponseStream extends Writable {
~~~~~~~~~~~~~~~~~~
'HttpResponseStream' was also declared here.
Found 2 errors in 2 files.
Errors Files
1 node_modules/@opentelemetry/instrumentation-aws-lambda/node_modules/@types/aws-lambda/handler.d.ts:219
1 node_modules/@types/aws-lambda/handler.d.ts:220
If the dependency constraint was relaxed to allow patch versions, package managers would be able to deduplicate the version so that this doesn't happen, and meaning consumers would not be dependent on open-telemetry actively ensuring their version constraint is on the latest version
arendvosmaer
Metadata
Metadata
Assignees
Labels
No labels