cls-hooked provides continuation-local storage for Node.js, letting you set and later retrieve values scoped to the lifetime of a chain of synchronous and asynchronous callbacks. It is a fork of CLS that uses AsyncWrap for older Node versions and async_hooks for newer Node versions, which can help associate per-request state (like user data) across callback flows.
Project status
- This GitHub source appears quiet or in maintenance mode, with the last upstream push dated 2024-04-23, and no evidence of recent functional updates close to today (2026-08-12).
- The apparent update cadence is historical rather than current, with most published
updatesclustered in mid-2017 (many within days) and much longer gaps afterward, suggesting stabilization rather than ongoing active development.
AI summary generated
Recent updates
v4.2.2
Release v4.2.2 updates the cls-hooked package version and bumps its async-hook-jl dependency. The release notes indicate this is for Babel support, and the code diff only reflects the dependency version change.
v4.2.1
v4.2.1 is described in the release notes only as a chore to reduce memory leaks (Issue #9, PR #10). The code diff shows a targeted change in the context lifecycle cleanup logic, plus dependency and lockfile updates.
v4.2.0
Release v4.2.0 focuses on Node.js compatibility, specifically combining CLS implementations for pre-Node8 and Node8+ environments. The codebase adds a new entrypoint that selects the appropriate context implementation at runtime based on the Node version.
Featuresv5.alpha.1
v5.alpha.1 is an alpha release targeting Node v8.1.3 and migrating the library to use Node's built-in async_hooks API. The release notes are brief and largely frame this as an async_hooks upgrade, with a warning that Node v8.2.0 may introduce additional async_hooks breaking changes.
v4.1.7
v4.1.7 primarily updates dependency configuration to fix Node.js engine semver constraints (allowing Node 6.10.x) by switching from async-hook to the async-hook-jl fork. It also refreshes several dev/test dependencies and adjusts CI-related tests (fs.watchFile timing, skipping the uncaughtException test).
v4.1.6
v4.1.6 is a small patch release for cls-hooked. It corrects an error-handling variable bug in runPromise and updates README documentation with added AsyncWrap history.
v4.1.5
Release v4.1.5 updates the supported Node engine range and bumps the async-hook dependency to 1.7.1. It also relaxes timing in the filesystem-related tests to reduce CI flakiness. The code diff contains a few additional repo/config and documentation changes that are not mentioned in the release notes.
v4.1.4
v4.1.4 primarily updates the supported Node version to allow Node >= 4.5.0 and extends CI to run tests on Node 4. The code diff also introduces a new promise-based API on the namespace, and bumps several dependency versions.
Featuresv4.1.2
v4.1.2 is a republish to npm (v4.1.2) with no additional API changes noted. The main developer-facing change in this release history is the addition of a new `runAndReturn` method, plus an update to the package engine constraints (Node.js engine) to `^6.2.2`.
Features