imsnif / synp

Convert yarn.lock to package-lock.json and vice versa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning displayed by 'checkWorkspace' has typo: `--with-workspaces` should be `--with-workspace`

mhruddick opened this issue ยท comments

Using > synp --source-file yarn.lock in a monorepo displays this warning:

Workspace (npm lockfile v2) support is experimental. Pass `--with-workspaces` flag to enable and cross your fingers. Good luck!

As a first time user, I took it at face value and added that flag, which resulted in this:

error: unknown option '--with-workspaces'

Quite a minor issue, but misleading to first-time users.

Aside from the fix for the warning text, another suggestion would be to automatically display the help along with the 'unknown option' error, as it does here for a different error:

> synp --with-workspace --source-file yarn.lock
destination file package-lock.json already exists, will not overwrite
Usage: synp [options]

Options:
  -V, --version                    output the version number
  -s, --source-file [source-file]  The path to the yarn.lock or package-lock.json to be converted
  -f, --force                      Force overwrite destination file
  --with-workspace                 Enable experimental npm lockfile v2 processing
  -h, --help                       display help for command

@mhruddick,

Good catch, thanks!

๐ŸŽ‰ This issue has been resolved in version 1.9.7 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€