node-postgres icon indicating copy to clipboard operation
node-postgres copied to clipboard

Migrating some packages to TypeScript.

Open bhavya3024 opened this issue 3 years ago • 7 comments

Hi @voodootikigod @jeremyevans @dmnd @pshc @mikl are you planning to migrate completely to TypeScript ? If not I can raise a pull request for this as a contribution. Thanks!

bhavya3024 avatar Nov 28 '22 08:11 bhavya3024

I haven't used node in about a decade, so I'm not a good person to ask.

jeremyevans avatar Nov 28 '22 16:11 jeremyevans

Migrating everything to typescript is something I'd love to do eventually....the main pg package is going to be the most nightmarish due to it using some more older coding styles and having about a bazillion unit/integration tests....some of which were written a long time ago when there weren't the same conventions around how things "are done" in node...so they're kinda a mess. Migrating pg-pool to typescript would be useful as I feel like that's 1) super heavily used 2) more self-contained 3) has a more modern test framework (mocha). Always down to review PRs for converting to typescript.....the smaller the PR the better (maybe start by migrating the tests in 1 PR and then the code in another or something?) Its just not as high priority right now as some other things for me but eventually would be cool to do as I really find TypeScript to be valuable.

brianc avatar Nov 28 '22 22:11 brianc

I'd be happy to help! Migrating legacy JS codebases gradually to TS is part of what I do for a living. Shall we make a project out of it and coordinate?

mschilde avatar Dec 16 '22 15:12 mschilde

Hi, is there any update about Typescript migration of pg/pg-pool package ?

yatoogamii avatar May 02 '25 02:05 yatoogamii

its on my todo list! That list never seems to shrink though 😬 but i haven't abandoned the idea by any means. I've been chipping away at making the pg test suite (which is hellaciously old, but still valuable) a bit more updated so it wont make typescript so angry. I did a bunch of stuff long, long ago like extending node's assert and using global variables and import side effects. Been trying to reduce bit by bit, etc.

brianc avatar May 04 '25 22:05 brianc

Could we have a branch and/or an "Official" issue to track on this ? A little contribution by contribution we could achieve it

yatoogamii avatar May 05 '25 05:05 yatoogamii

Should we start doing this migrating ?

bhavya3024 avatar May 05 '25 05:05 bhavya3024