Skip to content
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: dont override methods of created instance #394

Merged
merged 2 commits into from
Aug 1, 2019
Merged

Conversation

jacobheun
Copy link
Contributor

Promisify was being run on the libp2p instance methods in the constructor. A side effect of this, is that if you extend libp2p the instance methods are modified. This can create problems for anyone extending libp2p. This corrects that problem by promisifying the class instead of individual instances.

Ref: libp2p/js-libp2p-daemon#19 (comment)

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jacobheun jacobheun merged commit 3e95e6f into master Aug 1, 2019
@jacobheun jacobheun deleted the fix/promisify branch August 1, 2019 14:08
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alex Potsides <alex@achingbrain.net>
maschad pushed a commit to maschad/js-libp2p that referenced this pull request Jun 21, 2023
## [5.0.2](libp2p/js-libp2p-kad-dht@v5.0.1...v5.0.2) (2022-11-05)

### Dependencies

* bump it-all from 1.0.6 to 2.0.0 ([libp2p#389](libp2p/js-libp2p-kad-dht#389)) ([0596485](libp2p/js-libp2p-kad-dht@0596485))
* bump it-drain from 1.0.5 to 2.0.0 ([libp2p#390](libp2p/js-libp2p-kad-dht#390)) ([fdda357](libp2p/js-libp2p-kad-dht@fdda357))
* bump it-first from 1.0.7 to 2.0.0 ([libp2p#391](libp2p/js-libp2p-kad-dht#391)) ([681c24e](libp2p/js-libp2p-kad-dht@681c24e))
* bump it-length from 1.0.4 to 2.0.0 ([libp2p#394](libp2p/js-libp2p-kad-dht#394)) ([ae07736](libp2p/js-libp2p-kad-dht@ae07736))
* bump it-map from 1.0.6 to 2.0.0 ([libp2p#396](libp2p/js-libp2p-kad-dht#396)) ([ac5101c](libp2p/js-libp2p-kad-dht@ac5101c))
* bump it-merge from 1.0.4 to 2.0.0 ([libp2p#393](libp2p/js-libp2p-kad-dht#393)) ([1acb5f1](libp2p/js-libp2p-kad-dht@1acb5f1))
* bump it-parallel from 2.0.2 to 3.0.0 ([libp2p#392](libp2p/js-libp2p-kad-dht#392)) ([06a2c48](libp2p/js-libp2p-kad-dht@06a2c48))
* bump it-take from 1.0.2 to 2.0.0 ([libp2p#397](libp2p/js-libp2p-kad-dht#397)) ([4e909d2](libp2p/js-libp2p-kad-dht@4e909d2))
* **dev:** bump it-filter from 1.0.3 to 2.0.0 ([libp2p#395](libp2p/js-libp2p-kad-dht#395)) ([5668f9c](libp2p/js-libp2p-kad-dht@5668f9c))
* **dev:** bump it-last from 1.0.6 to 2.0.0 ([libp2p#388](libp2p/js-libp2p-kad-dht#388)) ([5b55239](libp2p/js-libp2p-kad-dht@5b55239))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants