X Tutup
Skip to content

keygrip: Use ReadonlyArray for keys#41152

Merged
andrewbranch merged 1 commit intoDefinitelyTyped:masterfrom
EvanHahn:use_readonly_array_for_keygrip_keys
Dec 26, 2019
Merged

keygrip: Use ReadonlyArray for keys#41152
andrewbranch merged 1 commit intoDefinitelyTyped:masterfrom
EvanHahn:use_readonly_array_for_keygrip_keys

Conversation

@EvanHahn
Copy link
Contributor

@EvanHahn EvanHahn commented Dec 19, 2019

keygrip doesn't modify the keys argument, so I marked it as ReadonlyArray.

I also improved the tests.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).
  • Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/crypto-utils/keygrip/blob/master/index.js

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #41152 diff
Batch compilation
Memory usage (MiB) 32.4 32.5 +0.3%
Type count 2146 2161 +1%
Assignability cache size 111 111 0%
Language service
Samples taken 6 17 +183%
Identifiers in tests 6 17 +183%
getCompletionsAtPosition
    Mean duration (ms) 81.5 70.2 -13.8%
    Mean CV 24.4% 24.9%
    Worst duration (ms) 101.0 83.7 -17.2%
    Worst identifier sign verify
getQuickInfoAtPosition
    Mean duration (ms) 79.3 68.3 -13.9%
    Mean CV 23.6% 18.8% -20.2%
    Worst duration (ms) 94.1 78.2 -16.9%
    Worst identifier Keygrip index

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts). Awaiting reviewer feedback labels Dec 19, 2019
@typescript-bot
Copy link
Contributor

typescript-bot commented Dec 19, 2019

@EvanHahn Thank you for submitting this PR!

🔔 @jkeylu - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot typescript-bot added the Unmerged The author did not merge the PR when it was ready. label Dec 24, 2019
@typescript-bot
Copy link
Contributor

After 5 days, no one has reviewed the PR 😞. A maintainer will be reviewing the PR in the next few days and will either merge it or request revisions. Thank you for your patience!

@andrewbranch andrewbranch merged commit 412096e into DefinitelyTyped:master Dec 26, 2019
@typescript-bot
Copy link
Contributor

I just published @types/keygrip@1.0.2 to npm.

@EvanHahn EvanHahn deleted the use_readonly_array_for_keygrip_keys branch January 2, 2020 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts). Unmerged The author did not merge the PR when it was ready.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup