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

add judgment on global.crypto #23

Merged
merged 2 commits into from
Mar 20, 2024
Merged

add judgment on global.crypto #23

merged 2 commits into from
Mar 20, 2024

Conversation

peng
Copy link
Collaborator

@peng peng commented Mar 17, 2024

PR Details

Fix #22

Description

Related Issue

fix #22

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

codecov bot commented Mar 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.65%. Comparing base (1bcf407) to head (c532a07).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #23      +/-   ##
==========================================
+ Coverage   98.47%   98.65%   +0.18%     
==========================================
  Files           1        1              
  Lines        3011     2604     -407     
==========================================
- Hits         2965     2569     -396     
+ Misses         35       24      -11     
  Partials       11       11              
Flag Coverage Δ
unittests 98.65% <ø> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xuri xuri added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 17, 2024
src/index.js Outdated
randomFillSync(b);
}
};
}
global.performance = {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to do this also for global.performance. Node.js already has performance.now(), so there should be no need to patch it in most cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good! Thanks for your advice!

Copy link
Owner

@xuri xuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contribution.

@xuri xuri merged commit 73e5c9d into xuri:main Mar 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does not run on Node 20+
3 participants