node
node copied to clipboard
cli: add support to bin scripts
Description
This PR makes node --run <cmd> run commands from the package’s bin section as well. If the command is in both scripts and bin, the version in scripts still wins.
https://github.com/nodejs/node/issues/53845
TODO
- [ ] Add documentation
I'm -1 on this.
Node.js already bundles npm, which has built-in support for this. I'm not 100% sure, but surely other package managers supports it as well. This is a feature that simply works out of the box.
Refs: https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bin