The project root: the directory of the nearest package.json found
walking up from cwd, else cwd itself.
The nearest package.json rather than the working directory, so a
program started from a subdirectory (a script in bin/, a test runner
in a workspace package) still finds its own config/. The fallback
keeps a script with no package.json at all working, the way the
references read config/config.casc from the working directory.
The project root: the directory of the nearest
package.jsonfound walking up fromcwd, elsecwditself.The nearest
package.jsonrather than the working directory, so a program started from a subdirectory (a script inbin/, a test runner in a workspace package) still finds its ownconfig/. The fallback keeps a script with nopackage.jsonat all working, the way the references readconfig/config.cascfrom the working directory.