Skip to content

[@types/underscore] Collection and Array Tests - IndexOf, LastIndexOf, FindIndex, and FindLastIndex#46585

Merged
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
reubenrybnik:underscore-tests-indexOf-lastIndexOf-findIndex-findLastIndex
Aug 6, 2020
Merged

[@types/underscore] Collection and Array Tests - IndexOf, LastIndexOf, FindIndex, and FindLastIndex#46585
typescript-bot merged 1 commit intoDefinitelyTyped:masterfrom
reubenrybnik:underscore-tests-indexOf-lastIndexOf-findIndex-findLastIndex

Conversation

@reubenrybnik
Copy link
Copy Markdown
Contributor

  • 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://underscorejs.org/
  • Include tests for your changes

This PR continues the planned set that will together add up to #45201 and includes the following changes:

  • Adds tests for indexOf, lastIndexOf, findIndex, and findLastIndex.
  • Combines overloads of indexOf into a single overload.
  • Updates findIndex and findLastIndex to use Iteratee.
  • Fixes retursn in summary comments for UnderscoreStatic.object from a previous PR in the set.

This is the last PR in the Arrays family and the last PR in the set aside from cleanup.

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Author is Owner The author of this PR is a listed owner of the package. labels Aug 6, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Aug 6, 2020

@reubenrybnik Thank you for submitting this PR!

This is a live comment which I will keep updated.

Code Reviews

Because you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Most recent commit is approved by type definition owners or DT maintainers

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 46585,
  "author": "reubenrybnik",
  "owners": [
    "borisyankov",
    "jbaldwin",
    "ccurrens",
    "confususs",
    "jgonggrijp",
    "ffflorian",
    "regevbr",
    "peterblazejewicz",
    "reubenrybnik"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "ea2b166",
  "headCommitOid": "ea2b166aa9b2bf8b82f2ed6983de7a703690df77",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastPushDate": "2020-08-06T05:16:25.000Z",
  "lastCommentDate": "2020-08-06T21:34:08.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46585/files",
  "hasMergeConflict": false,
  "authorIsOwner": true,
  "isFirstContribution": false,
  "popularityLevel": "Popular",
  "anyPackageIsNew": false,
  "packages": [
    "underscore"
  ],
  "files": [
    {
      "path": "types/underscore/index.d.ts",
      "kind": "definition",
      "package": "underscore"
    },
    {
      "path": "types/underscore/underscore-tests.ts",
      "kind": "test",
      "package": "underscore"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-08-06T19:56:16.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Copy Markdown
Contributor

🔔 @borisyankov @jbaldwin @ccurrens @confususs @jgonggrijp @ffflorian @regevbr @peterblazejewicz — 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.

@typescript-bot
Copy link
Copy Markdown
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 #46585 diff
Batch compilation
Memory usage (MiB) 67.1 70.0 +4.3%
Type count 13612 14021 +3%
Assignability cache size 1677 1662 -1%
Language service
Samples taken 7868 8068 +3%
Identifiers in tests 7868 8068 +3%
getCompletionsAtPosition
    Mean duration (ms) 209.1 211.6 +1.2%
    Mean CV 6.3% 6.1%
    Worst duration (ms) 423.5 467.3 +10.3%
    Worst identifier resultUnionPartialMemoIterator _
getQuickInfoAtPosition
    Mean duration (ms) 203.8 206.4 +1.3%
    Mean CV 6.5% 6.3% -2.6%
    Worst duration (ms) 452.5 427.1 -5.6%
    Worst identifier extractChainTypes collect

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

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Aug 6, 2020
Copy link
Copy Markdown
Contributor

@jgonggrijp jgonggrijp left a comment

Choose a reason for hiding this comment

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

Clean! 👏

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Aug 6, 2020
@reubenrybnik
Copy link
Copy Markdown
Contributor Author

Thanks as always for the fast turnaround @jgonggrijp! Hope you're having or had a good time on your trip 😄

@reubenrybnik
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 201e4b7 into DefinitelyTyped:master Aug 6, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

I just published @types/underscore@1.10.19 to npm.

@jgonggrijp
Copy link
Copy Markdown
Contributor

@reubenrybnik trip?

@reubenrybnik
Copy link
Copy Markdown
Contributor Author

Sorry @jgonggrijp, I had assumed that when you left #46422 (comment) you were indicating that you were on a vacation or business trip that involved visiting Paris, which is why I had offered to slow down the pace of the PRs for a bit, but that may not have been a correct assumption.

@reubenrybnik
Copy link
Copy Markdown
Contributor Author

Also I suppose it may have been inappropriate to comment further on it even if that was what was happening.

@jgonggrijp
Copy link
Copy Markdown
Contributor

Oh, haha! No, I was not going on a trip but commenting on a typo in your commit message (pairs -> paris). I did that in a commit comment, but confusingly, it also appeared as a standalone comment in the PR, so I understand your reasoning.

Regardless, if I make a public comment that seems to suggest I'm going to make a trip, then of course you are free to comment on that in public as well. In my opinion, it would be a bit hypocritical of me to object to that.

@reubenrybnik
Copy link
Copy Markdown
Contributor Author

Oh, lol, good catch! I see now the notation that that comment was on a commit, so I'll know to watch out for that in the future 😄

danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020
…rray Tests - IndexOf, LastIndexOf, FindIndex, and FindLastIndex by @reubenrybnik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author is Owner The author of this PR is a listed owner of the package. Owner Approved A listed owner of this package signed off on the pull request. 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). Self Merge This PR can now be self-merged by the PR author or an owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants