From 3f64b2cd349cc446449187bd2669adeec15f8e12 Mon Sep 17 00:00:00 2001 From: Nev Wylie <54870357+MSNev@users.noreply.github.com> Date: Wed, 14 Jun 2023 13:42:45 -0700 Subject: [PATCH 1/3] feat(minification): Add noEmitHelpers, importHelpers and tslib as a dependency --- CHANGELOG.md | 2 ++ api/package.json | 3 +++ examples/esm-http-ts/tsconfig.json | 4 +++- examples/opentelemetry-web/package.json | 3 ++- experimental/backwards-compatibility/node14/package.json | 3 ++- experimental/backwards-compatibility/node16/package.json | 3 ++- experimental/packages/api-events/package.json | 3 ++- experimental/packages/api-logs/package.json | 3 ++- .../packages/exporter-logs-otlp-grpc/package.json | 3 ++- .../packages/exporter-logs-otlp-http/package.json | 3 ++- .../packages/exporter-logs-otlp-proto/package.json | 3 ++- .../packages/exporter-trace-otlp-grpc/package.json | 3 ++- .../packages/exporter-trace-otlp-http/package.json | 3 ++- .../packages/exporter-trace-otlp-proto/package.json | 3 ++- .../packages/opentelemetry-browser-detector/package.json | 3 ++- .../opentelemetry-exporter-metrics-otlp-grpc/package.json | 3 ++- .../opentelemetry-exporter-metrics-otlp-http/package.json | 3 ++- .../package.json | 3 ++- .../opentelemetry-exporter-prometheus/package.json | 3 ++- .../opentelemetry-instrumentation-fetch/package.json | 3 ++- .../opentelemetry-instrumentation-grpc/package.json | 3 ++- .../opentelemetry-instrumentation-http/package.json | 3 ++- .../package.json | 3 ++- .../packages/opentelemetry-instrumentation/package.json | 3 ++- .../src/platform/browser/index.ts | 2 +- .../opentelemetry-instrumentation/src/platform/index.ts | 8 +++++++- .../src/platform/node/index.ts | 8 ++++---- .../test/node/EsmInstrumentation.test.mjs | 2 +- experimental/packages/opentelemetry-sdk-node/package.json | 3 ++- experimental/packages/otlp-exporter-base/package.json | 3 ++- .../packages/otlp-grpc-exporter-base/package.json | 3 ++- .../packages/otlp-proto-exporter-base/package.json | 3 ++- experimental/packages/otlp-transformer/package.json | 3 ++- experimental/packages/sdk-logs/package.json | 3 ++- experimental/packages/shim-opencensus/package.json | 3 ++- .../propagation-validation-server/package.json | 3 ++- package.json | 3 ++- packages/opentelemetry-context-async-hooks/package.json | 3 +++ packages/opentelemetry-context-zone-peer-dep/package.json | 3 +++ packages/opentelemetry-context-zone/package.json | 3 ++- packages/opentelemetry-core/package.json | 3 ++- packages/opentelemetry-exporter-jaeger/package.json | 3 ++- packages/opentelemetry-exporter-zipkin/package.json | 3 ++- packages/opentelemetry-propagator-b3/package.json | 3 ++- packages/opentelemetry-propagator-jaeger/package.json | 3 ++- packages/opentelemetry-resources/package.json | 3 ++- packages/opentelemetry-sdk-trace-base/package.json | 3 ++- packages/opentelemetry-sdk-trace-node/package.json | 3 ++- packages/opentelemetry-sdk-trace-web/package.json | 3 ++- packages/opentelemetry-semantic-conventions/package.json | 3 +++ packages/opentelemetry-shim-opentracing/package.json | 3 ++- packages/sdk-metrics/package.json | 3 ++- packages/template/package.json | 3 +++ tsconfig.base.json | 4 +++- 54 files changed, 120 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bd4e35ac09..819fab8972f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :house: (Internal) +* feat(minification): [Minification] Add noEmitHelpers, importHelpers and tslib as a dependency [#3913](https://github.com/open-telemetry/opentelemetry-js/issues/3913) + ## 1.14.0 ### :rocket: (Enhancement) diff --git a/api/package.json b/api/package.json index f938ff131b3..aa6a34c11b4 100644 --- a/api/package.json +++ b/api/package.json @@ -87,6 +87,9 @@ "unionfs": "4.5.1", "webpack": "4.46.0" }, + "dependencies": { + "tslib": "^2.3.1" + }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/api", "sideEffects": false } diff --git a/examples/esm-http-ts/tsconfig.json b/examples/esm-http-ts/tsconfig.json index 5f821d66c7d..15eecc644b2 100644 --- a/examples/esm-http-ts/tsconfig.json +++ b/examples/esm-http-ts/tsconfig.json @@ -18,7 +18,9 @@ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, /* Completeness */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */, + "importHelpers": true, + "noEmitHelpers": true }, "include": ["**/*.ts", "**/*.js", "*.config.js"], "exclude": ["node_modules"] diff --git a/examples/opentelemetry-web/package.json b/examples/opentelemetry-web/package.json index c9afb00eddd..7caa50413f9 100644 --- a/examples/opentelemetry-web/package.json +++ b/examples/opentelemetry-web/package.json @@ -56,7 +56,8 @@ "@opentelemetry/sdk-metrics": "1.14.0", "@opentelemetry/sdk-trace-base": "1.14.0", "@opentelemetry/sdk-trace-web": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web" } diff --git a/experimental/backwards-compatibility/node14/package.json b/experimental/backwards-compatibility/node14/package.json index 74b211cc10a..a18a2795f49 100644 --- a/experimental/backwards-compatibility/node14/package.json +++ b/experimental/backwards-compatibility/node14/package.json @@ -10,7 +10,8 @@ }, "dependencies": { "@opentelemetry/sdk-node": "0.40.0", - "@opentelemetry/sdk-trace-base": "1.14.0" + "@opentelemetry/sdk-trace-base": "1.14.0", + "tslib": "^2.3.1" }, "devDependencies": { "@types/node": "14.18.25", diff --git a/experimental/backwards-compatibility/node16/package.json b/experimental/backwards-compatibility/node16/package.json index 5170101e1d1..aaeb4db421b 100644 --- a/experimental/backwards-compatibility/node16/package.json +++ b/experimental/backwards-compatibility/node16/package.json @@ -10,7 +10,8 @@ }, "dependencies": { "@opentelemetry/sdk-node": "0.40.0", - "@opentelemetry/sdk-trace-base": "1.14.0" + "@opentelemetry/sdk-trace-base": "1.14.0", + "tslib": "^2.3.1" }, "devDependencies": { "@types/node": "16.11.52", diff --git a/experimental/packages/api-events/package.json b/experimental/packages/api-events/package.json index ae67318f24a..79766e928de 100644 --- a/experimental/packages/api-events/package.json +++ b/experimental/packages/api-events/package.json @@ -61,7 +61,8 @@ "access": "public" }, "dependencies": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": "^1.0.0", + "tslib": "^2.3.1" }, "devDependencies": { "@types/mocha": "10.0.1", diff --git a/experimental/packages/api-logs/package.json b/experimental/packages/api-logs/package.json index 7c81c223fc3..25a9a2fa147 100644 --- a/experimental/packages/api-logs/package.json +++ b/experimental/packages/api-logs/package.json @@ -61,7 +61,8 @@ "access": "public" }, "dependencies": { - "@opentelemetry/api": "^1.0.0" + "@opentelemetry/api": "^1.0.0", + "tslib": "^2.3.1" }, "devDependencies": { "@types/mocha": "10.0.1", diff --git a/experimental/packages/exporter-logs-otlp-grpc/package.json b/experimental/packages/exporter-logs-otlp-grpc/package.json index 5f23cf62ecf..5c158482efd 100644 --- a/experimental/packages/exporter-logs-otlp-grpc/package.json +++ b/experimental/packages/exporter-logs-otlp-grpc/package.json @@ -76,7 +76,8 @@ "@opentelemetry/core": "1.14.0", "@opentelemetry/otlp-grpc-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", - "@opentelemetry/sdk-logs": "0.40.0" + "@opentelemetry/sdk-logs": "0.40.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/exporter-logs-otlp-http/package.json b/experimental/packages/exporter-logs-otlp-http/package.json index 8ce3c718657..85ee0e073a3 100644 --- a/experimental/packages/exporter-logs-otlp-http/package.json +++ b/experimental/packages/exporter-logs-otlp-http/package.json @@ -106,6 +106,7 @@ "@opentelemetry/core": "1.14.0", "@opentelemetry/otlp-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", - "@opentelemetry/sdk-logs": "0.40.0" + "@opentelemetry/sdk-logs": "0.40.0", + "tslib": "^2.3.1" } } diff --git a/experimental/packages/exporter-logs-otlp-proto/package.json b/experimental/packages/exporter-logs-otlp-proto/package.json index d4b7b7e9c75..3252fcfbea7 100644 --- a/experimental/packages/exporter-logs-otlp-proto/package.json +++ b/experimental/packages/exporter-logs-otlp-proto/package.json @@ -90,7 +90,8 @@ "@opentelemetry/otlp-transformer": "0.40.0", "@opentelemetry/resources": "1.14.0", "@opentelemetry/sdk-logs": "0.40.0", - "@opentelemetry/sdk-trace-base": "1.14.0" + "@opentelemetry/sdk-trace-base": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-proto", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-grpc/package.json b/experimental/packages/exporter-trace-otlp-grpc/package.json index 83982a9ee80..49b493e24e5 100644 --- a/experimental/packages/exporter-trace-otlp-grpc/package.json +++ b/experimental/packages/exporter-trace-otlp-grpc/package.json @@ -74,7 +74,8 @@ "@opentelemetry/otlp-grpc-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-trace-base": "1.14.0" + "@opentelemetry/sdk-trace-base": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-http/package.json b/experimental/packages/exporter-trace-otlp-http/package.json index 2f6470ea162..751922cc1f5 100644 --- a/experimental/packages/exporter-trace-otlp-http/package.json +++ b/experimental/packages/exporter-trace-otlp-http/package.json @@ -99,7 +99,8 @@ "@opentelemetry/otlp-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-trace-base": "1.14.0" + "@opentelemetry/sdk-trace-base": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-proto/package.json b/experimental/packages/exporter-trace-otlp-proto/package.json index 9934282fbc0..d731512ba65 100644 --- a/experimental/packages/exporter-trace-otlp-proto/package.json +++ b/experimental/packages/exporter-trace-otlp-proto/package.json @@ -87,7 +87,8 @@ "@opentelemetry/otlp-proto-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-trace-base": "1.14.0" + "@opentelemetry/sdk-trace-base": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-proto", "sideEffects": false diff --git a/experimental/packages/opentelemetry-browser-detector/package.json b/experimental/packages/opentelemetry-browser-detector/package.json index 4754938569d..b68b70eba00 100644 --- a/experimental/packages/opentelemetry-browser-detector/package.json +++ b/experimental/packages/opentelemetry-browser-detector/package.json @@ -73,7 +73,8 @@ }, "dependencies": { "@opentelemetry/resources": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/browser-detector" } diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json index e0289cda7dc..786f2cbb6b8 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json @@ -74,7 +74,8 @@ "@opentelemetry/otlp-grpc-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-metrics": "1.14.0" + "@opentelemetry/sdk-metrics": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json index 27838945dca..30c745f83ac 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json @@ -99,7 +99,8 @@ "@opentelemetry/otlp-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-metrics": "1.14.0" + "@opentelemetry/sdk-metrics": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json index 1e3be6aabda..61e8945ae21 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json @@ -73,7 +73,8 @@ "@opentelemetry/otlp-proto-exporter-base": "0.40.0", "@opentelemetry/otlp-transformer": "0.40.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-metrics": "1.14.0" + "@opentelemetry/sdk-metrics": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-proto", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-prometheus/package.json b/experimental/packages/opentelemetry-exporter-prometheus/package.json index b1c1f532072..83d785c923d 100644 --- a/experimental/packages/opentelemetry-exporter-prometheus/package.json +++ b/experimental/packages/opentelemetry-exporter-prometheus/package.json @@ -63,7 +63,8 @@ "dependencies": { "@opentelemetry/core": "1.14.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/sdk-metrics": "1.14.0" + "@opentelemetry/sdk-metrics": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-prometheus", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/package.json b/experimental/packages/opentelemetry-instrumentation-fetch/package.json index d4f7d576ee4..71da6ee8733 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/package.json +++ b/experimental/packages/opentelemetry-instrumentation-fetch/package.json @@ -91,7 +91,8 @@ "@opentelemetry/core": "1.14.0", "@opentelemetry/instrumentation": "0.40.0", "@opentelemetry/sdk-trace-web": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/package.json b/experimental/packages/opentelemetry-instrumentation-grpc/package.json index 43d366ec894..34e65b7b8d3 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/package.json +++ b/experimental/packages/opentelemetry-instrumentation-grpc/package.json @@ -72,7 +72,8 @@ }, "dependencies": { "@opentelemetry/instrumentation": "0.40.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-grpc", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-http/package.json b/experimental/packages/opentelemetry-instrumentation-http/package.json index 189902c5950..524c5b5b0b0 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/package.json +++ b/experimental/packages/opentelemetry-instrumentation-http/package.json @@ -77,7 +77,8 @@ "@opentelemetry/core": "1.14.0", "@opentelemetry/instrumentation": "0.40.0", "@opentelemetry/semantic-conventions": "1.14.0", - "semver": "^7.5.1" + "semver": "^7.5.1", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json index 31022d95ad4..9adedf9eb32 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -91,7 +91,8 @@ "@opentelemetry/core": "1.14.0", "@opentelemetry/instrumentation": "0.40.0", "@opentelemetry/sdk-trace-web": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-xml-http-request", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation/package.json b/experimental/packages/opentelemetry-instrumentation/package.json index 2bfd6c87bdb..d99cbac8f2d 100644 --- a/experimental/packages/opentelemetry-instrumentation/package.json +++ b/experimental/packages/opentelemetry-instrumentation/package.json @@ -75,7 +75,8 @@ "import-in-the-middle": "1.3.5", "require-in-the-middle": "^7.1.1", "semver": "^7.5.1", - "shimmer": "^1.2.1" + "shimmer": "^1.2.1", + "tslib": "^2.3.1" }, "peerDependencies": { "@opentelemetry/api": "^1.3.0" diff --git a/experimental/packages/opentelemetry-instrumentation/src/platform/browser/index.ts b/experimental/packages/opentelemetry-instrumentation/src/platform/browser/index.ts index 24c76056a19..0b238b42b8a 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/platform/browser/index.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/platform/browser/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export * from './instrumentation'; +export { InstrumentationBase } from './instrumentation'; diff --git a/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts b/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts index cdaf8858ce5..5d5b834646f 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts @@ -14,4 +14,10 @@ * limitations under the License. */ -export * from './node'; +export { + InstrumentationBase, + InstrumentationModuleDefinition, + InstrumentationModuleFile, + InstrumentationNodeModuleDefinition, + InstrumentationNodeModuleFile +} from './node'; diff --git a/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts b/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts index 842797c3419..0a901bb85b5 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -export * from './instrumentation'; -export * from './instrumentationNodeModuleDefinition'; -export * from './instrumentationNodeModuleFile'; -export * from './types'; +export { InstrumentationBase } from './instrumentation'; +export { InstrumentationNodeModuleDefinition } from './instrumentationNodeModuleDefinition'; +export { InstrumentationNodeModuleFile } from './instrumentationNodeModuleFile'; +export { InstrumentationModuleDefinition, InstrumentationModuleFile } from './types'; diff --git a/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs b/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs index f09097cd796..715dbdbff22 100644 --- a/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs +++ b/experimental/packages/opentelemetry-instrumentation/test/node/EsmInstrumentation.test.mjs @@ -18,7 +18,7 @@ import * as assert from 'assert'; import { InstrumentationBase, InstrumentationNodeModuleDefinition, -} from '../../build/src/index.js'; +} from '../../build/src/platform/index.js'; import * as exported from 'test-esm-module'; class TestInstrumentationWrapFn extends InstrumentationBase { diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json index ec4e96ea6ae..661a2cba9ba 100644 --- a/experimental/packages/opentelemetry-sdk-node/package.json +++ b/experimental/packages/opentelemetry-sdk-node/package.json @@ -55,7 +55,8 @@ "@opentelemetry/sdk-metrics": "1.14.0", "@opentelemetry/sdk-trace-base": "1.14.0", "@opentelemetry/sdk-trace-node": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.5.0" diff --git a/experimental/packages/otlp-exporter-base/package.json b/experimental/packages/otlp-exporter-base/package.json index 5a7026bbb5c..1e3976b5fef 100644 --- a/experimental/packages/otlp-exporter-base/package.json +++ b/experimental/packages/otlp-exporter-base/package.json @@ -61,7 +61,8 @@ "access": "public" }, "dependencies": { - "@opentelemetry/core": "1.14.0" + "@opentelemetry/core": "1.14.0", + "tslib": "^2.3.1" }, "devDependencies": { "@opentelemetry/api": "1.4.1", diff --git a/experimental/packages/otlp-grpc-exporter-base/package.json b/experimental/packages/otlp-grpc-exporter-base/package.json index 8502876aa1b..35791854938 100644 --- a/experimental/packages/otlp-grpc-exporter-base/package.json +++ b/experimental/packages/otlp-grpc-exporter-base/package.json @@ -75,7 +75,8 @@ "@grpc/grpc-js": "^1.7.1", "@opentelemetry/core": "1.14.0", "@opentelemetry/otlp-exporter-base": "0.40.0", - "protobufjs": "^7.2.3" + "protobufjs": "^7.2.3", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-grpc-exporter-base", "sideEffects": false diff --git a/experimental/packages/otlp-proto-exporter-base/package.json b/experimental/packages/otlp-proto-exporter-base/package.json index 9c998814429..592e757e6d3 100644 --- a/experimental/packages/otlp-proto-exporter-base/package.json +++ b/experimental/packages/otlp-proto-exporter-base/package.json @@ -81,7 +81,8 @@ "dependencies": { "@opentelemetry/core": "1.14.0", "@opentelemetry/otlp-exporter-base": "0.40.0", - "protobufjs": "^7.2.3" + "protobufjs": "^7.2.3", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-proto-exporter-base", "sideEffects": false diff --git a/experimental/packages/otlp-transformer/package.json b/experimental/packages/otlp-transformer/package.json index b27be31811c..fb287ceeb58 100644 --- a/experimental/packages/otlp-transformer/package.json +++ b/experimental/packages/otlp-transformer/package.json @@ -85,7 +85,8 @@ "@opentelemetry/resources": "1.14.0", "@opentelemetry/sdk-logs": "0.40.0", "@opentelemetry/sdk-metrics": "1.14.0", - "@opentelemetry/sdk-trace-base": "1.14.0" + "@opentelemetry/sdk-trace-base": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-transformer", "sideEffects": false diff --git a/experimental/packages/sdk-logs/package.json b/experimental/packages/sdk-logs/package.json index 35536fafd01..f9278c45ebf 100644 --- a/experimental/packages/sdk-logs/package.json +++ b/experimental/packages/sdk-logs/package.json @@ -94,6 +94,7 @@ }, "dependencies": { "@opentelemetry/core": "1.14.0", - "@opentelemetry/resources": "1.14.0" + "@opentelemetry/resources": "1.14.0", + "tslib": "^2.3.1" } } diff --git a/experimental/packages/shim-opencensus/package.json b/experimental/packages/shim-opencensus/package.json index 893399131b2..107c4d3ba4c 100644 --- a/experimental/packages/shim-opencensus/package.json +++ b/experimental/packages/shim-opencensus/package.json @@ -71,7 +71,8 @@ "dependencies": { "@opentelemetry/core": "1.14.0", "require-in-the-middle": "^7.1.1", - "semver": "^7.5.1" + "semver": "^7.5.1", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/shim-opencensus", "sideEffects": false diff --git a/integration-tests/propagation-validation-server/package.json b/integration-tests/propagation-validation-server/package.json index 1658c1ed26a..880251c5035 100644 --- a/integration-tests/propagation-validation-server/package.json +++ b/integration-tests/propagation-validation-server/package.json @@ -17,7 +17,8 @@ "@opentelemetry/sdk-trace-base": "1.14.0", "axios": "1.4.0", "body-parser": "1.19.0", - "express": "4.17.3" + "express": "4.17.3", + "tslib": "^2.3.1" }, "devDependencies": { "typescript": "4.4.4" diff --git a/package.json b/package.json index dca33d4c271..f467260654e 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,8 @@ "typedoc": "0.22.18", "typedoc-plugin-missing-exports": "1.0.0", "typedoc-plugin-resolve-crossmodule-references": "0.2.2", - "typescript": "4.4.4" + "typescript": "4.4.4", + "tslib": "^2.3.1" }, "changelog": { "repo": "open-telemetry/opentelemetry-js", diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index 6f4dc6833d2..9bf8bf342f7 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -43,6 +43,9 @@ "publishConfig": { "access": "public" }, + "dependencies": { + "tslib": "^2.3.1" + }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.5.0", "@types/mocha": "10.0.1", diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index 1e62d98b0cd..06c1b853b64 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -85,6 +85,9 @@ "@opentelemetry/api": ">=1.0.0 <1.5.0", "zone.js": "^0.10.2 || ^0.11.0" }, + "dependencies": { + "tslib": "^2.3.1" + }, "sideEffects": false, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-context-zone-peer-dep" } diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index 79b02e47fd9..3ca7f10b1e5 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -76,7 +76,8 @@ }, "dependencies": { "@opentelemetry/context-zone-peer-dep": "1.14.0", - "zone.js": "^0.11.0" + "zone.js": "^0.11.0", + "tslib": "^2.3.1" }, "sideEffects": true, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-context-zone" diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index d9d8f0e6b71..962d72b3af9 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -91,7 +91,8 @@ "@opentelemetry/api": ">=1.0.0 <1.5.0" }, "dependencies": { - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core", "sideEffects": false diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index 28a93cd6321..840fa27340c 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -66,7 +66,8 @@ "@opentelemetry/core": "1.14.0", "@opentelemetry/sdk-trace-base": "1.14.0", "@opentelemetry/semantic-conventions": "1.14.0", - "jaeger-client": "^3.15.0" + "jaeger-client": "^3.15.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-exporter-jaeger", "sideEffects": false diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index 0d60085f6b8..f6aa84d79d3 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -95,7 +95,8 @@ "@opentelemetry/core": "1.14.0", "@opentelemetry/resources": "1.14.0", "@opentelemetry/sdk-trace-base": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-exporter-zipkin", "sideEffects": false diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index d49ad3d5d86..a8ca0345bd8 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -51,7 +51,8 @@ "access": "public" }, "dependencies": { - "@opentelemetry/core": "1.14.0" + "@opentelemetry/core": "1.14.0", + "tslib": "^2.3.1" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.5.0" diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json index dc0f502c5a9..4e55f315bcd 100644 --- a/packages/opentelemetry-propagator-jaeger/package.json +++ b/packages/opentelemetry-propagator-jaeger/package.json @@ -81,7 +81,8 @@ "@opentelemetry/api": ">=1.0.0 <1.5.0" }, "dependencies": { - "@opentelemetry/core": "1.14.0" + "@opentelemetry/core": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-propagator-jaeger", "sideEffects": false diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index fce03769bc6..e5bc9578885 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -92,7 +92,8 @@ }, "dependencies": { "@opentelemetry/core": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources", "sideEffects": false diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index 5d1a556c11e..05b9a863b76 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -95,7 +95,8 @@ "dependencies": { "@opentelemetry/core": "1.14.0", "@opentelemetry/resources": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base", "sideEffects": false diff --git a/packages/opentelemetry-sdk-trace-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json index 366817f63f7..6dfaaf7f6c3 100644 --- a/packages/opentelemetry-sdk-trace-node/package.json +++ b/packages/opentelemetry-sdk-trace-node/package.json @@ -70,7 +70,8 @@ "@opentelemetry/propagator-b3": "1.14.0", "@opentelemetry/propagator-jaeger": "1.14.0", "@opentelemetry/sdk-trace-base": "1.14.0", - "semver": "^7.5.1" + "semver": "^7.5.1", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node", "sideEffects": false diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json index bffbaa2f70d..5881b816f30 100644 --- a/packages/opentelemetry-sdk-trace-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -94,7 +94,8 @@ "dependencies": { "@opentelemetry/core": "1.14.0", "@opentelemetry/sdk-trace-base": "1.14.0", - "@opentelemetry/semantic-conventions": "1.14.0" + "@opentelemetry/semantic-conventions": "1.14.0", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web", "sideEffects": false diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index edd54ccb249..3b0b9e39d85 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -62,6 +62,9 @@ "ts-mocha": "10.0.0", "typescript": "4.4.4" }, + "dependencies": { + "tslib": "^2.3.1" + }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-semantic-conventions", "sideEffects": false } diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index e2bfae06a7b..fce1aef2809 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -62,7 +62,8 @@ "dependencies": { "@opentelemetry/core": "1.14.0", "@opentelemetry/semantic-conventions": "1.14.0", - "opentracing": "^0.14.4" + "opentracing": "^0.14.4", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-shim-opentracing", "sideEffects": false diff --git a/packages/sdk-metrics/package.json b/packages/sdk-metrics/package.json index aca2f6457a9..8b71a81aff7 100644 --- a/packages/sdk-metrics/package.json +++ b/packages/sdk-metrics/package.json @@ -80,7 +80,8 @@ "dependencies": { "@opentelemetry/core": "1.14.0", "@opentelemetry/resources": "1.14.0", - "lodash.merge": "^4.6.2" + "lodash.merge": "^4.6.2", + "tslib": "^2.3.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics", "sideEffects": false diff --git a/packages/template/package.json b/packages/template/package.json index 0af80862c80..b12f8971059 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -83,6 +83,9 @@ "lerna": "6.6.2", "typescript": "4.4.4" }, + "dependencies": { + "tslib": "^2.3.1" + }, "Add these to devDependencies for testing": { "@types/mocha": "9.1.1", "@types/sinon": "10.0.13", diff --git a/tsconfig.base.json b/tsconfig.base.json index cbafb67678a..dfe3e486514 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -21,7 +21,9 @@ "strict": true, "strictNullChecks": true, "target": "es2017", - "useUnknownInCatchVariables": false + "useUnknownInCatchVariables": false, + "importHelpers": true, + "noEmitHelpers": true }, "exclude": [ "node_modules" From a8a27f3b9e88a31c4850641968bf9704f87179c4 Mon Sep 17 00:00:00 2001 From: Nev Wylie <54870357+MSNev@users.noreply.github.com> Date: Wed, 14 Jun 2023 14:50:05 -0700 Subject: [PATCH 2/3] fix: Lint fixes --- .../opentelemetry-instrumentation/src/platform/index.ts | 2 +- .../opentelemetry-instrumentation/src/platform/node/index.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts b/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts index 5d5b834646f..1fc5f5e14a6 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/platform/index.ts @@ -19,5 +19,5 @@ export { InstrumentationModuleDefinition, InstrumentationModuleFile, InstrumentationNodeModuleDefinition, - InstrumentationNodeModuleFile + InstrumentationNodeModuleFile, } from './node'; diff --git a/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts b/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts index 0a901bb85b5..d3df10491f4 100644 --- a/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts +++ b/experimental/packages/opentelemetry-instrumentation/src/platform/node/index.ts @@ -16,4 +16,7 @@ export { InstrumentationBase } from './instrumentation'; export { InstrumentationNodeModuleDefinition } from './instrumentationNodeModuleDefinition'; export { InstrumentationNodeModuleFile } from './instrumentationNodeModuleFile'; -export { InstrumentationModuleDefinition, InstrumentationModuleFile } from './types'; +export { + InstrumentationModuleDefinition, + InstrumentationModuleFile, +} from './types'; From 1e0c4a0307a541699244d20512fbd02257b3a63d Mon Sep 17 00:00:00 2001 From: Nev Wylie <54870357+MSNev@users.noreply.github.com> Date: Mon, 19 Jun 2023 11:44:30 -0700 Subject: [PATCH 3/3] Remove noEmitHelpers as not needed --- examples/esm-http-ts/tsconfig.json | 3 +-- tsconfig.base.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/esm-http-ts/tsconfig.json b/examples/esm-http-ts/tsconfig.json index 15eecc644b2..f7c20de0d14 100644 --- a/examples/esm-http-ts/tsconfig.json +++ b/examples/esm-http-ts/tsconfig.json @@ -19,8 +19,7 @@ /* Completeness */ "skipLibCheck": true /* Skip type checking all .d.ts files. */, - "importHelpers": true, - "noEmitHelpers": true + "importHelpers": true }, "include": ["**/*.ts", "**/*.js", "*.config.js"], "exclude": ["node_modules"] diff --git a/tsconfig.base.json b/tsconfig.base.json index dfe3e486514..84e684c8a55 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -22,8 +22,7 @@ "strictNullChecks": true, "target": "es2017", "useUnknownInCatchVariables": false, - "importHelpers": true, - "noEmitHelpers": true + "importHelpers": true }, "exclude": [ "node_modules"