is-wsl is a small Node.js package that checks whether the current process is running inside Windows Subsystem for Linux (WSL), including both WSL 1 and WSL 2. It is useful for detecting a WSL environment and applying workarounds for unimplemented or buggy features.
Project status
- Actively maintained: The most recent upstream push and package updates are on 2026-02-15, with v3.1.1 following directly after, indicating the project is still receiving updates.
- Update cadence: Updates are irregular. After v3.1.0 in 2023-09-25, there was a long quiet period until v3.1.1 in 2026-02-15 (about 2.5 years).
AI summary generated
Recent updates
v3.1.1
v3.1.1 improves detection of Windows Subsystem for Linux when running with custom kernels. The code now falls back to checking WSL-specific filesystem paths if /proc/version does not contain the expected 'microsoft' marker.
v3.1.0
v3.1.0 updates the library to improve container detection for WSL environments, with release notes mentioning Podman support. The code changes replace the previous Docker-specific check with a more general inside-container check.
Featuresv3.0.0
v3.0.0 modernizes is-wsl by switching the package to pure ESM and raising the minimum supported Node.js version to 16. The runtime logic remains the same (detect WSL by checking /proc/version and excluding Docker), but module format and TypeScript typings change to match the new export style.
Breakingv2.2.0
Release v2.2.0 adds detection to ensure the module does not report WSL when the code is running inside Docker within a WSL environment. It does this by integrating a Docker detection dependency and adding a corresponding test case.
BreakingFeaturesv2.1.1
Release v2.1.1 provides a targeted fix for incorrect return behavior when running on Linux that is not Windows Subsystem for Linux. The main functional change ensures the exported check returns an actual boolean false instead of potentially returning undefined.
v2.1.0
v2.1.0 adds detection support for Windows Subsystem for Linux (WSL) 2. The implementation updates the WSL detection logic and extends the test suite to cover both WSL 1 and WSL 2.
Featuresv2.0.0
v2.0.0 introduces TypeScript type definitions for the package. It also includes a breaking requirement to run on Node.js 8.
BreakingFeatures