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 polka-express compatibility types #45060

Merged
merged 4 commits into from
Jun 8, 2020
Merged

Fix polka-express compatibility types #45060

merged 4 commits into from
Jun 8, 2020

Conversation

pkuczynski
Copy link
Contributor

Please fill in this template.

  • 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).

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: TypeScript typings support? lukeed/polka#17 (comment)
  • 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.
  • Include tests for your changes
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

@typescript-bot typescript-bot added Where is Travis? Author is Owner The author of this PR is a listed owner of the package. labels May 26, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented May 26, 2020

@pkuczynski Thank you for submitting 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, DT maintainers or others

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": 45060,
  "author": "pkuczynski",
  "owners": [
    "pkuczynski",
    "JamesMessinger"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "2c068e1",
  "headCommitOid": "2c068e1c903fd615cee1f6a6abab835106c8443c",
  "mergeIsRequested": true,
  "stalenessInDays": 13,
  "lastCommitDate": "2020-05-26T11:19:19.000Z",
  "lastCommentDate": "2020-06-08T18:48:03.000Z",
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45060/files",
  "hasMergeConflict": false,
  "authorIsOwner": true,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "anyPackageIsNew": false,
  "packages": [
    "polka"
  ],
  "files": [
    {
      "filePath": "types/polka/index.d.ts",
      "kind": "definition",
      "package": "polka"
    },
    {
      "filePath": "types/polka/polka-tests.ts",
      "kind": "test",
      "package": "polka"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-06-08T18:20:39.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 4,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @JamesMessinger - 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 Other to Waiting for Code Reviews in New Pull Request Status Board May 26, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board May 26, 2020
@pkuczynski
Copy link
Contributor Author

Polka does not rely on express, but can use express middlewares. I am wondering if in this case we can pull in express types?

@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board May 26, 2020
@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?

master #45060 diff
Batch compilation
Memory usage (MiB) 65.2 69.3 +6.3%
Type count 9371 11196 +19%
Assignability cache size 3257 3752 +15%
Language service
Samples taken 36 58 +61%
Identifiers in tests 36 58 +61%
getCompletionsAtPosition
    Mean duration (ms) 303.0 332.7 +9.8%
    Mean CV 14.1% 13.0%
    Worst duration (ms) 389.9 468.9 +20.3% 🔸
    Worst identifier use routesB
getQuickInfoAtPosition
    Mean duration (ms) 307.4 343.7 +11.8%
    Mean CV 14.7% 11.6% -20.9%
    Worst duration (ms) 364.9 477.3 +30.8% 🔸
    Worst identifier routesB res

Looks like there were a couple significant differences—take a look at worst-case duration for getting completions at a position and worst-case duration for getting quick info at a position to make sure everything looks ok.

@typescript-bot typescript-bot added the Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance. label May 26, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board May 31, 2020
@orta
Copy link
Collaborator

orta commented Jun 8, 2020

I'm going to approve it, which moves the ball for merging back into your count @pkuczynski - but those perf results are a little worrying

@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Jun 8, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board Jun 8, 2020
@typescript-bot
Copy link
Contributor

@pkuczynski Everything looks good here. Great job! I am ready to merge this PR 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! ❤️

@pkuczynski
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 Jun 8, 2020
@typescript-bot typescript-bot merged commit 6e29c70 into DefinitelyTyped:master Jun 8, 2020
@pkuczynski pkuczynski deleted the polka-fixes branch June 8, 2020 18:48
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
…s by @pkuczynski

* Add more tests to polka

* Fix polka-express compatibility types

* Fix lint

* Fix lint
ngbrown pushed a commit to ngbrown-forks/DefinitelyTyped that referenced this pull request Jul 11, 2020
…s by @pkuczynski

* Add more tests to polka

* Fix polka-express compatibility types

* Fix lint

* Fix lint
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Jul 13, 2020
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. Maintainer Approved Perf: Worse typescript-bot determined that this PR has a negative impact on 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.

None yet

3 participants