Path
Path helpers for ESM scripts and monorepos.
resolveCurrentPath
Get the directory of the current ES module — the ESM replacement for __dirname.
cwdJoin
Join path segments onto process.cwd().
findFilePath
Walk up from a path to find the nearest directory containing a file.
findPackagePath
Walk up to the nearest package.json.
Example: locate the project root
Handy in CLI tools and scripts that run from unknown depths:
