sourcey / spectacle

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

Fix installation and security issues #235

Open MatheusCamelucci opened 6 months ago

MatheusCamelucci commented 6 months ago

Hi everyone!

This PR should fix the issues below:

  1. Installation fails due the "node-sass" deprecated version, as seen in #234
  2. Updated jQuery to latest version and replaced the old links with the Cloudflare CDN ones, as seen in #228

Other changes and improvements:

  1. NodeJS support changed from v8 to v18
  2. Updated Foundation to one of the latest versions (v6.7.5)
  3. Fixed some code issues with the "marked" and "highlight.js" libraries due to my last PR in 2021, as seen in #224
    • See e2165fd for more details, where line 51 of "app/lib/common.js" returns undefined due the "marked" update in 0802dec

With these updates I think we could add some extra lifetime to Spectacle, but I would like to warn about some points:

  1. Some libraries, like "chai", started to support only EcmaScript Modules (ESM) and this can be a problem since Spectacle uses the old CommonJS Modules
  2. Foundation is another library that I could not update to latest version due the incompatibility, I needed to manually "fix" the source code so it can be compatible with the latest version of jQuery

๐Ÿงช The code passed in all tests โœ…

Sorry if my text have some grammatical mistakes

๐Ÿš€ Greetings from Brazil! ๐Ÿ‡ง๐Ÿ‡ท ๐ŸŽ‰ Happy 2024! ๐ŸŽ‰