Back to Explore

sindresorhus/path-key

GitHub
4 watchersOpen source

Last release:

Provides a small cross platform utility to determine the correct environment variable key for PATH (for example, handling Windows casing differences). Useful when you need the exact key to pass environment variables to child processes, work with custom environment objects, or use worker threads where case insensitivity may not apply.

Project status

  • The upstream source (GitHub) has a recent activity timestamp (last upstream push, 2025-09-12), but the last published version update is much older (v4.0.0 on 2021-04-09), suggesting limited user-facing updates recently.
  • Update cadence appears slow relative to today (2026-09-10), with multi-year gaps between published updates (notably between 2021-04 and the prior 2019 updates).

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v4.0.0

    v4.0.0 makes path-key a pure ESM package and raises the minimum supported Node.js version to 12. The implementation and TypeScript declaration files were updated accordingly, and CI/test tooling was modernized.

    Breaking
  • v3.1.1

    v3.1.1 is a small patch release focused on Windows behavior when both `Path` and `PATH` are present in the provided environment object. The main code change alters how the module selects which key casing to return for the PATH environment variable.

  • v3.1.0

    Release v3.1.0 focuses on a TypeScript declaration change to support CommonJS-style exporting. The code diff also adjusts runtime interop (adds a default property on module.exports) and updates the TypeScript type-test tooling.

    Breaking
  • v3.0.0

    v3.0.0 updates the package for a newer Node.js baseline and adds TypeScript typings. The primary developer impact is the enforced minimum Node.js version.

    BreakingFeatures