From 6b7784689d40044dd43c3a844d9b1249ccc8b456 Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Mon, 27 Jan 2025 19:04:24 +0000 Subject: [PATCH 1/4] test(instrumentation-winston): Include all versions in coverage --- .../opentelemetry-instrumentation-winston/package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index 3872158456..ebfc8cba7e 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -6,9 +6,12 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "test": "nyc mocha 'test/**/*.test.ts'", + "test": "npm run test-v1-v2 && npm run test-v3", + "test-v1-v2": "tav winston 2.4.7 npm run test-run", + "test-v3": "tav winston 3.17.0 npm run test-run", + "test-run": "nyc mocha 'test/**/*.test.ts'", "test-all-versions": "tav", - "tdd": "npm run test -- --watch-extensions ts --watch", + "tdd": "npm run test-run -- --watch-extensions ts --watch", "clean": "rimraf build/*", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", From 28f4df0437569a13c4576d6bb20237c3bfbbc07f Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Mon, 27 Jan 2025 19:11:48 +0000 Subject: [PATCH 2/4] Merge coverage reports. --- plugins/node/opentelemetry-instrumentation-winston/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index ebfc8cba7e..5b2232f201 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -6,7 +6,7 @@ "types": "build/src/index.d.ts", "repository": "open-telemetry/opentelemetry-js-contrib", "scripts": { - "test": "npm run test-v1-v2 && npm run test-v3", + "test": "npm run test-v1-v2 && npm run test-v3 && nyc merge .nyc_output ./coverage/coverage-final.json", "test-v1-v2": "tav winston 2.4.7 npm run test-run", "test-v3": "tav winston 3.17.0 npm run test-run", "test-run": "nyc mocha 'test/**/*.test.ts'", From e5c3f2e03b95f352e0543a5eb23dbdc86e999bef Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Mon, 27 Jan 2025 19:20:27 +0000 Subject: [PATCH 3/4] Merge coverage outputs. --- plugins/node/opentelemetry-instrumentation-winston/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index 5b2232f201..6519294299 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -9,7 +9,7 @@ "test": "npm run test-v1-v2 && npm run test-v3 && nyc merge .nyc_output ./coverage/coverage-final.json", "test-v1-v2": "tav winston 2.4.7 npm run test-run", "test-v3": "tav winston 3.17.0 npm run test-run", - "test-run": "nyc mocha 'test/**/*.test.ts'", + "test-run": "nyc --no-clean mocha 'test/**/*.test.ts'", "test-all-versions": "tav", "tdd": "npm run test-run -- --watch-extensions ts --watch", "clean": "rimraf build/*", From 860f8b4fd372f20a3330093f2e7f02e39f907c2b Mon Sep 17 00:00:00 2001 From: Onur Temizkan Date: Wed, 29 Jan 2025 18:35:41 +0000 Subject: [PATCH 4/4] Do not set fixed `winston` version in `tav`. --- plugins/node/opentelemetry-instrumentation-winston/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/node/opentelemetry-instrumentation-winston/package.json b/plugins/node/opentelemetry-instrumentation-winston/package.json index 6519294299..ece99e5aac 100644 --- a/plugins/node/opentelemetry-instrumentation-winston/package.json +++ b/plugins/node/opentelemetry-instrumentation-winston/package.json @@ -8,7 +8,7 @@ "scripts": { "test": "npm run test-v1-v2 && npm run test-v3 && nyc merge .nyc_output ./coverage/coverage-final.json", "test-v1-v2": "tav winston 2.4.7 npm run test-run", - "test-v3": "tav winston 3.17.0 npm run test-run", + "test-v3": "npm run test-run", "test-run": "nyc --no-clean mocha 'test/**/*.test.ts'", "test-all-versions": "tav", "tdd": "npm run test-run -- --watch-extensions ts --watch",