chore(pg-native): use ES6 classes by cesco69 · Pull Request #3571 · brianc/node-postgres

@cesco69

This improves readability and may allow V8 to optimize better.

This improves readability and may allow V8 to optimize better.

@cesco69

@cesco69

@cesco69

@cesco69

@cesco69

@cesco69

@cesco69

charmander

@cesco69

@cesco69 cesco69 marked this pull request as ready for review

December 16, 2025 08:06

charmander

}
}
module.exports = createClient
module.exports.Client = Client

Choose a reason for hiding this comment

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

Among the issues I pointed out, that only fixes version. It’s not fixable in a clean way overall. Pretty sure we should just do a regular class with no associated compatibility function and merge it for pg-native 4.0.0.

Choose a reason for hiding this comment

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

I'll put this on a list of things to merge for the next semver major. thanks for the contribution!