The pnpm package is too big and monolith. Dividing it into plugins should improve testability and extensibility (this is the path Yarn v2 is also going).
There is one drawback though. Currently, it is possible to pass options before the command names (for instance, pnpm -D add express). If pnpm will be divided into plugins, only the plugins will be able to parse the options (except the global options), so options will have to be specified always after the command.
An advantage of this is that different commands will be able to use the same shorthands for different options. For instance, -D can mean --save-dev in the add command and --only dev in the outdated command.
Is there at least a way to check if someone adds the option before the command? That way we can warn users when they try to pass options before the command.
That would ease the transition to the new way of writing commands. We could add a warning before we implement the breaking change, something like:
You ran the following command:
pnpm -D add express
From pnpm@5 onwards this won't work. You'll have to specify the options AFTER
the command, like so:
pnpm add -D express
鈿狅笍 Please update all your scripts accordingly! 鈿狅笍
I think for now it will work
--foo=bar)-h, --color, --dir, --filter)Mostly done
Most helpful comment
Mostly done