You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default import of a global Command object (aka program) has been out of favour since Commander v5, deprecated since v7, removed from the TypeScript in v8, and never implemented for the explicit esm support (#1440).
In general with the deprecated features and behaviours, I am willing to leave them alone until they cause problems rather than aggressively remove them, to minimise breaking changes when people upgrade from old versions of Commander.
The global Command object was involved in recent problems with TypeScript (#2013#2014), so I am suggesting removing it while I am still annoyed! 😠
To be clear, this will still work:
const{ program }=require('commander');program.parse();
The default import of a global Command object (aka
program
) has been out of favour since Commander v5, deprecated since v7, removed from the TypeScript in v8, and never implemented for the explicit esm support (#1440).In general with the deprecated features and behaviours, I am willing to leave them alone until they cause problems rather than aggressively remove them, to minimise breaking changes when people upgrade from old versions of Commander.
The global Command object was involved in recent problems with TypeScript (#2013 #2014), so I am suggesting removing it while I am still annoyed! 😠
To be clear, this will still work:
And this:
But this won't work anymore:
The text was updated successfully, but these errors were encountered: