libp2p / js-peer-id

peer-id implementation in JavaScript. Deprecated; use https://github.com/libp2p/js-libp2p-peer-id instead.
https://github.com/libp2p/js-libp2p-peer-id
MIT License
80 stars 44 forks source link

feat: adds typescript types + type tests #110

Closed carsonfarmer closed 4 years ago

carsonfarmer commented 4 years ago

Depends on https://github.com/multiformats/js-cid/pull/102 for tests to run/work nicely, but this PR is already useful on its own if you don't want to use the tests in CI etc.

carsonfarmer commented 4 years ago

Keeping this as a draft for now, until multiformats/js-cid#102 is (hopefully merged and) released (tho this PR is already useful as is). If you'd rather not have these types in this repo, please let me know @vasco-santos, and I can PR them to definitelytyped instead.

carsonfarmer commented 4 years ago

See https://github.com/libp2p/js-libp2p-crypto/pull/161 for a discussion of the possible applications of these types for CI etc.

carsonfarmer commented 4 years ago

Type checking/tests could be added to CI by adding:

    - stage: types
      script:
        - npm run test:types
carsonfarmer commented 4 years ago

Awesome, any chance we could get a patch release once this is merged 🙏?

P.S. I will indeed ping you if/when I get a chance to update js-multicodec 👍.

hacdias commented 4 years ago

@carsonfarmer thanks. Pinging @vasco-santos since I don't have publish permissions here.

jacobheun commented 4 years ago

Released in 0.13.7.