-
Notifications
You must be signed in to change notification settings - Fork 22
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
Integrating generic connection-string #32
Conversation
Reverting the mocha version, because the latest does not support Node.js 0.10
correcting comment for `.sock` ending.
Improving comments, not to mention `/` support, as both primary and secondary syntax support it the same - encoded.
improving tests.
updating connection-string version.
dependency update.
dependency update.
fixing tests.
@monteslu Do you think this may happen? 😄 |
Will review, is this still work in progress? |
@abowerman nope, it is all done and good to go! :) |
Upgrading the dependency, for better Unix sockets support.
Simplifying support for Unix sockets.
Fixing tests for the new sockets syntax.
@abowerman I have made some important improvements as to how Unix sockets are supported, both here and in the connection-string. It is so much simpler now, and more logical. No more dual syntax for sockets! 😄 And I have documented it here:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code all looks good to me.
I am loathe to introduce breaking changes though. This package has been stable for a long time and I think a major version bump will still require long term support for the 2.x.x
release. My preference would be to replace the parser with the generic connection-string but maintain backwards compatibility.
@hjr3 Considering that
This is effectively what we are doing here, the package now simply provides the backward compatibility, nothing more, although not entirely, because 100% is impossible at this point, that's why we bump the version. This will in turn show how easy it is indeed to get |
dependency update
@abowerman Is it ok to merge it now? |
dependency update
Looks like you are still making changes here. |
@abowerman I've been making improvements to the library, and here only updating dependencies, nothing else. This shouldn't stop you from merging the PR ;) |
@abowerman Just checking back, as it's been 12 days since... |
@abowerman just pinging ;) Can it be merged, please? |
How come we lost all the response here after...? @hjr3 @abowerman Could someone, please review and merge it? |
For one thing, it is marked as version 3.0.0, within the PR itself. And for another, the driver has been stuck on the ancient version anyhow. So it won't break anything, if we just follow the major version increment with this. Because what this really does more than anything, brings in a well-known standard of the connection URL, and getting rid of proprietary patches here and there. |
This change guts the code base and makes This is an old repository. It is depended on by a lot of people. The repository itself has a reputation behind it. There is a (loose) governance model. By merging this PR, then we give all that up. Any bug or feature request will have to be redirected to connection-string. The go-forward role for the current maintainers will only be bumping the version of connection-string periodically. Maybe connection-string is the better option though! @vitaly-t is very motivated to improve the current state of connection string parsing and this repository has been pretty quiet. If connection-string is the better option, we should probably deprecate this repository and redirect people to connection-string. No reason to make a My vote is to update the README that this repository is deprecated, the |
@hjr3 The important thing, issues around the lack of code consolidation keep rising, but nothing is being done about it. Here's the last one, just from today, that's why I'm trying to revive it again. b.t.w. I'm not only the developer of connection-string, but also developer of pg-promise, and an active user of the entire platform myself. I am currently in between a few projects - all using it, so yes, I am concerned :) |
Yup, I hear you. I am all for node-postgres updating its dependency to be on |
As part of moving all my projects into native TypeScript, I've just published a pre-release update for this one - 3.0.0-Beta.0. |
updating `connection-string` dependency.
updating for use of the latest `connection-string` as a class-only.
Updated to use the new 3.x version of connection-string, re-done in TypeScript. |
Hello fellows. Am I right that better to migrate |
@zxqfox For the lack of the progress either way, to move toward a better generic approach, I no longer want to advocate any kind of integration. For people who want to use |
Many tests now can be retired, because this library doesn't do the parsing anymore. But for now I kept as many tests as I could.
This implementation uses connection-string underneath, while implementing the functionality as close as possible to the original, and to keep it mostly compatible with the existing driver.
This first version ignores multi-host support, but makes it very easy to activate, once the driver starts supporting it, since connection-string supports it out-of-the-box.
However, some functionality had to be changed, and below is the list of all breaking changes...
.sock
, or contains/
after decoding.database
now always comes from the first path segment, there is no more need in custom parameterdb
. In the simplest form,/dbname
results in the database set correctly.some-name
sets the host, not the database name. For the database shortest syntax it is/some-name
, and for just host + database, it ishost/database
. See more examples here.For other references, see connection-string. It supports abbreviations, defaults, string generation, etc, many nice features.
UPDATE
I have added a good usage example - connection-string-demo.