fix: Read a script file named like a builtin as that script in turbo trace
A package script that runs a file of the repository by its path, such as
`"test": "./scripts/test"`, was matched by the base name of the path. `test`
is a shell builtin without file effects, so the command was ignored: the
script file was no input of the task, and the task started no tests as far as
the trace knew. Its tests had no task, and a change of the script selected
nothing. The same happened to `./scripts/install`, `./scripts/open` and other
names of builtins and file utilities.
A file of the repository run by its path is now that script, whatever the
builtin or file utility of the same name does. Installed binaries
(`./node_modules/.bin/<name>`) are still known by their name.
A script file that is not read command by command (an executable without a
shell extension) is scanned for the name of a test runner. A runner started
by the path of its installed binary, `./node_modules/.bin/jest "$@"`, was not
found there: a name after a `/` counted as part of a path. A name after
`node_modules/.bin/` is now the program it names.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>