-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: issues with using in ESM webui #356
Conversation
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.
self review
not needed once ipfs/ipld-explorer-components#356 is merged
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.
nits, but not blockers.
src/bundles/explore.js
Outdated
const formats = formatImports.map((actualModule) => { | ||
if (actualModule.util == null) { | ||
// actualModule has no util. using blockcodec-to-ipld-format | ||
return convert(actualModule) | ||
} | ||
return actualModule | ||
}) |
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.
can this convert
method handle if util
exists or not?
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.
it cannot, unfortunately. though it probably should do some assertion on the format and return untouched if it matches the expected format.
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.
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.
For consistency and lack of TS
* * https://github.com/ipld/js-blockcodec-to-ipld-format/blob/master/src/index.js#L38-L55 | ||
*/ | ||
options.resolve = (buf, path = '') => { | ||
let value = actualModule.decode(buf) |
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.
ugh, JS, does this need to be awaited?
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 don't believe so based on the modules i've seen
* feat!: ipfs-http-client -> kubo-rpc-client fix: error rendering peerId fix: peers table on peerspage fix: statusPage -> advanced -> addresses fix: most e2e tests working with kubo-rpc-client chore: update to go-ipfsv0.18.1 * chore: fix key.gen with patch needed until kubo-rpc-client fix is merged see ipfs/js-kubo-rpc-client#143 see ipfs/js-kubo-rpc-client#145 * fix: use ipld-explorer-components patch temporarily see https://github.com/ipfs/ipfs-webui/issues/2079\#issuecomment-1426219633 see #2079 (comment) must use until ipfs/ipld-explorer-components#356 * chore: fix ipld-explorer-components patch not needed once ipfs/ipld-explorer-components#356 is merged * test: add tests to explore.test.js * tmp: trying to navigate the undocumented world of parsing CIDs * chore: working on getting tests fully tied up * test(e2e): finish updating explore.test.js * chore: lint fixes * chore: remove debugging code * test: test clicking children links on explore page * tmp: fix children explore views * test: e2e explore test traverses children * Update test/e2e/explore.test.js Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com> * chore: address PR comments --------- Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
Co-authored-by: Nishant Arora <1895906+whizzzkid@users.noreply.github.com>
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!
closing this because #360 removes the need for this |
This PR addresses a few issues seen when using ipld-explorer-components in webui with kubo-rpc-client
see comments in ipfs/ipfs-webui#2079 for details