-
Notifications
You must be signed in to change notification settings - Fork 79
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
Refactor IPFS cmds #951
Refactor IPFS cmds #951
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #951 +/- ##
===========================================
+ Coverage 22.62% 27.07% +4.44%
===========================================
Files 112 119 +7
Lines 2453 2471 +18
===========================================
+ Hits 555 669 +114
+ Misses 1898 1802 -96
Continue to review full report at Codecov.
|
Got you, #952 |
6530be3
to
98bb03a
Compare
} = argv | ||
|
||
await runStartTask({ | ||
const { processController } = await runStartTask({ |
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 would declare the tasks inside the handler directly. It would make the module shorter, and you won't need to pass a long list of arguments around.
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.
Hmm, good point!
Gonna take a look at how we use listr
and take this into consideration too. (In another PR)
@0x6431346e Clean neat PR good job! I've opened a PR against yours with a cosmetic improvement to avoid calling a logger multiple times and use template literals instead #973. If you believe the change is not relevant for now, please ignore it without hesitation. |
@dapplion @macor161 what do you guys think of this test setup? https://github.com/aragon/aragon-cli/blob/refactor/ipfs-cmds-2nd-try/packages/aragon-cli/scripts/setup-integration-tests.js We are using the CLI to test the CLI 😄 I think we can go a step further and run these processes on non-standard ports, to avoid conflicts. |
Yeah looks good! I don't see a problem with using the standard ports tho. |
I like that, it's going to be very useful for integration tests. For the problems with There are a few problems with test snapshots on my laptop. I will have another look tomorrow. |
I would be in favor of dropping support for node <10, but we should show a warning message after detecting the user's node version |
Makes sense, since support is ending soon and ipfs does not support node < 10, let's drop it. |
e20a4f8
to
c5e499c
Compare
Example output:
|
c5e499c
to
ded0e39
Compare
Yes but we must support versions >= 10 |
Just an example, the engine field has the correct value. |
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.
Amazing PR. Leave some points to address. Will also double check why I was not able to use commands even all test are passing
023a1f5
to
81d861b
Compare
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.
Amazing PR 🙌
🦅 Pull Request
2nd iteration of #912 where I fix the
--detached
flag.Next would be to add tests and check how others commands use the IPFS logic.
🚨 Test instructions
✔️ PR Todo
Imported issues from #952
ipfs data ✔️
There seems to be a problem with 'ipfs-http-client' code when running the test in node versions 8, and 9.
When inspecting the real error that throws:
Apparently the feature used and referenced above for-await...of is not compatible with
node < 10
.Does babel also transpile the node_module dependencies? Does ava transpile the code before testing?
Reported here: ipfs-inactive/js-ipfs-http-client#1190
ipfs daemon ✔️ :
There are two methods to start IPFS:
startDaemon
andstartIPFSDaemon
(which is not used by anyone). Is that an error?Also
isIPFSRunning
andisDaemonRunning
fulfill the same task but onlyisDaemonRunning
is used.8dc2c36#diff-831fb4c7e020ac556a769ecf3742aff5R28