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

Fix js-yaml tags for v4.0.0+ #4869

Merged
merged 1 commit into from Jan 19, 2022
Merged

Conversation

marcofranssen
Copy link
Contributor

@marcofranssen marcofranssen commented Jan 13, 2022

Repair backwards compatibility https://github.com/nodeca/js-yaml/blob/master/migrate_v3_to_v4.md
with a bunch of plugins that use these yaml tags.

e.g.: https://github.com/lavas-project/hexo-pwa#options uses these yaml tags in the routes !!js/regexp

What does it do?

Fixes backwards compatibility for some plugins that make use of js-yaml tags.

This broke since the hexo 5.4.0 release that bumps js-yaml to v4.0.0.

See:
https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md#400---2021-01-03
and
https://github.com/nodeca/js-yaml/blob/master/migrate_v3_to_v4.md

for details.

⚠️ This fix is required for both the 5.x release as well the 6.x release.

SukkaW
SukkaW previously approved these changes Jan 14, 2022
Copy link
Member

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

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

That's a good catch!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0005%) to 98.097% when pulling 7808bec on marcofranssen:patch-1 into 4c4bd22 on hexojs:master.

Repair backwards compatibility https://github.com/nodeca/js-yaml/blob/master/migrate_v3_to_v4.md
with a bunch of plugins that use these yaml tags.

e.g.: https://github.com/lavas-project/hexo-pwa#options uses these yaml tags in the routes `!!js/regexp`
@github-actions
Copy link

How to test

git clone -b patch-1 https://github.com/hexojs/hexo.git
cd hexo
npm install
npm test

@jerryc127
Copy link

cool

@yoshinorin yoshinorin merged commit 62d7235 into hexojs:master Jan 19, 2022
@yoshinorin
Copy link
Member

@marcofranssen
Thank you :)

@marcofranssen
Copy link
Contributor Author

@yoshinorin a pleasure. When can we expect a patch for the 6.x and 5.4.x versions?

@marcofranssen marcofranssen deleted the patch-1 branch January 21, 2022 08:31
yoshinorin pushed a commit to yoshinorin/hexo that referenced this pull request Jan 22, 2022
Repair backwards compatibility https://github.com/nodeca/js-yaml/blob/master/migrate_v3_to_v4.md
with a bunch of plugins that use these yaml tags.

e.g.: https://github.com/lavas-project/hexo-pwa#options uses these yaml tags in the routes `!!js/regexp`
@yoshinorin
Copy link
Member

@marcofranssen
I'm going to publish 6.1.0 and 5.4.1 after merge #4877 and #4876 :)

yoshinorin added a commit that referenced this pull request Jan 22, 2022
Repair backwards compatibility https://github.com/nodeca/js-yaml/blob/master/migrate_v3_to_v4.md
with a bunch of plugins that use these yaml tags.

e.g.: https://github.com/lavas-project/hexo-pwa#options uses these yaml tags in the routes `!!js/regexp`

Co-authored-by: Marco Franssen <marco.franssen@gmail.com>
@yoshinorin
Copy link
Member

I just published 5.4.1.

https://www.npmjs.com/package/hexo

Regarding to 6.0.0, please wait a while.

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.

None yet

5 participants