This repository has been archived by the owner on Oct 16, 2022. It is now read-only.
chore(deps): change browser-process-hrtime to browser-hrtime #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When trying to use w3c-hr-time in Angular its crashes on
process is not defined
This happens because of how
browser-process-hrtime
check if process.hrtime defined.I tried to make some tests and I guess it depends on which bundler you are using, as it did work for me in browserify (probably they are emulating
process
variable). But Angular+webpack crashes. Didn't test it in React, but I think it will crash there too.browser-process-hrtime
looks like not maintained anymore (last commit was 2 years ago and open pull request from December 2018).So I created a similar package browser-hrtime that solves this problem (also add support for process.hrtime.bigint(), tests for browser, and in general made my best to make it good enough).
So I propose you to take a look, and of course here is a screenshot after fix:
I tried to google issues about it, actually didn't found much, but I think it still should be fixed :)
thenativeweb/measure-time#1
HubSpot/BuckyClient#23
jhuckaby/canvas-plus#5