Packages such as these:
- find-pkg
- replaced by
pkg.up({ cwd })
- find-file-up
- replaced by
find.up(name, { cwd })
- find-up-simple
- replaced by
find.up(name, { cwd })
- find-up
- replaced by
find.up(name, { cwd })
- pkg-dir
- replaced by
dirname(pkg.up({ cwd }))
- find-cache-dir
- find-cache-directory
- read-package-up
- replaced by
empathic/package
- replaced by
empathic/package and pkg-types if you need strong types
- read-pkg
- read-pkg-up
- replaced by
empathic/package
- replaced by
empathic/package and pkg-types if you need strong types
and more, can all be replaced by empathic:
https://github.com/lukeed/empathic
this is much faster and usually smaller to install
empathic is ESM only. if that blocks us, we can use fd-package-json to find the closest package.json. but there is no obvious replacement for the generic case. you could use walk-up-path but would need more inline logic
with require(esm) being in all LTS of node now, we may be able to use empathic still if the projects have a high enough engine requirement
Packages such as these:
pkg.up({ cwd })find.up(name, { cwd })find.up(name, { cwd })find.up(name, { cwd })dirname(pkg.up({ cwd }))pkg.cachepkg.cacheempathic/packageempathic/packageandpkg-typesif you need strong typespkg-typesempathic/packageempathic/packageandpkg-typesif you need strong typesand more, can all be replaced by empathic:
https://github.com/lukeed/empathic
this is much faster and usually smaller to install
empathic is ESM only. if that blocks us, we can use fd-package-json to find the closestpackage.json. but there is no obvious replacement for the generic case. you could usewalk-up-pathbut would need more inline logicwith
require(esm)being in all LTS of node now, we may be able to useempathicstill if the projects have a high enough engine requirement