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

chore(deps): support hexo 4.2.0 (#22) #23

Merged
merged 2 commits into from
Dec 25, 2019

Conversation

yoshinorin
Copy link
Contributor

@yoshinorin yoshinorin commented Dec 24, 2019

Description

fixes: #22

In hexo 4.2.0 Locals class use hexo-util. Please see followings:

hexojs/hexo#3996
hexojs/hexo@c6e6e6b#diff-8706ed85bcc456bc4bd99698f3cb949dR7

Fix

hexo.locals.cache to hexo.locals.cache.cache

Others

  • I add engines option to package.json. Because current hexo support +8.10.0
  • I test only related post feature.

Thank you :)

@coveralls
Copy link

Coverage Status

Coverage remained the same at 78.947% when pulling f422b7c on YoshinoriN:hexo4.2.0-support into 5f782be on tea3:master.

@yoshinorin
Copy link
Contributor Author

yoshinorin commented Dec 24, 2019

At first glance, on my local machine works well.
But, the performance problem occurred.

Browser reload is very slow when post file change...

@tea3 tea3 merged commit 20be9ca into tea3:master Dec 25, 2019
@SukkaW
Copy link

SukkaW commented Dec 25, 2019

@yoshinorin Locals.cache.cache should be considered a private API. We could add a dump() in Hexo 4.3.0, so that we will have a consistent API.

According to Hexo API's documents, there is already a method called toObject(). The plugin should use Locals.toObject() for consistency. And cache for toObject() should be handled by plugin itself.

@yoshinorin
Copy link
Contributor Author

@SukkaW
Thank you :) I will check it later.

pplmx referenced this pull request in lavas-project/hexo-pwa Mar 23, 2020
* Fix post sorting so latest posts are precached

* Format code and add prettierrc config

* Update sw-toolbox to latest version
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.

TypeError: Cannot read property 'length' of undefined
4 participants