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

feat(pnpapi): Add process.versions.pnp #47107

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Aug 28, 2020

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:

@typescript-bot
Copy link
Contributor

typescript-bot commented Aug 28, 2020

@ExE-Boss 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, 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": 47107,
  "author": "ExE-Boss",
  "owners": [
    "arcanis"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "f29b364",
  "headCommitOid": "f29b364f973ec6625a0d27e600e83303110ffafe",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastPushDate": "2020-09-30T12:10:04.000Z",
  "reopenedDate": "2020-09-29T20:42:59.000Z",
  "lastCommentDate": "2020-09-30T19:59:27.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/47107/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Well-liked by everyone",
  "newPackages": [],
  "packages": [
    "pnpapi"
  ],
  "files": [
    {
      "path": "types/pnpapi/index.d.ts",
      "kind": "definition",
      "package": "pnpapi"
    },
    {
      "path": "types/pnpapi/pnpapi-tests.ts",
      "kind": "test",
      "package": "pnpapi"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-09-30T19:15:10.000Z",
  "reviewersWithStaleReviews": [
    {
      "reviewedAbbrOid": "5ff2d86",
      "reviewer": "SimenB",
      "date": "2020-08-28T16:17:17Z"
    }
  ],
  "approvalFlags": 4,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @arcanis — 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
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 #47107 diff
Batch compilation
Memory usage (MiB) 36.4 36.1 -0.7%
Type count 2131 2132 0%
Assignability cache size 97 97 0%
Language service
Samples taken 25 30 +20%
Identifiers in tests 25 30 +20%
getCompletionsAtPosition
    Mean duration (ms) 84.8 84.1 -0.8%
    Mean CV 23.2% 21.2%
    Worst duration (ms) 102.1 105.4 +3.2%
    Worst identifier pnp getPackageInformation
getQuickInfoAtPosition
    Mean duration (ms) 80.0 79.6 -0.5%
    Mean CV 16.2% 16.6% +2.7%
    Worst duration (ms) 95.5 90.8 -4.9%
    Worst identifier resolution2 resolveUnqualified

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 28, 2020
@ExE-Boss ExE-Boss force-pushed the types/pnpapi/add-process-versions-pnp branch from 000f9c1 to 5ff2d86 Compare August 28, 2020 13:41
declare global {
namespace NodeJS {
interface ProcessVersions {
pnp: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't it still be optional? Just loading the types doesn't mean it's pnp at runtime

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed 👍

@typescript-bot typescript-bot added the Abandoned This PR had no activity for a long time, and is considered abandoned label Sep 29, 2020
@amcasey
Copy link
Contributor

amcasey commented Sep 29, 2020

Closing as abandoned.

@amcasey amcasey closed this Sep 29, 2020
@ExE-Boss
Copy link
Contributor Author

ExE-Boss commented Sep 29, 2020

@amcasey

This isn’t abandoned, because it’s blocked on review from @arcanis.

@arcanis
Copy link
Contributor

arcanis commented Sep 29, 2020

Sorry, I didn't see it before! @SimenB's comment should be addressed, then it's fine by me 😃

@amcasey
Copy link
Contributor

amcasey commented Sep 29, 2020

@ExE-Boss My mistake. The comment from 30 days ago was unaddressed, so I assumed this was no longer interesting.

@amcasey amcasey reopened this Sep 29, 2020
@typescript-bot typescript-bot removed the Abandoned This PR had no activity for a long time, and is considered abandoned label Sep 29, 2020
Copy link
Contributor

@amcasey amcasey left a comment

Choose a reason for hiding this comment

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

Please address the feedback from @SimenB.

@typescript-bot typescript-bot added the Revision needed This PR needs code changes before it can be merged. label Sep 29, 2020
@typescript-bot
Copy link
Contributor

@ExE-Boss One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you!

@ExE-Boss ExE-Boss force-pushed the types/pnpapi/add-process-versions-pnp branch 2 times, most recently from 0d57bb3 to f29b364 Compare September 30, 2020 12:10
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
@@ -1,3 +1,4 @@
/// <reference types="node"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I’ve added @types/node to devDependencies so that changes to Node type definitions won’t cause breakage like with @types/webpack‑env: #47602 (PR #47516).

@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Sep 30, 2020
@typescript-bot
Copy link
Contributor

@SimenB 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?

@typescript-bot
Copy link
Contributor

Updated numbers for you here from d883808.

Comparison details 📊
master #47107 diff
Batch compilation
Memory usage (MiB) 36.3 68.2 +87.5%
Type count 2151 9019 +319%
Assignability cache size 101 1616 +1500% 🚨
Language service
Samples taken 25 28 +12%
Identifiers in tests 25 28 +12%
getCompletionsAtPosition
    Mean duration (ms) 80.5 335.5 +316.5% 🚨
    Mean CV 21.7% 10.6%
    Worst duration (ms) 107.0 391.1 +265.6% 🚨
    Worst identifier resolveUnqualified versions
getQuickInfoAtPosition
    Mean duration (ms) 77.2 335.0 +334.0% 🚨
    Mean CV 19.8% 11.3% -42.8%
    Worst duration (ms) 89.7 371.4 +313.9% 🚨
    Worst identifier locator locator

It looks like there are several metrics that changed quite a bit. You might want to take a look and make sure your changes won’t cause slow-downs for users consuming these types.

@typescript-bot typescript-bot added Perf: Worse typescript-bot determined that this PR has a negative impact on compilation performance. and removed Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. labels Sep 30, 2020
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels Sep 30, 2020
@typescript-bot
Copy link
Contributor

@ExE-Boss 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! ❤️

(@arcanis: you can do this too.)

@ExE-Boss
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot merged commit 6851cef into DefinitelyTyped:master Sep 30, 2020
@ExE-Boss ExE-Boss deleted the types/pnpapi/add-process-versions-pnp branch September 30, 2020 20:00
@typescript-bot
Copy link
Contributor

I just published @types/pnpapi@0.0.1 to npm.

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

5 participants