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

Verify dist-tags key exists on object before querying range #1281

Closed
wants to merge 1 commit into from
Closed

Verify dist-tags key exists on object before querying range #1281

wants to merge 1 commit into from

Conversation

wyze
Copy link
Member

@wyze wyze commented Oct 20, 2016

Summary

This appears to fix quite a few similar, possibly duplicate issues (#953, #1186, #1241, #1259, #1266, #1274). They all throw a similar error in npm-resolver.js:

TypeError: Cannot use 'in' operator to search for '<range>' in undefined

This also seems like it could be a bandaid that would be masking a different problem. I unfortunately wasn't able to reproduce the issue myself. Even went as far as installing Windows 7 on VirtualBox and tried to reproduce.

Note

Also, it would be great to get some tests around the resolvers. I don't know much about Jest and snapshot testing and if it would be used for this. Any guidance in getting some tests in place would be awesome as well. Could even be done in a separate PR.

Test plan

No longer throw the TypeError listed above and have the install/add/upgrade command work as expected.

@wyze wyze mentioned this pull request Oct 21, 2016
@sebmck
Copy link
Contributor

sebmck commented Oct 24, 2016

Made redundant by #1356.

@sebmck sebmck closed this Oct 24, 2016
@wyze wyze deleted the dist-tags-check branch October 24, 2016 14:33
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.

None yet

2 participants