Replacements for pkg-dir
empathic
empathic
provides a more generic way to find files and directories upwards.
The main difference is that empathic
is synchronous, so you should no longer await
the result.
Example:
ts
import { dirname } from 'node:fs'
import * as pkg from 'empathic/package'
import { packageDirectory } from 'pkg-dir'
const dir = await packageDirectory()
const dir = dirname(pkg.up())