-
Notifications
You must be signed in to change notification settings - Fork 26
feat: Update Libp2p to latest version. Add standalone bundled JS Client #239
Conversation
DXJ-26 Migration to libp2p v0.37.0
libp2p v0.37.0 switched to ESM instead of CommonJS. A decision is needed in order to process with migration
Release checklist:
|
DXJ-223 Reuse prettier.rc config across packages
It's better to create a package with it and reuse it everywhere inside pacakge.json instead of copypasting (it's really easy - just needs an entry in pcakages,json like this DXJ-214 Shared tsconfig file in JS Client packages DXJ-195 Implement Web JS Client bundling
We take Web distro for JS client and with the help of webpack\rollup\etc bundle the code into the single *.min.js bundle |
.npmrc
Outdated
@@ -1,2 +1,3 @@ | |||
auto-install-peers=true | |||
save-exact=true | |||
@fluencelabs:registry=https://npm.fluence.dev/ |
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.
why is this necessary? shouldn't it work with the default npm registry?
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 are waiting for the fix from machines team. Once it's get done we will switch to release version
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.
Fixed now!
@@ -0,0 +1,19 @@ | |||
{ |
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 package-lock.json necessary top-level? Because there is already a pnpm-lock.yaml here
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.
No, package-lock.json
isn't necessary at any level since we are using pnpm. The idea behind pacakge.json is to extract commonly used dev dependencies into a single place
// @ts-ignore | ||
globalThis.defaultPeer = makeDefaultPeer(); | ||
|
||
// TODO! remove |
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.
please do remove, or if this hack is still necessary - please add a task and link it here
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've updated the todo with more detailed info
// export const avmModuleLoader = new WasmNpmLoader('@fluencelabs/avm', 'avm.wasm'); | ||
|
||
export const controlModuleLoader = new WasmLoaderFromFs( | ||
'/home/pavel/work/fluence/fluence-js/node_modules/.pnpm/@[email protected]/node_modules/@fluencelabs/marine-js/dist/marine-js.wasm', |
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 not contain your local absolute path
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.
fixed
); | ||
|
||
export const avmModuleLoader = new WasmLoaderFromFs( | ||
'/home/pavel/work/fluence/fluence-js/node_modules/.pnpm/@[email protected]/node_modules/@fluencelabs/avm/dist/avm.wasm', |
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 too
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.
fixed as well
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.
Please checkout my minor comments. Thanks for the job!
Co-authored-by: shamsartem <[email protected]>
Co-authored-by: shamsartem <[email protected]>
Co-authored-by: shamsartem <[email protected]>
Co-authored-by: shamsartem <[email protected]>
Co-authored-by: shamsartem <[email protected]>
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.
Thanks! Hope the stuff gets finished in the tasks liked to TODOs
closes: DXJ-223, DXJ-26, DXJ-214, DXJ-195,