sourcey / spectacle

Beautiful static documentation generator for OpenAPI/Swagger 2.0

Home Page:https://sourcey.com/spectacle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jordanmaguire opened this issue · comments

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

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"
  },

Looks to be resolved by #224

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