nodejs-pypi icon indicating copy to clipboard operation
nodejs-pypi copied to clipboard

How to handle `corepack` and future command line executables in nodejs-cmd?

Open samwillis opened this issue 1 year ago • 0 comments

We have a separate nodejs-cmd package that is installed as an option (pip install nodejs-bin[cmd]) to get the normal command line commands for node.

Corepack is an experimental new command from Node, nodejs-cmd doesn't yet add it. It is however available on all node versions we currently plan to distribute. But it may not be in future.

There are two ways we could handle commands:

  • Have a single nodejs-cmd (as we currently do), that has support for all commands but throws an error if the installed nodejs-bin doesn't have that command available.

  • Have a separate matching nodejs-cmd version for every released nodejs-bin wheel, adding only command line commands for those that the package has. Effectively releasing two packaging for each node version.

The former is simpler, but a little messy, the latter more complex but doesn't litter unavailable commands on your path.

samwillis avatar Nov 10 '22 10:11 samwillis