Heap Allocation Profiling
The most significant user-facing addition in v2.9.16 is heap allocation profiling support via OpenTelemetry (OTEL) traces. This release adds heap allocation data to Turborepo's existing OTEL trace output, letting you see per-task and per-package memory consumption in your CI or local tracing setup.
To use it, point TURBO_TRACE_ENDPOINT at your OTEL collector as before β heap data now appears alongside the existing duration and span information. The implementation adds a new heap.allocated event to task spans with category breakdowns (V8 heap, native allocations, etc.).
This is particularly useful for monorepos where a single slow or memory-hungry package can drag down the whole CI pipeline.
pnpm Injected Peer Fix
The v2.9.15 release introduced a regression in how Turborepo handles pnpm injected peer packages. When a package uses pnpm's injected: true workspace protocol for peer dependencies, Turborepo was incorrectly omitting or mishandling those entries during the task graph resolution.
v2.9.16 fixes this. If your monorepo uses pnpm with injected peers β a pattern sometimes used to ensure a single physical copy of a peer package across the workspace β Turborepo now correctly preserves those entries.
OTEL Endpoint Validation Hardened
Turborepo v2.9.16 also hardens the OTEL endpoint URL validation. Previously, a malformed endpoint URL (e.g., missing scheme or wrong port) could cause Turborepo to crash silently or produce garbled trace output. The new validation is stricter and fails fast with a clear error message if the endpoint is misconfigured.
PTY Shutdown and npm tlog Fixes
Two smaller but impactful fixes:
- PTY shutdown hang β on certain Linux distributions, the pseudo-terminal (PTY) used to run tasks in watch mode would hang on shutdown, leaving
turboprocesses orphaned. This is now fixed. - npm tlog publish retries β npm package publishing with
turbo run build --dry-run=json(or the CI pipeline's tlog output) would fail unrecoverably on transient network errors. v2.9.16 adds automatic retries for tlog publish failures.
Other Changes
--gitignoreroot handling in prune βturbo prunenow correctly respects the root.gitignorewhen determining what to include in the artifact for a given scope, fixing edge cases where extra files were included.- Profile tracing coverage improved β task spans that were missing parent attribution in previous releases are now correctly linked in the trace output.
Updating
npm install -g turbo@latest
# or
brew install turbo
# or
cargo install turbo
Turborepo v2.9.16 is the current stable release. Canary builds (v2.9.17-canary.x) are available for testing the next batch of changes.
