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

refactor: deprecate config.external_link as boolean #4376

Closed

Conversation

SukkaW
Copy link
Member

@SukkaW SukkaW commented Jun 23, 2020

What does it do?

config.external_link with boolean value is deprecated since Hexo 4.0.0. It is now removed.

How to test

git clone -b deprecate-external-link-filter-boolean https://github.com/sukkaw/hexo.git
cd hexo
npm install
npm test

Screenshots

Pull request tasks

  • Add test cases for the changes.
  • Passed the CI test.

@SukkaW SukkaW requested review from curbengh and a team June 23, 2020 09:49
stevenjoezhang
stevenjoezhang previously approved these changes Jun 23, 2020
Comment on lines 14 to 15
if (typeof config.external_link === 'boolean') {
throw new TypeError('config.external_link no longer supports Boolean value, changelog: https://github.com/hexojs/hexo/releases/');
Copy link
Contributor

@curbengh curbengh Jun 25, 2020

Choose a reason for hiding this comment

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

I think it would better to retain support for now but display a warning, so that the breaking change is not so sudden.
Since it will deprecated in v5, it's clearer to link directly to https://github.com/hexojs/hexo/releases/tag/5.0.0
Usage of config.use_date_for_updated should also display warning.

Copy link
Member Author

Choose a reason for hiding this comment

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

We already deprecate it in Hexo 4.0.0. So it is fine when we remove it in Hexo 5.0.0.

I will open another PR to add a warning for use_date_for_updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

We already deprecate it in Hexo 4.0.0.

That was the initial intention, however we forgot to mention it in the v4 release note. Can we soft-deprecate it this time?

Copy link
Member Author

Choose a reason for hiding this comment

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

@curbengh IMHO we could bring up a config validation.

@SukkaW SukkaW force-pushed the deprecate-external-link-filter-boolean branch from 6745f75 to 8ad6cf0 Compare June 25, 2020 05:54
@SukkaW
Copy link
Member Author

SukkaW commented Jun 27, 2020

#4381

@SukkaW SukkaW closed this Jun 27, 2020
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.

3 participants