Conversation
This PR also updates aegir and others deps.
There was a problem hiding this comment.
Almost done, left a few comments for final details and we need to decide if we want to do a breaking change or not here, in the toOptions return type
Also, probably worth flag that we should add to the release notes a notice for deprecation of the factory to already give a heads up to users
README.md
Outdated
| > const multiaddr = require('multiaddr') | ||
| > const { multiaddr } = require('multiaddr') | ||
|
|
||
| > const addr = multiaddr("/ip4/127.0.0.1/udp/1234") |
There was a problem hiding this comment.
| > const addr = multiaddr("/ip4/127.0.0.1/udp/1234") | |
| > const addr = new Multiaddr("/ip4/127.0.0.1/udp/1234") |
There was a problem hiding this comment.
there a factory method exported
There was a problem hiding this comment.
yes, but all the other code examples in jsdocs are with the constructor, why having these different? I also thought we were going to migrate into using the class instance in the future
There was a problem hiding this comment.
the factory method returns an instance, its just an helper i will add an example of both
README.md
Outdated
| $ node | ||
|
|
||
| > const multiaddr = require('multiaddr') | ||
| > const { multiaddr } = require('multiaddr') |
There was a problem hiding this comment.
| > const { multiaddr } = require('multiaddr') | |
| > const { Multiaddr } = require('multiaddr') |
There was a problem hiding this comment.
theres a factory method exported
There was a problem hiding this comment.
yes, but all the other code examples in jsdocs are with the constructor, why having these different? I also thought we were going to migrate into using the class instance in the future
| /** @type {MultiaddrObject} */ | ||
| const opts = {} | ||
| const parsed = this.toString().split('/') | ||
| opts.family = parsed[1] === 'ip4' ? 4 : 6 |
There was a problem hiding this comment.
This will mean a breaking change
There was a problem hiding this comment.
can you add a breaking change message to the commit?
There was a problem hiding this comment.
I am thinking if we really want to make a breaking change just for this change and removing the resolve static function. This will mean we need to update all the modules. What do you think?
There was a problem hiding this comment.
its a breaking change already because the exports changed right ?
|
@hugomrdias can you look into the CI? |
|
update the readme usage example with the factory function, remove the |
vasco-santos
left a comment
There was a problem hiding this comment.
LGTM
The webworker tests have an issue though
|
We have an issue on firefox worker still. Can you check it? |
|
Is there any chance the Firefox problem was related to the one @achingbrain had with js-ipfs which forced him to disable it? I think it was with webworkers running twice there but the output doesn't seem to suggest the same here (although there isn't much useful output, just a timeout). |
No, i already fixed this just need to release pw-test. Double output should still happen though. |
This PR adds types, updates aegir and others deps.
BREAKING CHANGES:
toOptionsoutput changed to match nodefromNodeAddressandnodeAddressinputs/outputs now matchcloses #160
closes #159