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

wasm-pack should check if it's the latest version and warn if not #403

Closed
ashleygwilliams opened this issue Oct 9, 2018 · 4 comments
Closed
Labels
enhancement New feature or request feature request hacktoberfest PR attached there's a PR open for this issue to-do stuff that needs to happen, so plz do it k thx
Milestone

Comments

@ashleygwilliams
Copy link
Member

when you run build, wasm-pack should check and see what version is latest on crates.io and if the current installed version is latest. if not, it should suggest the user update.

@ashleygwilliams ashleygwilliams added enhancement New feature or request help wanted Extra attention is needed to-do stuff that needs to happen, so plz do it k thx feature request hacktoberfest labels Oct 9, 2018
@ashleygwilliams ashleygwilliams added this to the 0.6.0 milestone Oct 9, 2018
@daubaris
Copy link
Contributor

daubaris commented Oct 9, 2018

I would love to work on this one! Any tips? 😄

@daubaris
Copy link
Contributor

Also a questions, should the version of wasm-pack be hard-coded for now or would it better to fetch it from crates API?

@drager
Copy link
Member

drager commented Oct 10, 2018

@daubaris: Hey, I discussed this very briefly on IRC with @ashleygwilliams. One approach to this is to check the behavior of the npm client or yarn and see what they output for outdated packages. Npm outputs something like: "npm WARN ..." with a yellow background and black text. Yarn outputs something like: "warning ..." in yellow text. So maybe, the text could be something like: "warning (in yellow) ⚠️ There's a newer version of wasm-pack available, the new version is x.x.x and you're using version x.x.x".

Regarding the approach to this issue. I first had the idea of using something like hyper for this. Make a request to the crates api and fetch the latest version of the crate and then compare that to installed one. However, wasm-pack already depends on the curl crate so I think that's a better choice. So, use curl to fetch the latest version of the crate from the crates api and then compare that version with the locally installed one, then output a warning if there's a newer one available.

This is my understanding of the feature request, so anyone, please correct me if I'm wrong.

@ashleygwilliams ashleygwilliams added PR attached there's a PR open for this issue and removed help wanted Extra attention is needed labels Oct 14, 2018
@ashleygwilliams ashleygwilliams modified the milestones: 0.6.0, 0.7.0 Jan 11, 2019
@ashleygwilliams ashleygwilliams modified the milestones: 0.8.0, 0.9.0 Mar 30, 2019
@ashleygwilliams
Copy link
Member Author

closed by #409

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature request hacktoberfest PR attached there's a PR open for this issue to-do stuff that needs to happen, so plz do it k thx
Projects
None yet
Development

No branches or pull requests

3 participants