Back to Explore

sindresorhus/parent-module

GitHub
1 watchersOpen source

Last release: 8 months ago

parent-module is a Node.js utility that returns the file path of the module that called your code. It supports both CommonJS and ESM, and is useful for getting the immediate parent module path (or undefined at the top-level entry module). You can also combine it with read-package-up to read the parent module’s package.json.

Project status

  • The repository appears actively maintained recently, with the latest upstream push on 2025-09-15 and a corresponding package update (v3.2.0) on 2025-09-15, indicating recent responsiveness.
  • Update cadence looks intermittent, with a long gap between v3.1.0 (2023-09-14) and v3.2.0 (2025-09-15), and an even larger gap since v3.0.0 (2021-10-04).

AI summary generated Today

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

Recent updates

  • v3.2.0

    8 months ago

    v3.2.0 focuses on fixing an ESM top-level module behavior issue. The implementation change is larger than the single release-note bullet suggests, including new call stack filtering logic and cases where the function can return undefined.

    Breaking
  • v3.1.0

    9/14/2023

    v3.1.0 is a small release that updates the package version and bumps a dependency. The release notes only state that dependencies were updated, without specifying which ones.

  • v3.0.0

    10/4/2021

    v3.0.0 moves the package to an ES module-only setup and updates the public entrypoints accordingly. The main functional code remains centered on `callsites()`, but the surrounding module system, packaging metadata, and dependency versions were changed.

    Breaking