hexo
hexo copied to clipboard
refactor: replace url.resolve() with String.replace()
What does it do?
url.resolve()
is a legacy API, so it's best to avoid it if possible, String.replace()
is also 6x faster.
How to test
git clone -b resolve-path-string-replace https://github.com/curbengh/hexo.git
cd hexo
npm install
npm test
Screenshots
Pull request tasks
- [ ] Add test cases for the changes.
- [ ] Passed the CI test.
Coverage decreased (-0.0009%) to 98.294% when pulling 27384cc49139156c51056a9f7a611c02882c54b2 on curbengh:resolve-path-string-replace into 463025c9d21411570e56b15812eb319ea0883330 on hexojs:master.
Should we bring up a resolveURL
in hexo-util
?
How to test
git clone -b resolve-path-string-replace https://github.com/curbengh/hexo.git
cd hexo
npm install
npm test