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

fix(react-router): Fix bad path parameters type when params have constraints #52712

Merged
merged 1 commit into from May 5, 2021
Merged

fix(react-router): Fix bad path parameters type when params have constraints #52712

merged 1 commit into from May 5, 2021

Conversation

lmichelin
Copy link
Contributor

Fixes #51604.

Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.

@typescript-bot
Copy link
Contributor

typescript-bot commented May 2, 2021

@lmichelin Thank you for submitting this PR!

This is a live comment which I will keep updated.

1 package in this PR

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": 52712,
  "author": "lmichelin",
  "headCommitOid": "334dd102aac80bea4ac2a94dfff8d396eb2420bb",
  "lastPushDate": "2021-05-02T21:37:15.000Z",
  "lastActivityDate": "2021-05-05T07:55:52.000Z",
  "maintainerBlessed": true,
  "mergeOfferDate": "2021-05-04T22:10:21.000Z",
  "mergeRequestDate": "2021-05-05T07:55:52.000Z",
  "mergeRequestUser": "lmichelin",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "tooManyFiles": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "react-router",
      "kind": "edit",
      "files": [
        {
          "path": "types/react-router/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/react-router/test/generatePath.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "sergey-buturlakin",
        "mrk21",
        "vasek17",
        "ngbrown",
        "awendland",
        "KostyaEsmukov",
        "johnnyreilly",
        "LKay",
        "DovydasNavickas",
        "huy-nguyen",
        "grmiade",
        "DaIgeb",
        "egorshulga",
        "rraina",
        "t49tran",
        "8enSmith",
        "wezleytsai",
        "eps1lon",
        "HipsterBrown",
        "pawfa"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "eps1lon",
      "date": "2021-05-03T04:51:40.000Z",
      "isMaintainer": false
    }
  ],
  "ciResult": "pass"
}

@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board May 2, 2021
@typescript-bot
Copy link
Contributor

🔔 @sergey-buturlakin @mrk21 @vasek17 @ngbrown @awendland @KostyaEsmukov @johnnyreilly @LKay @DovydasNavickas @huy-nguyen @Grmiade @DaIgeb @egorshulga @rraina @t49tran @8enSmith @wezleytsai @eps1lon @HipsterBrown @pawfa — 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 moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 2, 2021
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 2, 2021
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 2, 2021
@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 #52712 diff
Batch compilation
Memory usage (MiB) 188.7 189.8 +0.6%
Type count 48992 49036 0%
Assignability cache size 17268 17286 0%
Language service
Samples taken 926 926 0%
Identifiers in tests 2198 2203 0%
getCompletionsAtPosition
    Mean duration (ms) 785.5 793.5 +1.0%
    Mean CV 8.6% 8.4%
    Worst duration (ms) 1230.6 1205.3 -2.0%
    Worst identifier props props
getQuickInfoAtPosition
    Mean duration (ms) 763.0 767.4 +0.6%
    Mean CV 8.8% 8.3%
    Worst duration (ms) 1031.9 1161.1 +12.5%
    Worst identifier style location

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 May 2, 2021
@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label May 3, 2021
@elibarzilay elibarzilay moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board May 4, 2021
@typescript-bot typescript-bot added the Self Merge This PR can now be self-merged by the PR author or an owner label May 4, 2021
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board May 4, 2021
@typescript-bot
Copy link
Contributor

@lmichelin Everything looks good here. Great job! I am ready to merge this PR (at 334dd10) on your behalf.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@sergey-buturlakin, @mrk21, @vasek17, @ngbrown, @awendland, @KostyaEsmukov, @johnnyreilly, @LKay, @DovydasNavickas, @huy-nguyen, @Grmiade, @DaIgeb, @egorshulga, @rraina, @t49tran, @8enSmith, @wezleytsai, @eps1lon, @HipsterBrown, @pawfa: you can do this too.)

@lmichelin
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board May 5, 2021
@typescript-bot typescript-bot merged commit 495730c into DefinitelyTyped:master May 5, 2021
@lmichelin lmichelin deleted the fix-react-router-path-params-type branch May 5, 2021 07:56
@typescript-bot
Copy link
Contributor

I just published @types/react-router@5.1.14 to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical 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. 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.

[react-router] Strongly typed path does not work with path parameter constraints
3 participants