Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

feat: add class-is module #24

Merged
merged 2 commits into from
Oct 24, 2018
Merged

feat: add class-is module #24

merged 2 commits into from
Oct 24, 2018

Conversation

vasco-santos
Copy link
Member

The instance of fails when using different versions of a module. This way, we end up with problems using this in other places, such as js-ipfs/core/ipns/publisher.js#L93.

In the context of js-ipfs/issues/1615

@ghost ghost assigned vasco-santos Oct 4, 2018
@ghost ghost added the status/in-progress In progress label Oct 4, 2018
Copy link

@fsdiogo fsdiogo left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Copy link
Member

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

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

There are a number of occasions in this file where we're accessing the non-wrapped Key class:

These all need to be changed otherwise they create Key objects that don't have the '@ipfs/interface-datastore/key' symbol and so aren't considered to be instances of Key when used with Key.isKey.

@vasco-santos
Copy link
Member Author

@alanshaw just fixed your review. Thanks!

@daviddias
Copy link
Member

@pgte can you drive this merge and get it released?

@daviddias daviddias removed the request for review from lidel October 22, 2018 17:20
@pgte
Copy link
Contributor

pgte commented Oct 23, 2018

@vasco-santos could you please rebase from master?

Copy link
Contributor

@pgte pgte left a comment

Choose a reason for hiding this comment

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

LGTM

@vasco-santos
Copy link
Member Author

Rebased @pgte !

@pgte pgte merged commit 804a315 into master Oct 24, 2018
@ghost ghost removed the status/in-progress In progress label Oct 24, 2018
@pgte pgte deleted the feat/add-class-is-module branch October 24, 2018 13:20
@pgte
Copy link
Contributor

pgte commented Oct 24, 2018

Landed on v0.6.0.

alanshaw pushed a commit to ipfs/js-ipfs that referenced this pull request Oct 29, 2018
As `instance of` fails using different versions of a module, it was changed to use `class-is`.

Needs:

- [x] [js-peer-id#84](libp2p/js-peer-id#84)
- [x] [interface-datastore#24](ipfs/interface-datastore#24)

Fixes #1615
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants