-
Notifications
You must be signed in to change notification settings - Fork 15
Modularization #46
base: master
Are you sure you want to change the base?
Modularization #46
Conversation
I like this structure generally. It's clean and keeps the validation part as one complete package. The main problem with this is that we use it in the Would love some more indepth thoughts on the changes @zachferland @PaulLeCam What do we think about pnpm? |
Here is a PR in ceramic that could potentially mitigate the issue mentioned above: ceramicnetwork/js-ceramic#668 |
Naaa-a-ah! Found the solution. Easier, but a bit weird. |
This: #47 solves the trouble. Runs all right in browser with no zondax installed. The same trick could be done to Polkadot and EOSio in order to reduce the resulting web package. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'm not familiar with the specifics so my comments are just about the setup.
Maybe we should discuss the use of pnpm a bit more, I've never used it before so I don't know the pros and cons compared to alternatives.
Overall though it would be good to unify the tools we're using. npm v7 supports workspaces so maybe it's something we could try out first to avoid adding pnpm to our tools unless strictly necessary?
|
||
## Install | ||
|
||
``` | ||
$ npm install --save 3id-blockchain-utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should change no?
packages/validation/package.json
Outdated
}, | ||
"author": "oed", | ||
"license": "(Apache-2.0 OR MIT)", | ||
"dependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we split this package into one package for each blockchain so we can make the dependencies more manageable?
- [validate](#validation) the link. | ||
|
||
Due to asymmetry in dependencies - linking is light weigth, while validation requires quite heavy code - and target use cases, | ||
the package is divided into two: namely `@3id-blockchain-utils/linking` and `@3id-blockchain-utils/validation`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the namespace we want to use rather than @ceramicnetwork
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use @ceramicnetwork/blockchain-linking
and @ceramicnetwork/blockchain-validation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks like a good start!
- [validate](#validation) the link. | ||
|
||
Due to asymmetry in dependencies - linking is light weigth, while validation requires quite heavy code - and target use cases, | ||
the package is divided into two: namely `@3id-blockchain-utils/linking` and `@3id-blockchain-utils/validation`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use @ceramicnetwork/blockchain-linking
and @ceramicnetwork/blockchain-validation
Really, Jest tries to use fancy Node API that is experimental in Node v14. So, we enable this.
@oed Here it is. |
Divide the package into linking (light) and validation (heavy) subpackages.
Beware: