Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 7 of commander has changed how options are parsed, causing options to have no effect in spectacle #217

Closed
jordanmaguire opened this issue Mar 3, 2021 · 2 comments

Comments

@jordanmaguire
Copy link

The latest major version of commander has changed how options are parsed:

https://github.com/tj/commander.js/blob/master/CHANGELOG.md#migration-tips

This is resulting in options being passed into spectacle having no effect.

EG:

When I run:

node_modules/spectacle-docs/bin/spectacle.js swagger/v1/swagger.yaml -t public/api_docs

The path does not change from the default (public).

This library has specified any version of commander as a dependency:

https://github.com/sourcey/spectacle/blob/master/package.json

I think there are two paths to resolving this:

  1. Specifying a requirement for less than version 7 of commander and not needing to change implementation code, or
  2. Specifying a requirement of at least version 7 of commander and updating the implementation code as per https://github.com/tj/commander.js/blob/master/CHANGELOG.md#migration-tips
@jordanmaguire
Copy link
Author

jordanmaguire commented Mar 3, 2021

I think this is yarn specific but you can work around this with a resolution in your package.json

  "resolutions": {
    "spectacle-docs/commander": "6.x.x"
  },

@jordanmaguire
Copy link
Author

Looks to be resolved by #224

yarn add 'spectacle-docs@https://github.com/sourcey/spectacle#3257da500b8a2483b6ad3356e50fe00b65bb6a6f' until there's a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant