-
Notifications
You must be signed in to change notification settings - Fork 302
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 getVersion returning an undefined version #347
Conversation
Isn't the cause of the issue that they don't have Node >= 4? We've dependencies that require that now.
Hmm yeah I definitely thought this was ok. Are you on Node >= 4?
I could use GitHub releases which would do this for me 👍 |
I don't know what's happening on There are also a couple of deps that return a warning by npm and should be upgraded:
Or just set the tag locally and push it 😸 |
OK I might've jumped to a conclusion there. They're seeing I'm sorry but I'm finding it hard to see why this change is needed. The existing code should work fine right? From testing in my browser's DevTools, this returns [{version: 1},{version: 2}].find(function(obj){
if(obj.version === 3){
return obj;
}
}); Whereas this returns [{version: 1},{version: 2}].find(function(obj){
if(obj.version === 2){
return obj;
}
}); |
Well, I don't know exactly why it's not working correctly. I have just debugged this in production again. The callback in Btw, After calling When I change it to lodash's find method, it works. Even changing it to |
OK yeah I'm a bit perplexed. Sure update it to use |
8a44ee6
to
dd6b4ef
Compare
Just force-pushed the new commit. Should be good2go... I still don't know what's going on here. This must either be something nodejs related, one of the deps replacing |
Yeah, weird! Thanks anyway |
I found the cause of the issue of Although it's nw-builder unrelated, I still think the PR/merge was appropriate in order to solve this issue. |
OK |
Fixes #343
This also fixes an issue when defining non-existing versions. Using
0.1000.0
for instance doesn't return a proper error message right now, but instead fails with a "Cannot read property 'linux64' of undefined" error. I'm not sure why the non-existing versions test doesn't work correctly...Also, setting proper git tags for each release would be great, so they don't have to be referred by their commit id (either for comments here or for targeting a specific version with npm). 😃
Thanks!