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: Add pg dynamic password support to ClientOptions #49257

Merged

Conversation

sehrope
Copy link
Contributor

@sehrope sehrope commented Oct 30, 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 YOUR_PACKAGE_NAME.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

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: feat: Add dynamic retrieval for client password brianc/node-postgres#1926
  • 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.

Adds typings to pg for connection config with dynamic passwords via a sync or async function. This was added to a pg v7.12.0 and the typings claim to be for 7.14 so this is a fix for incomplete typing for that property.

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Untested Change This PR does not touch tests labels Oct 30, 2020
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Oct 30, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Oct 30, 2020

@sehrope 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": 49257,
  "author": "sehrope",
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "1a59f41",
  "headCommitOid": "1a59f41f3f297cfada24a2049d4914d70c42ece8",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastPushDate": "2020-10-31T11:45:18.000Z",
  "lastCommentDate": "2020-11-05T10:45:41.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/49257/files",
  "hasMergeConflict": false,
  "authorIsOwner": false,
  "isFirstContribution": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "pg",
      "files": [
        {
          "path": "types/pg/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/pg/pg-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "pspeter3",
        "HoldYourWaffle"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-11-02T14:28:47.000Z",
  "firstApprovalDate": "2020-11-02T14:28:47.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@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 typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Oct 30, 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?

Comparison details 📊
master #49257 diff
Batch compilation
Memory usage (MiB) 66.1 76.1 +15.2%
Type count 9800 9804 0%
Assignability cache size 1720 1720 0%
Language service
Samples taken 411 411 0%
Identifiers in tests 411 411 0%
getCompletionsAtPosition
    Mean duration (ms) 385.3 360.0 -6.6%
    Mean CV 9.4% 9.0%
    Worst duration (ms) 468.7 427.8 -8.7%
    Worst identifier e connectionTimeoutMillis
getQuickInfoAtPosition
    Mean duration (ms) 387.1 360.9 -6.8%
    Mean CV 9.4% 8.7% -7.7%
    Worst duration (ms) 522.5 435.9 -16.6%
    Worst identifier Pool Pool

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 Oct 30, 2020
@sehrope
Copy link
Contributor Author

sehrope commented Oct 31, 2020

Updated to add some test usage of the dynamic passwords with both a sync and async function.

@typescript-bot typescript-bot removed the Untested Change This PR does not touch tests label Oct 31, 2020
@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Code Reviews in New Pull Request Status Board Oct 31, 2020
@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 Nov 3, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Nov 3, 2020
@typescript-bot
Copy link
Contributor

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

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

@benkeil
Copy link

benkeil commented Nov 5, 2020

@sehrope can you merge please? ☺️

@sehrope
Copy link
Contributor Author

sehrope commented Nov 5, 2020

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Nov 5, 2020
@typescript-bot typescript-bot merged commit 7883824 into DefinitelyTyped:master Nov 5, 2020
@typescript-bot
Copy link
Contributor

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

@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Nov 6, 2020
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.

None yet

4 participants