Skip to content

Update dependencies#435

Open
rugk wants to merge 11 commits intokakawait:masterfrom
rugk:updatedeps
Open

Update dependencies#435
rugk wants to merge 11 commits intokakawait:masterfrom
rugk:updatedeps

Conversation

@rugk
Copy link

@rugk rugk commented Jun 3, 2020

Staying conservative here...
(mostly to fix vulns)

Fixes #432

Trying to upgrade all deps failed because of nanoid. It likely has a breaking change.

> hugo-tranquilpeak-theme@0.4.8-BETA start C:\Temp\exampleSite\themes\tranquilpeak
> npm run grunt -- default


> hugo-tranquilpeak-theme@0.4.8-BETA grunt C:\Temp\exampleSite\themes\tranquilpeak
> node ./node_modules/grunt-cli/bin/grunt "default"

Loading "Gruntfile.js" tasks...ERROR
>> TypeError: nanoid is not a function
Warning: Task "default" not found. Use --force to continue.

It does not fix all in #432 mentioned deps. (seems it does not use all in the template example file)

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.min.css" integrity="sha256-vuXZ9LGmmwtjqFX1F+EKin1ThZMub58gKULUyf0qECk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/helpers/jquery.fancybox-thumbs.min.css" integrity="sha256-SEa4XYAHihTcEP1f5gARTB2K26Uk8PsndQYHQC1f4jU=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-2/css/v4-shims.min.css" integrity="sha256-WFzWWez6Hm5amJhqwXSEClOJrwBFY+rfgMzAPISIqBY=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha256-Vzbj7sDDS/woiFS3uNKo8eIuni59rjyNGtXfstRzStA=" crossorigin="anonymous">
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uups, one Font Awesome change slipped in here. Sorry.

Anyway: As far as I could find out/guess jquery.fancybox-thumbs is now included in jquery.fancybox. So there should be no regression.

@rugk
Copy link
Author

rugk commented Jun 3, 2020

Upgraded external scripts too and tested. Noticed no difference. (but I'm not sure whether I've tested the fancybox correctly)

Also Font Awesome is ugly to upgrade. As you need to adjust your site code.
I've included a shim, so people don't need to do that, but I'll leave it to your decicion whether you want to keep that.

I'd personally suggest site authors to follow
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4
or https://stackoverflow.com/q/41025192/5008962 to upgrade the icons.

rugk added 3 commits June 3, 2020 12:38
It'*s a breaking change, but the official upgrade guide does not really 
mention whether we need to change something: 
https://www.algolia.com/doc/api-client/getting-started/upgrade-guides/javascript/#upgrading-from-3351-to-4x
The upgrade guide is quite heavy, so I guess we need to revert this.

http://docs.mathjax.org/en/latest/upgrading/v2.html

[untested]

Also v3 is still in testing!!

Config converted with 
https://mathjax.github.io/MathJax-demos-web/convert-configuration/convert-configuration.html

Warning shown:
* The `CommonHTML.linebreaks` option is not yet implemented (but may be 
in a future release)

The config generator suggests to include 
`https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js` (likely 
replacing `TeX-AMS_CHTML-full`). I could not find this on CDNJS.
@rugk rugk mentioned this pull request Jun 3, 2020
@rugk
Copy link
Author

rugk commented Jun 3, 2020

Upgraded even more libraries. Please read the commit messages!. Especially MathJax to v3 is experimental and I could not test everything. (v2 is still stable, so personally I'd suggest to use that for now.)

It would be glad if other's could test the things, and possibly adjust them.

@rugk
Copy link
Author

rugk commented Jun 3, 2020

Also, as soon as I upgraded the JS config for MathJax to v3, EslInt shows a strange error:

Error while running ESLint: createRequire is not a function.

(createRequire is not used in the project)

Also this project desperately needs a CI...

@rugk
Copy link
Author

rugk commented Jun 3, 2020

BTW TL;DR read: Personally I'd guess upgrading/including all changes up to 7f5b028 is safe. Everything else needs more testing.

@kakawait
Copy link
Owner

kakawait commented Jun 3, 2020

thank you I'll read that asap

@kakawait kakawait self-assigned this Jun 3, 2020
@kakawait kakawait added this to the 0.5.0-BETA milestone Jun 3, 2020
@kakawait kakawait modified the milestones: 0.5.0-BETA, 0.5.1-BETA Jul 30, 2021
@kakawait kakawait mentioned this pull request Jul 31, 2021
1 task
@kakawait
Copy link
Owner

kakawait commented Aug 6, 2021

I've created a new MR #472 for update, since I've do not find time to review your for few months (years?)

But thank you much for your work.

I'll keep open because I've not updated MathJax

@kakawait kakawait modified the milestones: 0.5.0-BETA, 0.6.0-BETA Aug 6, 2021
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

Successfully merging this pull request may close these issues.

Update js libraries

2 participants