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

package.json is re-parsed repeatedly #185

Open
wonnage opened this issue Mar 6, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@wonnage
Copy link

commented Mar 6, 2019

It seems like when we find a package.json we run it through JSON.parse every time:

var pkg = JSON.parse(body);

Seems like we could cache bodies we've seen before and avoid the re-parse in those cases. This would be especially helpful in a large repo with a single package.json.

@ljharb

This comment has been minimized.

Copy link
Member

commented Mar 6, 2019

There’s no guarantee that the file is unmodified between calls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.