-
Notifications
You must be signed in to change notification settings - Fork 43
fix: support node 16, feature detect performance API #19
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
Conversation
| if ( | ||
| perf && | ||
| perf.mark && | ||
| perf.getEntriesByName && |
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.
It's probably enough to stop after getEntriesByName. See https://developer.mozilla.org/en-US/docs/Web/API/Performance vs https://nodejs.org/api/perf_hooks.html
Another solution is to higher up and not try to bind to the performance global if the environment is Node.
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.
It's probably enough to stop after getEntriesByName. See https://developer.mozilla.org/en-US/docs/Web/API/Performance vs https://nodejs.org/api/perf_hooks.html
It's enough right now ;)
Another solution is to higher up and not try to bind to the performance global if the environment is Node.
Sure, I don't have a preference for how @nolanlawson would like to have it fixed so long as it is fixed :)
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.
It's enough right now ;)
It's a stable API on both sides, so there's no good reason it would change. But I can't say that checking for every method is wrong, either ;)
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.
I'm fine with checking for every single method. This ensure that some version of Node in the future or some other JS environment doesn't have a similar error. :)
|
Thanks a lot! |
|
Released in marky v1.2.2 |
|
Hurray! Thanks for the swift action and release here @nolanlawson :) |
fixes #18 or at least one possible solution :)