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: refactor types #5271

Merged
merged 8 commits into from Oct 31, 2023
Merged

refactor: refactor types #5271

merged 8 commits into from Oct 31, 2023

Conversation

D-Sketon
Copy link
Member

What does it do?

Screenshots

Pull request tasks

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

@github-actions
Copy link

How to test

git clone -b v7.0.0_7 https://github.com/D-Sketon/hexo.git
cd hexo
npm install
npm test

@coveralls
Copy link

coveralls commented Aug 19, 2023

Pull Request Test Coverage Report for Build 6655790130

  • 502 of 503 (99.8%) changed or added relevant lines in 119 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 99.535%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/plugins/helper/format.ts 0 1 0.0%
Totals Coverage Status
Change from base Build 6654591373: 0.006%
Covered Lines: 8997
Relevant Lines: 9039

💛 - Coveralls

stevenjoezhang
stevenjoezhang previously approved these changes Aug 23, 2023
lib/box/file.ts Outdated Show resolved Hide resolved
lib/box/index.ts Outdated Show resolved Hide resolved
lib/box/index.ts Outdated Show resolved Hide resolved
lib/extend/tag.ts Outdated Show resolved Hide resolved
lib/hexo/index.ts Outdated Show resolved Hide resolved
lib/hexo/post.ts Outdated Show resolved Hide resolved
lib/hexo/post.ts Outdated Show resolved Hide resolved
lib/hexo/scaffold.ts Outdated Show resolved Hide resolved
lib/hexo/scaffold.ts Outdated Show resolved Hide resolved
lib/hexo/scaffold.ts Outdated Show resolved Hide resolved
lib/box/index.ts Outdated Show resolved Hide resolved
lib/box/file.ts Outdated Show resolved Hide resolved
@SukkaW SukkaW mentioned this pull request Oct 23, 2023
2 tasks
@uiolee uiolee added this to the 7.0.0 milestone Oct 23, 2023
@D-Sketon D-Sketon requested a review from SukkaW October 23, 2023 14:13
@D-Sketon
Copy link
Member Author

There are still many types that are any and we need more work after the v7.0.0 release

@stevenjoezhang stevenjoezhang changed the base branch from v7.0.0 to master October 25, 2023 05:02
@stevenjoezhang stevenjoezhang dismissed their stale review October 25, 2023 05:02

The base branch was changed.

@D-Sketon
Copy link
Member Author

maybe we should refactor the type of warehouse first......

SukkaW
SukkaW previously approved these changes Oct 26, 2023
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.

LGTM now. We can always refine the type later.

@D-Sketon D-Sketon dismissed SukkaW’s stale review October 26, 2023 14:03

The merge-base changed after approval.

@yoshinorin yoshinorin mentioned this pull request Oct 26, 2023
2 tasks
@D-Sketon
Copy link
Member Author

The rebase is done. You can merge at any time.😎

SukkaW
SukkaW previously approved these changes Oct 27, 2023
@@ -61,7 +61,7 @@ function timeTagHelper(date: string | number | Date | moment.Moment, format: str
return `<time datetime="${toISOString(date)}">${this.date(date, format, getLanguage(this), config.timezone)}</time>`;
}

function getLanguage(ctx: Hexo) {
function getLanguage(ctx) {
Copy link
Member Author

Choose a reason for hiding this comment

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

ctx is not Hexo but Locals with helpers

@uiolee uiolee linked an issue Oct 29, 2023 that may be closed by this pull request
@uiolee uiolee merged commit b898f29 into hexojs:master Oct 31, 2023
16 of 20 checks passed
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.

hexo build failed due to type issue
6 participants