Skip to content

Commit

Permalink
refactor: update changelog link for deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Jun 25, 2020
1 parent 06a2993 commit 8ad6cf0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/plugins/filter/after_post_render/external_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function externalLinkFilter(data) {
if (typeof EXTERNAL_LINK_POST_CONFIG === 'undefined') {
// Deprecated: config.external_link no longer support boolean
if (typeof config.external_link === 'boolean') {
throw new TypeError('config.external_link no longer supports Boolean value, changelog: https://github.com/hexojs/hexo/releases/');
throw new TypeError('config.external_link no longer supports Boolean value. Changelog: https://github.com/hexojs/hexo/releases/tag/5.0.0');
}

EXTERNAL_LINK_POST_CONFIG = Object.assign({
Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/filter/after_render/external_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function externalLinkFilter(data) {
if (typeof EXTERNAL_LINK_SITE_CONFIG === 'undefined') {
// Deprecated: config.external_link no longer support boolean
if (typeof config.external_link === 'boolean') {
throw new TypeError('config.external_link no longer supports Boolean value, changelog: https://github.com/hexojs/hexo/releases/');
throw new TypeError('config.external_link no longer supports Boolean value. Changelog: https://github.com/hexojs/hexo/releases/tag/5.0.0');
}

EXTERNAL_LINK_SITE_CONFIG = Object.assign({
Expand Down
6 changes: 3 additions & 3 deletions test/scripts/filters/external_link.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ describe('External link', () => {
externalLink(content);
} catch (err) {
err.name.should.eql('TypeError');
err.message.should.eql('config.external_link no longer supports Boolean value, changelog: https://github.com/hexojs/hexo/releases/');
err.message.should.eql('config.external_link no longer supports Boolean value. Changelog: https://github.com/hexojs/hexo/releases/tag/5.0.0');
}

hexo.config.external_link = {
Expand All @@ -125,7 +125,7 @@ describe('External link', () => {
externalLink(content);
} catch (err) {
err.name.should.eql('TypeError');
err.message.should.eql('config.external_link no longer supports Boolean value, changelog: https://github.com/hexojs/hexo/releases/');
err.message.should.eql('config.external_link no longer supports Boolean value. Changelog: https://github.com/hexojs/hexo/releases/tag/5.0.0');
}

hexo.config.external_link = {
Expand Down Expand Up @@ -293,7 +293,7 @@ describe('External link - post', () => {
externalLink(data);
} catch (err) {
err.name.should.eql('TypeError');
err.message.should.eql('config.external_link no longer supports Boolean value, changelog: https://github.com/hexojs/hexo/releases/');
err.message.should.eql('config.external_link no longer supports Boolean value. Changelog: https://github.com/hexojs/hexo/releases/tag/5.0.0');
}

hexo.config.external_link = {
Expand Down

0 comments on commit 8ad6cf0

Please sign in to comment.