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

chore: update deps to latest versions #70

Merged
merged 4 commits into from
Aug 15, 2020

Conversation

achingbrain
Copy link
Collaborator

I've tried to make the minimum amount of changes necessary for this, since the underlying crypto libraries only support node Buffers or BufferLists there doesn't seem a lot of point in doing lots of conversions between Uint8Arrays and Buffers.

BREAKING CHANGES:

  • All deps use Uint8Arrays in place of node Buffers

I've tried to make the minimum amount of changes necessary for this,
since the underlying crypto libraries only support node Buffers or
BufferLists there doesn't seem a lot of point in doing lots of
conversions between Uint8Arrays and Buffers.

BREAKING CHANGES:

- All deps use Uint8Arrays in place of node Buffers
@achingbrain
Copy link
Collaborator Author

cc @jacobheun @vasco-santos

package-lock.json Outdated Show resolved Hide resolved
@mpetrunic
Copy link
Member

mpetrunic commented Aug 12, 2020

@achingbrain Tnx for update 🙂

Did you intentionally leave Buffers in noise constructor?

@achingbrain
Copy link
Collaborator Author

achingbrain commented Aug 12, 2020

Did you intentionally leave Buffers in noise constructor?

Yes - the underlying bcrypto module is full of Buffer.isBuffer so you end up converting any Uint8Arrays to Buffers before passing them through.

I did originally try to remove Buffers entirely but it was a much more disruptive changeset and seemed like the wrong approach given you end up converting everything anyway.

@mpetrunic mpetrunic merged commit e20e4eb into ChainSafe:master Aug 15, 2020
@achingbrain
Copy link
Collaborator Author

@mpetrunic could this be released please?

@vasco-santos
Copy link
Collaborator

A note regarding releasing this. Please do not release it with latest tag.

While we do not have everything bubbled up to js-libp2p and js-libp2p released, we usually handle the breaking change releases by releasing it and set a beta tag for the release, keeping the latest as it was. We end up putting everything in latest at the same time to avoid people installing noise with this PR in js-libp2p until it is ready

@achingbrain
Copy link
Collaborator Author

@mpetrunic from the commit log it looks like you're gearing up to release this as 1.2.0 - this should really go out as 2.0.0 as the dep updates will cause multiple versions of the peer-id module to appear in people's dep trees, some of which require node Buffers and some of which require Uint8Arrays which may break things.

@mpetrunic
Copy link
Member

Oh, was not aware of that, tnx. i dont think release pipepline supports beta tags so I will have to release it manually anyways

@mpetrunic
Copy link
Member

https://www.npmjs.com/package/libp2p-noise/v/2.0.0-beta released with beta tag

@achingbrain
Copy link
Collaborator Author

achingbrain commented Aug 20, 2020

I think @vasco-santos meant to release it with a beta npm dist tag, rather than putting it in the version number, that way we don’t need to do follow-up PRs to dependant modules to remove the extra specifier, we can just switch the dist tag from beta to latest.

https://docs.npmjs.com/cli/dist-tag

@mpetrunic
Copy link
Member

mpetrunic commented Aug 20, 2020

Yes, there is also beta tag so you can use libp2p-noise@beta
image

EDIT: ah, I see

@achingbrain
Copy link
Collaborator Author

Ah, no, I meant 2.0.0 as beta, not 2.0.0-beta as beta, otherwise we have to re-PR to remove the -beta part of the version number. See how libp2p-tcp has done it, for example.

@vasco-santos
Copy link
Collaborator

Yeah, I meant as @achingbrain said. Sorry for not being specific enough.
We can update it by then now.

@mpetrunic
Copy link
Member

we have 2.0.0 now tagged with beta 🙂

@achingbrain
Copy link
Collaborator Author

Perfect, thank you!

@achingbrain achingbrain deleted the fix/update-deps branch August 24, 2020 09:57
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.

3 participants