node icon indicating copy to clipboard operation
node copied to clipboard

cli: add support to bin scripts

Open IlyasShabi opened this issue 8 months ago • 1 comments

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

IlyasShabi avatar May 04 '25 20:05 IlyasShabi

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

juanarbol avatar May 04 '25 21:05 juanarbol