sourcey / spectacle

Beautiful static documentation generator for OpenAPI/Swagger 2.0
https://sourcey.com/spectacle
Other
1.28k stars 337 forks source link

Fix code bugs and update dependencies #224

Closed MatheusCamelucci closed 3 years ago

MatheusCamelucci commented 3 years ago

I believe this should solve this issues:

  1. cheerio function (1.0.0-rc.9 and up) as seen in #223
  2. commander options parse as seen in #217
  3. highlight.js (function parameters) and js-yaml (function call) latest versions
MatheusCamelucci commented 3 years ago

I think it is a good idea to consider dropping of support of node versions that are less than v12. I say that because some of spectacle dependencies are using only node v12 or higher.

tommyschnabel commented 3 years ago

+1, this branch works

dhaskew commented 3 years ago

+1, this branch works

waldyrious commented 3 years ago

I can confirm. For reference, here are the steps I used for testing:

  1. $ git clone https://github.com/sourcey/spectacle
  2. $ cd spectacle/
  3. $ git remote add MatheusCamelucci https://github.com/MatheusCamelucci/spectacle
  4. $ git fetch MatheusCamelucci
  5. $ git checkout fix/dependencies
  6. $ npm install

    npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I'll try to do my best with it!
    
    > node-sass@6.0.1 install /home/waldyrious/.local/src/spectacle/node_modules/node-sass
    > node scripts/install.js
    
    Downloading binary from https://github.com/sass/node-sass/releases/download/v6.0.1/linux-x64-83_binding.node
    Download complete  ] - :
    Binary saved to /home/waldyrious/.local/src/spectacle/node_modules/node-sass/vendor/linux-x64-83/binding.node
    Caching binary to /home/waldyrious/.npm/node-sass/6.0.1/linux-x64-83_binding.node
    
    > node-sass@6.0.1 postinstall /home/waldyrious/.local/src/spectacle/node_modules/node-sass
    > node scripts/build.js
    
    Binary found at /home/waldyrious/.local/src/spectacle/node_modules/node-sass/vendor/linux-x64-83/binding.node
    Testing binary
    Binary is fine
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    
    added 627 packages from 453 contributors and audited 630 packages in 12.531s
    
    44 packages are looking for funding
    run `npm fund` for details
    
    found 16 vulnerabilities (4 low, 1 moderate, 11 high)
    run `npm audit fix` to fix them, or `npm audit` for details
  7. $ bin/spectacle.js -d -l test/fixtures/cheese.png test/fixtures/cheese.yml

    Running "sass:foundation_scss" (sass) task
    
    Running "concat:foundation_css" (concat) task
    
    Running "sass:scss" (sass) task
    
    Running "concat:css" (concat) task
    
    Running "cssmin:minify" (cssmin) task
    >> 2 files created. 148 kB → 118 kB
    
    Running "concat:js" (concat) task
    
    Running "uglify:js" (uglify) task
    >> 1 file created 6.8 kB → 2.96 kB
    
    Running "copy:logo" (copy) task
    Copied 1 file
    
    Running "clean:html" (clean) task
    >> 1 path cleaned.
    
    Running "compile-handlebars:compile" (compile-handlebars) task
    
    Running "predentation" task
    
    Running "prettify:index" (prettify) task
    >> File "/home/waldyrious/.local/src/spectacle/public/index.html" prettified.
    
    Running "connect:server" (connect) task
    Started connect web server on http://localhost:4400
    
    Running "watch" task
    Waiting...
    ^C
  8. Open http://localhost:4400/ in the browser

(Note: this was using Node.js v14)

auscaster commented 3 years ago

Thanks for this, nice to get those deps updated :)