From 651b4f8bdc18110aeafa22faa1fe2e0a49dbff91 Mon Sep 17 00:00:00 2001 From: Amir Blum Date: Wed, 16 Aug 2023 18:38:06 +0300 Subject: [PATCH] fix(generic-pool): remove deps on types package for ts5 compatibility (#1637) --- .../package.json | 4 ++-- .../src/instrumentation.ts | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json index 2a1adf888f6..15424981a3a 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/package.json +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/package.json @@ -49,6 +49,7 @@ "@opentelemetry/context-async-hooks": "^1.8.0", "@opentelemetry/sdk-trace-base": "^1.8.0", "@opentelemetry/sdk-trace-node": "^1.8.0", + "@types/generic-pool": "^3.1.9", "@types/mocha": "7.0.2", "@types/node": "18.16.19", "@types/semver": "7.5.0", @@ -62,8 +63,7 @@ }, "dependencies": { "@opentelemetry/instrumentation": "^0.41.2", - "@opentelemetry/semantic-conventions": "^1.0.0", - "@types/generic-pool": "^3.1.9" + "@opentelemetry/semantic-conventions": "^1.0.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/plugins/node/opentelemetry-instrumentation-generic-pool#readme" } diff --git a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts index fa2f4c35f4f..35a9266e363 100644 --- a/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts +++ b/plugins/node/opentelemetry-instrumentation-generic-pool/src/instrumentation.ts @@ -28,9 +28,7 @@ import { VERSION } from './version'; const MODULE_NAME = 'generic-pool'; -export default class Instrumentation extends InstrumentationBase< - typeof genericPool -> { +export default class Instrumentation extends InstrumentationBase { // only used for v2 - v2.3) private _isDisabled = false; @@ -40,7 +38,7 @@ export default class Instrumentation extends InstrumentationBase< init() { return [ - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( MODULE_NAME, ['>=3'], (moduleExports, moduleVersion) => { @@ -63,7 +61,7 @@ export default class Instrumentation extends InstrumentationBase< return moduleExports; } ), - new InstrumentationNodeModuleDefinition( + new InstrumentationNodeModuleDefinition( MODULE_NAME, ['^2.4'], (moduleExports, moduleVersion) => {