-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Lumos is a collection of packages that developers commonly use for developing dapps on CKB. It serves as a foundation for the spore-sdk and plays a significant role in managing cells and witnesses.
However, I sometimes encounter a dilemma. The spore-sdk lists lumos as a dependency in its package.json, but when lumos releases a new version, the spore-sdk doesn't automatically update to the latest version. It lags behind in this regard.
One potential solution is to move lumos from dependencies to peerDependencies. This allows developers to freely choose which version of lumos they want to use. However, this solution has a drawback: unlike dependencies, developers must manually specify and install peerDependencies into their dapp projects (as dependencies or devDependencies).
In conclusion:
- If specify in
dependencies:- Pro - Developers don't have to manually manage lumos in most cases
- Con - When lumos has a breaking update/fix, the spore-sdk must also release a new version
- If specify in
peerDependencies:- Pro - Developers can freely choose which version of lumos they want to use
- Con - Developers must manually specify and install lumos in their dapp projects