chore(deps): use cuid2 instead of cuid#147
Conversation
|
Hmm... We have to fix |
|
I can't reproduce TS2362 & TS2322 errors locally... |
|
Blocked by: #148 |
e675601 to
d55c08d
Compare
|
Ready |
Yes. We can suspend migrating from Thanks |
Also ideally, we should consider migrating to a more performant id generation (instead of sticking with the Let's run a benchmark on cuid, cuid2, https://www.npmjs.com/package/uid, and https://www.npmjs.com/package/nanoid, so we can find out the fastest one. |
|
a simple benchmark with https://github.com/ai/nanoid/blob/main/test/benchmark.js |
|
Considering their performance and maintenance (update frequency), I think nanoid is a good alternative option. I will attempt to migrate to it. Superseded by #244 |
Why
https://github.com/paralleldrive/cuid has been deprecated and we have to use https://github.com/paralleldrive/cuid2 instead.
Breaking change?
I assume
warehouseusescuidto generate post id. So, all of the post ids indb.jsonwill be changed if we merge this PR. I think the posts ids are not on the premise that permanently stored (If hexo has to store ids permanently, should use RDB). But this change may be a breaking change for some users if they are using any plugin and it depends on that premise.Closes: #146