-
Notifications
You must be signed in to change notification settings - Fork 64
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: fixed error finding refs in an object with a length property #129
fix: fixed error finding refs in an object with a length property #129
Conversation
@@ -64,7 +64,7 @@ | |||
"vinyl-source-stream": "~1.1.0" | |||
}, | |||
"dependencies": { | |||
"commander": "^2.11.0", | |||
"commander": "~2.11.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, commander 2.12 breaks two of your tests as it changes the way the output looks. It wasn't a trivial thing to fix, so I've pinned it to 2.11, and let you decide how you want to fix them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
Any update on this? |
Can we please merge this? It is causing bugs in our codebase as well. Thank you. |
Hello, any news on this? We are very keen to see this one fixed. Cheers! |
Do you know of any other places where |
I did a search of |
@whitlockjc the bug this PR is fixing is blocking my team, can we get it merged please? |
|
🎉 Thanks! |
Hi! we bumped into this error (our library depends on a third-party library that depends on json-refs).
json-refs fail to traverse through an object that contains a
length
property, because of a wrong usage of lodash (see this).We found the bug when objects like the following took a very long time to be processed:
The issue was on this line, lodash's
each
on an object likesomeObject
in the example above will invoke the callback 1000000 times with:instead of two times with:
as it assumes it is a collection because of the
length
property. To iterate key, values in an objectforOwn
should be used instead.