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

8.0 Release #2117

Merged
merged 12 commits into from Mar 30, 2020
Merged

8.0 Release #2117

merged 12 commits into from Mar 30, 2020

Conversation

brianc
Copy link
Owner

@brianc brianc commented Feb 25, 2020

This bundles up a bunch of breaking changes. Most of them are small. I'm going to put up proper announcement documentation on the docs, so I'll keep this PR description pretty short.

probably the biggest breaking change is:

  • default to rejectUnauthorized to true on ssl connections.

other breaking changes:

  • support all tls.connect options as passed on the ssl parameter.
  • drop support for node older than 8.0
  • remove password from being printed out accidentally
  • make native non-enumerable
  • make Pool a proper es6 class
  • make Notice messages not be instances of a JavaScript Error

I'm going to really start to focus on performance after this lands, as I've done some benchmarks w/ experimental code here and seeing speed increases up to 50% in some cases.

brianc and others added 11 commits Jan 28, 2020
* Drop support for EOL versions of node

* Re-add testing for node@8.x

* Revert changes to .travis.yml

* Update packages/pg-pool/package.json

Co-Authored-By: Charmander <~@charmander.me>

Co-authored-by: Charmander <~@charmander.me>
* Remove password from stringified outputs

Theres a security concern where if you're not careful and you include your client or pool instance in console.log or stack traces it might include the database password.  To widen the pit of success I'm making that field non-enumerable.  You can still get at it...it just wont show up "by accident" when you're logging things now.

The backwards compatiblity impact of this is very small, but it is still technically somewhat an API change so...8.0.

* Implement feedback

* Fix more whitespace the autoformatter changed

* Simplify code a bit

* Remove password from stringified outputs (#2070)

* Keep ConnectionParameters’s password property writable

`Client` writes to it when `password` is a function.

* Avoid creating password property on pool options

when it didn’t exist previously.

* Allow password option to be non-enumerable

to avoid breaking uses like `new Pool(existingPool.options)`.

* Make password property definitions consistent

in formatting and configurability.

Co-authored-by: Charmander <~@charmander.me>
* Make `native` non-enumerable

Making it non-enumerable means less spurious "Cannot find module"
errors in your logs when iterating over `pg` objects.

`Object.defineProperty` has been available since Node 0.12.

See #1894 (comment)

* Add test for `native` enumeration

Co-authored-by: Gabe Gorelick <gabegorelick@gmail.com>
* Use class-extends to wrap Pool

* Minimize diff

* Test `BoundPool` inheritance

Co-authored-by: Charmander <~@charmander.me>
Co-authored-by: Brian C <brian.m.carlson@gmail.com>
…ns (#2076)

* Add failing test for creating a `BoundPool` from another instance’s settings

* Continue support for creating a pg.Pool from another instance’s options

by dropping the requirement for the `password` property to be enumerable.
* Make notice messages not an instance of Error

Slight API cleanup to make a notice instance the same shape as it was, but not be an instance of error.  This is a backwards incompatible change though I expect the impact to be minimal.

Closes #1982

* skip notice test in travis

* Pin node@13.6 for regression in async iterators

* Check and see if node 13.8 is still borked on async iterator

* Yeah, node still has changed edge case behavior on stream

* Emit notice messages on travis
@brianc brianc requested a review from charmander Feb 25, 2020
@brianc
Copy link
Owner Author

@brianc brianc commented Feb 25, 2020

brianc/node-postgres-docs#62 related PR to update the docs.

The last missing `new` deprecation warning for pg 8.
@maximelkin
Copy link

@maximelkin maximelkin commented Mar 14, 2020

Hello!
What do you think about bumping also pg-types?

@brianc brianc merged commit aafd8ac into master Mar 30, 2020
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants