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

pg: remove not supposed option from ClientConfig #63690

Merged
merged 1 commit into from Dec 23, 2022

Conversation

kz-d
Copy link
Contributor

@kz-d kz-d commented Dec 21, 2022

parseInputDatesAsUTC does not work as an option for ClientConfig in any node-postgres version.

・I searched the source code, but there is no place where parseInputDatesAsUTC is overridden with the given arguments.
https://github.com/brianc/node-postgres
・There is no mention of this in the official documentation.
https://node-postgres.com/apis/client#new-client
・when I try to execute the following source code, parseInputDatesAsUTC is processed as false.

const client = new Client({
  host: 'localhost',
  port: 5332,
  user: 'database-user',
  password: 'password!!',
  parseInputDatesAsUTC: true,
})

I think it was added due to some misunderstand.

related: brianc/node-postgres#1350

Please fill in this template.

@typescript-bot
Copy link
Contributor

typescript-bot commented Dec 21, 2022

@kz-d Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

Because this is a widely-used package, a DT maintainer will need to review it before it can be merged.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can approve changes without tests

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": 63690,
  "author": "kz-d",
  "headCommitOid": "34c249facc2de000285dbbe98b80d808712460bc",
  "mergeBaseOid": "ee2690789110ba2c962f1f489d1ee07278ac63d3",
  "lastPushDate": "2022-12-21T14:06:16.000Z",
  "lastActivityDate": "2022-12-23T01:12:18.000Z",
  "mergeOfferDate": "2022-12-22T19:19:12.000Z",
  "mergeRequestDate": "2022-12-23T01:12:18.000Z",
  "mergeRequestUser": "kz-d",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Critical",
  "pkgInfo": [
    {
      "name": "pg",
      "kind": "edit",
      "files": [
        {
          "path": "types/pg/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "pspeter3",
        "HoldYourWaffle"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Critical"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "peterblazejewicz",
      "date": "2022-12-22T19:18:27.000Z",
      "isMaintainer": true
    },
    {
      "type": "approved",
      "reviewer": "HoldYourWaffle",
      "date": "2022-12-22T07:41:51.000Z",
      "isMaintainer": false
    }
  ],
  "mainBotCommentID": 1361385952,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added Critical package Untested Change This PR does not touch tests labels Dec 21, 2022
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Dec 21, 2022
@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 Dec 21, 2022
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.

Oh wow this is a strange one.

Seems like it was approved by both me and @peterblazejewicz in #42849 based on defaults.js. In our defense, it's a little strange to have a non-overridable "default option"...
Related: brianc/node-postgres#2141

This option was never added to the tests (booo), so it makes sense that the tests haven't been changed.

@typescript-bot typescript-bot added the Owner Approved A listed owner of this package signed off on the pull request. label Dec 22, 2022
Copy link
Member

@peterblazejewicz peterblazejewicz left a comment

Choose a reason for hiding this comment

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

@kz-d thanks!

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

kz-d commented Dec 23, 2022

thanks for review!

@kz-d
Copy link
Contributor Author

kz-d commented Dec 23, 2022

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Dec 23, 2022
@typescript-bot typescript-bot merged commit 0d37a38 into DefinitelyTyped:master Dec 23, 2022
akwiatek added a commit to akwiatek/DefinitelyTyped that referenced this pull request Dec 23, 2022
* origin/master:
  🤖 Merge PR DefinitelyTyped#63690 pg: remove not supposed option from ClientConfig by @kz-d
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Feb 23, 2023
@stuft2
Copy link
Contributor

stuft2 commented Sep 14, 2023

I'm pretty sure you can override this variable like pg.defaults.parseInputDatesAsUTC = true. It should have been added to the Defaults interface and not the Client constructor options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Critical package Maintainer Approved 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 Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants