fix(build): default to Node.js types, scope DOM types, @types/node -> 18.19.130#6280
Merged
pichlermarc merged 1 commit intoopen-telemetry:mainfrom Jan 16, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6280 +/- ##
=======================================
Coverage 95.41% 95.41%
=======================================
Files 317 317
Lines 9597 9597
Branches 2220 2220
=======================================
Hits 9157 9157
Misses 440 440
🚀 New features to boost your workflow:
|
overbalance
added a commit
to embrace-io/opentelemetry-js
that referenced
this pull request
Jan 12, 2026
4fde82a to
064220f
Compare
pichlermarc
reviewed
Jan 15, 2026
ba6449e to
9570249
Compare
9570249 to
4120b3c
Compare
4120b3c to
620f276
Compare
pichlermarc
approved these changes
Jan 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of changes
Removed
domanddom.iterablefrom root tsconfigs and explicitly added them only to packages that use DOM APIs.Since tsconfigs are scoped to packages, any package that references DOM APIs needs dom types, even if the majority of that package's code targets Node.
Details
Inspired by the issue in #6278
domanddom.iterablefrom the base tsconfig, defaulting all packages to Node.js types@types/nodefrom 18.6.5 to 18.19.130 across all 41 packages (required for globalperformancetype)liboption@types/node upgrade (18.6.5 → 18.19.130)
The global
performanceobject type was added in @types/node 18.11.0. Without this upgrade, removing DOM types breaks packages that useperformancedirectly.Type fixes for @types/node 18.19.x
@opentelemetry/otlp-exporter-baseoverridemodifier tocreateConnectionin test class extendinghttp.Agent@opentelemetry/instrumentation-httpOutgoingHttpHeaders | readonly string[]type narrowing inutils.tsand test filesrequest.headerscan be a string array for raw headers@opentelemetry/instrumentation-grpcpatchedCallbackfunction generic to fix type inference issues withSendUnaryDataCallback@opentelemetry/sdk-trace-baseTestExporterWithDelaycallback to properly passExportResultthroughsetTimeout@opentelemetry/resourcessetTimeoutresolve callback to passundefinedexplicitly in tests@opentelemetry/corePerformancetype annotation tootperformanceexport in browser platformAPI packages with DOM types removed
These packages don't use any DOM APIs, so DOM types are removed:
@opentelemetry/api@opentelemetry/api-logsPackages with DOM types added via tsconfig
libThese 17 packages need DOM types for browser APIs (fetch, XMLHttpRequest, navigator, VisibilityState, Performance, etc.):
Browser-only packages:
@opentelemetry/sdk-trace-web@opentelemetry/context-zone-peer-dep@opentelemetry/web-common@opentelemetry/instrumentation-fetch@opentelemetry/instrumentation-xml-http-request@opentelemetry/opentelemetry-browser-detectorIsomorphic packages (browser + Node.js):
@opentelemetry/core@opentelemetry/sdk-trace-base@opentelemetry/sdk-logs@opentelemetry/exporter-zipkin@opentelemetry/otlp-exporter-base@opentelemetry/exporter-trace-otlp-http@opentelemetry/exporter-trace-otlp-proto@opentelemetry/exporter-logs-otlp-http@opentelemetry/exporter-logs-otlp-proto@opentelemetry/exporter-metrics-otlp-http@opentelemetry/exporter-metrics-otlp-protoTest plan
npm run compilesucceeds