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

Use NoticeMessage type for pg.Client 'notice' event. #51183

Merged
merged 1 commit into from Feb 15, 2021

Conversation

groner
Copy link
Contributor

@groner groner commented Feb 11, 2021

This PR updates the pg.Client 'notice' event to use uses the NoticeMessage type from pg-protocol.

If changing an existing definition:

This type first appears in pg-protocol 1.2.0, which was released with pg 8.0.1. I don't think the additional pg-protocol dependency will cause any conflicts because previous releases used a different name (pg-packet-stream).

@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 typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Feb 11, 2021
@typescript-bot
Copy link
Contributor

typescript-bot commented Feb 11, 2021

@groner 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 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": 51183,
  "author": "groner",
  "headCommitOid": "8503fc50cc2863d15214056b4119fa2461327bc1",
  "lastPushDate": "2021-02-11T18:07:09.000Z",
  "lastActivityDate": "2021-02-15T18:36:55.000Z",
  "maintainerBlessed": false,
  "mergeOfferDate": "2021-02-14T01:02:10.000Z",
  "mergeRequestDate": "2021-02-15T18:36:55.000Z",
  "mergeRequestUser": "groner",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "pg",
      "kind": "edit",
      "files": [
        {
          "path": "types/pg/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/pg/package.json",
          "kind": "package-meta-ok"
        },
        {
          "path": "types/pg/pg-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "pspeter3",
        "HoldYourWaffle"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "HoldYourWaffle",
      "date": "2021-02-14T01:01:33.000Z",
      "isMaintainer": false
    }
  ],
  "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 typescript-bot added the The CI failed When GH Actions fails label Feb 11, 2021
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Feb 11, 2021
@typescript-bot
Copy link
Contributor

@groner The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

(indecipherable mumbling only ci bot will hear)
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Feb 11, 2021
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Feb 11, 2021
@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 #51183 diff
Batch compilation
Memory usage (MiB) 71.3 72.1 +1.1%
Type count 10170 10283 +1%
Assignability cache size 1885 1898 +1%
Language service
Samples taken 514 525 +2%
Identifiers in tests 514 525 +2%
getCompletionsAtPosition
    Mean duration (ms) 336.3 333.1 -0.9%
    Mean CV 9.5% 9.6%
    Worst duration (ms) 434.9 434.0 -0.2%
    Worst identifier connect error
getQuickInfoAtPosition
    Mean duration (ms) 341.8 341.4 -0.1%
    Mean CV 8.8% 9.4%
    Worst duration (ms) 422.9 407.8 -3.6%
    Worst identifier log then

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
@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 Feb 14, 2021
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Feb 14, 2021
@groner
Copy link
Contributor Author

groner commented Feb 15, 2021

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Feb 15, 2021
@typescript-bot typescript-bot merged commit 630502c into DefinitelyTyped:master Feb 15, 2021
@typescript-bot
Copy link
Contributor

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

@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Feb 15, 2021
@ujwal-setlur
Copy link

This breaks typescript compilation when isolatedModules is set in tsconfig.json:

node_modules/pg-protocol/dist/messages.d.ts:86:21 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.

86     readonly name = MessageName.copyData;
                       ~~~~~~~~~~~

node_modules/pg-protocol/dist/messages.d.ts:164:21 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.

164     readonly name = MessageName.notice;

@ujwal-setlur
Copy link

@groner
Copy link
Contributor Author

groner commented Feb 19, 2021

@ujwal-setlur Apologies for breaking your build. This is my first time encountering this issue.

It would be nice if this can be fixed in pg-protocol, but if that can't happen in a timely manner then I suppose reverting this is the sensible thing to do.

@ujwal-setlur
Copy link

Thanks @groner. Let’s give it a couple or days before reverting. For now, I have disabled isolatedModules, but I would like to re-enable it.

ansu5555 pushed a commit to ansu5555/DefinitelyTyped that referenced this pull request Feb 19, 2021
… 'notice' event. by @groner

(indecipherable mumbling only ci bot will hear)
@ujwal-setlur
Copy link

@groner, It looks like the upstream will not fix this. Can you please roll this back? Thanks.

groner added a commit to groner/DefinitelyTyped that referenced this pull request Mar 2, 2021
kaznovac pushed a commit to kaznovac/DefinitelyTyped that referenced this pull request Mar 2, 2021
… 'notice' event. by @groner

(indecipherable mumbling only ci bot will hear)
groner added a commit to groner/DefinitelyTyped that referenced this pull request Mar 5, 2021
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