-
Notifications
You must be signed in to change notification settings - Fork 1.2k
refactor: async await roundup #2683
Conversation
|
While you're making these changes it'd be great if you could |
|
I did some reading on this and as far as I can tell https://git.wiki.kernel.org/index.php/GitFaq#Why_does_Git_not_.22track.22_renames.3F |
3b81e07 to
2fe568f
Compare
|
@jacobheun all the core interface tests are passing ( |
Yes, this is true. My point is that we’re losing history for these files due to the scale of the edits even though a bunch of the logic remains the same (eg. the bit you’d actually want to look through the history for, to find out why a thing is the way it is). It could be avoided if they renamed via git one way or another before the editing commenced. |
|
I think we can do this @achingbrain if we don't squash the commits on merge - thanks for bringing it up 💯 |
3ec242c to
61ae14f
Compare
61ae14f to
af678ae
Compare
|
superseded by #2726 |
A roundup of the following PRs:
To allow us to pass the interface tests, the timeout option is now supported in the
object.getandrefsAPIs. It doesn't actually cancel the operation all the way down the stack, but allows the method call to return when the timeout is reached.https://github.com/ipfs/js-ipfs/pull/2683/files#diff-47300e7ecd8989b6246221de88fc9a3cR170
Supersedes #2547
resolves #1438
resolves #1061
resolves #2257
resolves #2509
resolves #1670
refs ipfs-inactive/interface-js-ipfs-core#394
BREAKING CHANGE:
IPFS.createNoderemovedBREAKING CHANGE: IPFS is not a class that can be instantiated - use
IPFS.create. An IPFS node instance is not an event emitter.BREAKING CHANGE: Instance
.readyproperty removed. Please useIPFS.createinstead.BREAKING CHANGE: Callbacks are no longer supported on any API methods. Please use a utility such as
callbackifyon API methods that return Promises to emulate previous behaviour.BREAKING CHANGE:
PeerIdandPeerInfoclasses are no longer statically exported fromipfs-http-clientsince they are no longer used internally.BREAKING CHANGE:
pin.addresults now contain acidproperty (a CID instance) instead of a stringhashproperty.BREAKING CHANGE:
pin.lsnow returns an async iterable.BREAKING CHANGE:
pin.lsresults now contain acidproperty (a CID instance) instead of a stringhashproperty.BREAKING CHANGE:
pin.rmresults now contain acidproperty (a CID instance) instead of a stringhashproperty.BREAKING CHANGE:
addnow returns an async iterable.BREAKING CHANGE:
addresults now contain acidproperty (a CID instance) instead of a stringhashproperty.BREAKING CHANGE:
addReadableStream,addPullStreamhave been removed.BREAKING CHANGE:
lsnow returns an async iterable.BREAKING CHANGE:
lsresults now contain acidproperty (whose value is a CID instance) instead of ahashproperty.BREAKING CHANGE:
files.readPullStreamandfiles.readReadableStreamhave been removed.BREAKING CHANGE:
files.readnow returns an async iterable.BREAKING CHANGE:
files.lsPullStreamandfiles.lsReadableStreamhave been removed.BREAKING CHANGE:
files.lsnow returns an async iterable.BREAKING CHANGE:
files.lsresults now contain acidproperty (whose value is a CID instance) instead of ahashproperty.BREAKING CHANGE:
files.lsno longer takes alongoption (in core) - you will receive all data by default.BREAKING CHANGE:
files.statresult now contains acidproperty (whose value is a CID instance) instead of ahashproperty.BREAKING CHANGE:
getnow returns an async iterable. Thecontentproperty value for objects yielded from the iterator is now an async iterable that yieldsBufferListobjects.BREAKING CHANGE:
stats.bwnow returns an async iterable.BREAKING CHANGE:
addFromStreamhas been removed. Useaddinstead.BREAKING CHANGE:
addFromFshas been removed. Please use the exportedglobSourceutility and pass the result toadd. See the glob source documentation for more details and an example.BREAKING CHANGE:
addFromURLhas been removed. Please use the exportedurlSourceutility and pass the result toadd. See the URL source documentation for more details and an example.BREAKING CHANGE:
name.resolvenow returns an async iterable. It yields increasingly more accurate resolved values as they are discovered until the best value is selected from the quorum of 16. The "best" resolved value is the last item yielded from the iterator. If you are interested only in this best value you could useit-lastto extract it like so:BREAKING CHANGE:
block.rmnow returns an async iterable.BREAKING CHANGE:
block.rmnow yields objects of{ cid: CID, error: Error }.BREAKING CHANGE:
dht.findProvs,dht.provide,dht.putanddht.querynow all return an async iterable.BREAKING CHANGE:
dht.findPeer,dht.findProvs,dht.provide,dht.putanddht.querynow yield/return an object{ id: CID, addrs: Multiaddr[] }instead of aPeerInfoinstance(s).BREAKING CHANGE:
refsandrefs.localnow return an async iterable.BREAKING CHANGE:
object.datanow returns an async iterable that yieldsBufferobjects.BREAKING CHANGE:
pingnow returns an async iterable.BREAKING CHANGE:
repo.gcnow returns an async iterable.BREAKING CHANGE:
swarm.peersnow returns an array of objects with apeerproperty that is aCID, instead of aPeerIdinstance.BREAKING CHANGE:
swarm.addrsnow returns an array of objects{ id: CID, addrs: Multiaddr[] }instead ofPeerInfoinstances.BREAKING CHANGE:
block.statresult now contains acidproperty (whose value is a CID instance) instead of akeyproperty.BREAKING CHANGE:
bitswap.wantlistnow returns an array of CID instances.BREAKING CHANGE:
bitswap.statresult has changed -wantlistandpeersvalues are now an array of CID instances.BREAKING CHANGE: the
initoption passed to the IPFS constructor will now not take any initialization steps if it is set tofalse. Previously, the repo would be initialized if it already existed. This is no longer the case. If you wish to initialize a node but only if the repo exists, passinit: { allowNew: false }to the constructor.BREAKING CHANGE: removed
file lscommand from the CLI and HTTP API.BREAKING CHANGE: Delegated peer and content routing modules are no longer included as part of core (but are still available if starting a js-ipfs daemon from the command line). If you wish to use delegated routing and are creating your node programmatically in Node.js or the browser you must
npm install libp2p-delegated-content-routingand/ornpm install libp2p-delegated-peer-routingand provide configured instances of them inoptions.libp2p. See the module repos for further instructions: