Skip to content

[@types/underscore] Collection and Array Tests - Without, Uniq, and SortedIndex#46068

Merged
typescript-bot merged 3 commits intoDefinitelyTyped:masterfrom
reubenrybnik:underscore-tests-without-uniq-sortedIndex
Jul 15, 2020
Merged

[@types/underscore] Collection and Array Tests - Without, Uniq, and SortedIndex#46068
typescript-bot merged 3 commits intoDefinitelyTyped:masterfrom
reubenrybnik:underscore-tests-without-uniq-sortedIndex

Conversation

@reubenrybnik
Copy link
Copy Markdown
Contributor

@reubenrybnik reubenrybnik commented Jul 14, 2020

  • 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:

@typescript-bot typescript-bot added Where is GH Actions? GH Actions didn't give a response to this PR 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 Jul 14, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Jul 14, 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": 46068,
  "author": "reubenrybnik",
  "owners": [
    "borisyankov",
    "jbaldwin",
    "ccurrens",
    "confususs",
    "jgonggrijp",
    "ffflorian",
    "regevbr",
    "peterblazejewicz",
    "reubenrybnik"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "1ef7c58",
  "headCommitOid": "1ef7c589e1bbefbc057d10451a5b47995ac205d0",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastPushDate": "2020-07-15T08:59:48.000Z",
  "lastCommentDate": "2020-07-15T15:33:27.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46068/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-07-15T15:20:38.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 typescript-bot removed the Where is GH Actions? GH Actions didn't give a response to this PR label Jul 14, 2020
@reubenrybnik
Copy link
Copy Markdown
Contributor Author

I thought it would be nice to start in on arrays a bit in parallel with collections. I'll keep it down to only having at most two open PRs at any given time, though.

@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 #46068 diff
Batch compilation
Memory usage (MiB) 56.3 58.5 +3.9%
Type count 9635 9948 +3%
Assignability cache size 1493 1493 0%
Language service
Samples taken 4106 4505 +10%
Identifiers in tests 4106 4505 +10%
getCompletionsAtPosition
    Mean duration (ms) 165.8 149.5 -9.8%
    Mean CV 13.9% 14.0%
    Worst duration (ms) 314.7 291.2 -7.5%
    Worst identifier _ _
getQuickInfoAtPosition
    Mean duration (ms) 159.3 144.0 -9.6%
    Mean CV 14.1% 14.3% +1.4%
    Worst duration (ms) 333.3 292.4 -12.2%
    Worst identifier extractUnderscoreTypes extractChainTypes

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 Jul 14, 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.

I'm fine with you submitting two PRs in parallel, as long as you keep in mind that I'll be reviewing them serially. ;-)

I'm fine with the changes as they are, although I think it would make sense to add some matcher tests for uniq and sortedIndex.

The typings look perfectly correct to me. 👍

@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 and removed Self Merge This PR can now be self-merged by the PR author or an owner Owner Approved A listed owner of this package signed off on the pull request. labels Jul 14, 2020
@typescript-bot
Copy link
Copy Markdown
Contributor

@jgonggrijp Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review?

@reubenrybnik
Copy link
Copy Markdown
Contributor Author

reubenrybnik commented Jul 15, 2020

I'm done making updates here @jgonggrijp if you wouldn't mind taking one more look and (hopefully) reapproving whenever you get a chance. Thanks for the feedback!

These changes don't result in any new errors in my company's solution (and they fix several errors by updating _Chain.uniq to use the correct wrapped result type since we have several chains that end in a uniq call).

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.

Nice work!

@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 Jul 15, 2020
@reubenrybnik
Copy link
Copy Markdown
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 10daadd into DefinitelyTyped:master Jul 15, 2020
danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020
…rray Tests - Without, Uniq, and SortedIndex by @reubenrybnik

* Updating type definitions for without, uniq, and sortedIndex and adding tests.

* Updating summary comments for updated functions to be less than 80 characters long and adding a lowest index distinction to sortedIndex summary comments.

* Adding matcher iteratee tests for uniq and sortedIndex.
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.

@types/underscore error TS2322 for _.chain after upgrade to v1.9

3 participants