Skip to content

Add pg/lib/type-overrides types.#51175

Merged
typescript-bot merged 4 commits intoDefinitelyTyped:masterfrom
groner:pg-typeoverrides
Mar 4, 2021
Merged

Add pg/lib/type-overrides types.#51175
typescript-bot merged 4 commits intoDefinitelyTyped:masterfrom
groner:pg-typeoverrides

Conversation

@groner
Copy link
Contributor

@groner groner commented Feb 11, 2021

This PR adds the TypeOverride type from pg/lib/type-override.js.

If changing an existing definition:

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Feb 11, 2021
@typescript-bot
Copy link
Contributor

typescript-bot commented Feb 11, 2021

@groner 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": 51175,
  "author": "groner",
  "headCommitOid": "f70d5d01353a8906a854fea253a12888de199801",
  "lastPushDate": "2021-03-01T16:47:33.000Z",
  "lastActivityDate": "2021-03-04T20:01:43.000Z",
  "maintainerBlessed": false,
  "mergeOfferDate": "2021-03-04T12:21:57.000Z",
  "mergeRequestDate": "2021-03-04T20:01:43.000Z",
  "mergeRequestUser": "groner",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "pg",
      "kind": "edit",
      "files": [
        {
          "path": "types/pg/lib/type-overrides.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/pg/pg-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "pspeter3",
        "HoldYourWaffle"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "HoldYourWaffle",
      "date": "2021-03-04T12:21:21.000Z",
      "isMaintainer": false
    },
    {
      "type": "stale",
      "reviewer": "DanielRosenwasser",
      "date": "2021-03-01T09:06:18.000Z",
      "abbrOid": "c0ada2a"
    }
  ],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @pspeter3 @HoldYourWaffle — 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 #51175 diff
Batch compilation
Memory usage (MiB) 71.0 76.9 +8.3%
Type count 10170 10183 0%
Assignability cache size 1885 1885 0%
Language service
Samples taken 514 523 +2%
Identifiers in tests 514 523 +2%
getCompletionsAtPosition
    Mean duration (ms) 375.1 375.5 +0.1%
    Mean CV 8.9% 9.6%
    Worst duration (ms) 477.3 456.3 -4.4%
    Worst identifier values console
getQuickInfoAtPosition
    Mean duration (ms) 382.2 381.8 -0.1%
    Mean CV 8.5% 8.6%
    Worst duration (ms) 473.1 457.4 -3.3%
    Worst identifier connectionTimeoutMillis idleTimeoutMillis

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 Feb 11, 2021
Copy link
Contributor

@HoldYourWaffle HoldYourWaffle left a comment

Choose a reason for hiding this comment

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

The content looks good to me, but I'm not sure (read: too dumb) if this should be put in a separate file with a triple-slash directive. I've never seen this before, but I suppose it 'makes sense'.

Could you perhaps explain the reasoning behind this structure?

@groner
Copy link
Contributor Author

groner commented Feb 14, 2021

@HoldYourWaffle Thanks for looking at this.

I was having some problems with TS2693 ('TypeOverrides' only refers to a type, but is being used as a value here.) which I thought I had resolved by adding the triple-slash directive. Now I'm able to remove the triple-slash directive without breaking the test, so I guess that wasn't it.

I tried using declare module './lib/type-overrides.d.ts' { ... } in index.d.ts, but couldn't get it working.

I'll remove the triple-slash directive since it seems to be superfluous. I'm open to other suggestions.

@typescript-bot
Copy link
Contributor

@HoldYourWaffle 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 typescript-bot added the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Feb 15, 2021
@typescript-bot
Copy link
Contributor

@groner Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day!

@typescript-bot typescript-bot removed the Has Merge Conflict This PR can't be merged because it has a merge conflict. The author needs to update it. label Feb 16, 2021
@@ -1,4 +1,5 @@
import { types, Client, CustomTypesConfig, QueryArrayConfig, Pool } from 'pg';
import TypeOverrides from 'pg/lib/type-overrides';
Copy link
Contributor

Choose a reason for hiding this comment

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

I checked the source of pg again, and if I understand things correctly the reason we need this to be a separate file is because TypeOverrides is not exported from index.js.

Would that be correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this PR is introducing types that are not currently exported from index.js. Do you think that could be a problem?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not entirely sure... I think it's unorthodox, but I don't see a reason why it would create actual issues.
Perhaps it's a good idea to let a maintainer look at this, but I don't know of a way to do that other than to wait until the bot does it.

Copy link
Contributor

Choose a reason for hiding this comment

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

@RyanCavanaugh Sorry to bother you for this, but your amazing bot seems to fall short here. Is there a way to "request human attention" that I'm unaware of?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean reaching out to the pg module maintainers or asking a maintainer of this repo?

Copy link
Contributor

Choose a reason for hiding this comment

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

The latter. I'm pretty sure that this describes the module accurately, but I'm not 100% sure that this is the "correct" or "orthodox" way to do things around here.

@typescript-bot
Copy link
Contributor

Re-ping @pspeter3, @HoldYourWaffle:

This PR has been out for over a week, yet I haven't seen any reviews.

Could someone please give it some attention? Thanks!

@typescript-bot typescript-bot added the Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. label Feb 27, 2021
@typescript-bot typescript-bot added Revision needed This PR needs code changes before it can be merged. and removed Unreviewed No one showed up to review this PR, so it'll be reviewed by a DT maintainer. labels Mar 1, 2021
@typescript-bot
Copy link
Contributor

@groner 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. Thank you!

@groner groner force-pushed the pg-typeoverrides branch from c7a9d3b to f70d5d0 Compare March 1, 2021 16:47
@typescript-bot typescript-bot removed the Revision needed This PR needs code changes before it can be merged. label Mar 1, 2021
@typescript-bot
Copy link
Contributor

@DanielRosenwasser, @HoldYourWaffle 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 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 Mar 4, 2021
@typescript-bot
Copy link
Contributor

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

(@pspeter3, @HoldYourWaffle: you can do this too.)

@typescript-bot
Copy link
Contributor

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

@groner
Copy link
Contributor Author

groner commented Mar 4, 2021

Ready to merge

@typescript-bot typescript-bot merged commit 5240d7c into DefinitelyTyped:master Mar 4, 2021
@typescript-bot
Copy link
Contributor

I just published @types/pg@7.14.11 to npm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants