GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(pg): add default export by perrin4869 · Pull Request #72649 · DefinitelyTyped/DefinitelyTyped Conversation
|
|
@perrin4869 Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause 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
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": 72649,
"author": "perrin4869",
"headCommitOid": "61138f1bd1b3fdcad8efdd895374d0489a1bf13c",
"mergeBaseOid": "8c2858ff35ca248b88fac813e501b568b1a422b7",
"lastPushDate": "2025-04-29T15:55:21.000Z",
"lastActivityDate": "2025-05-06T19:24:10.000Z",
"mergeOfferDate": "2025-05-06T19:23:27.000Z",
"mergeRequestDate": "2025-05-06T19:24:10.000Z",
"mergeRequestUser": "perrin4869",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "pg",
"kind": "edit",
"files": [
{
"path": "types/pg/index.d.mts",
"kind": "definition"
},
{
"path": "types/pg/index.d.ts",
"kind": "definition"
},
{
"path": "types/pg/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/pg/pg-tests.mts",
"kind": "test"
},
{
"path": "types/pg/tsconfig.json",
"kind": "package-meta-ok"
}
],
"owners": [
"pspeter3"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [
{
"type": "approved",
"reviewer": "gabritto",
"date": "2025-05-06T19:22:48.000Z",
"isMaintainer": true
}
],
"mainBotCommentID": 2839428422,
"ciResult": "pass"
} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🔔 @pspeter3 — please review this PR in the next few days. Be sure to explicitly select |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@perrin4869 The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d1e3629 to
82ed082
Compare
|
@perrin4869 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! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@gabritto 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? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ready to merge |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| export const escapeLiteral: typeof pg.escapeLiteral; | ||
| export const Result: typeof pg.Result; | ||
|
|
||
| export { TypeOverrides }; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
this export should be in the CJS types too
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
good point, will be fixed in #72710
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
amazing, thank you!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
something seems to be wrong after this with @types/pg 8.15.0 where version 8.12.0 worked fine:
this may be related to the "resolution failed" errors in https://arethetypeswrong.github.io/?p=pg |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
sorry i left that out; yes, i do have |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hello, thanks for the work but I am also facing the same issue, here is a clean repro (using ESM): import pg from 'pg'; let pool: pg.Pool; const initPool = () => { pool = new pg.Pool(); } This complains of pg namespace not being found. If I do something like for Pg typing: import type * as PgTypes from 'pg'; let pool: PgTypes.Pool; This also fails with And finally if I do try to use Where the previous (first version) was working fine on 8.12 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@otaviojacobi that specific issue will be solved by my followup, #72710 sorry about that! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks @perrin4869 ! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@perrin4869 thanks, i'll check as soon as it's available |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| export type * from "./index.d.ts"; | ||
|
|
||
| export const defaults: typeof pg.defaults; | ||
| export const Client: typeof pg.Client; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The const exports caused a regression in my project. Before, a type could be imported using import type {Client} from 'pg'. After this was released my project broke because it's with the following error:
error TS2749: 'Client' refers to a value, but is being used as a type here. Did you mean 'typeof Client'?
I've worked around it by importing the full pg namespace, but I thought I'd inform you of this regression.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
should be fixed by #72710, sorry about that!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Correction, that workaround does not work. I cannot import just the types anymore. Quite an inconvenient regression.
In addition to the error described above, when importing as import type pg from 'pg', you get the error: Cannot find namespace 'pg'.. This is also true for not importing it as a type.
EDIT: I see the other comments report this too, feel free to ignore.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.