pg-query-stream version + compatibility
See original GitHub issuepg-query-stream
has been fully revamped in the latest release, with at least one breaking change - changing the class name again, from PgQueryStream
to QueryStream
(see PR #2476).
There are libraries out there that validate the object by its class name, so those would all need to be updated.
The request is here that pg-query-stream
version should have been upped to 4.0.0, or not with the minor version increment.
Please, either bring the version to 4.0.0 (preferable), or rename the class back to PgQueryStream
(this will require TypeScript update as well, so the first option is better).
Note that this is the second time such a change happens. Which means there should be a test added for the class name, to make sure people stop changing it. Internal class names are often important, being the only way an object instance can be validated.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (8 by maintainers)
Top GitHub Comments
That doesn’t sound like a good idea.
Within docker, it is possible to load the same module multiple times, each within isolated environment, so if you create a class object in one, pass it into the other, then
instanceof
is suddenly not working, JavaScript sees it as 2 separate classes.When you want to add support for
QueryStream
, you shouldn’t need to include the module itself. The latter is done by the module that uses your module. Including into module that doesn’t really need it only creates problem - extra dependency, plus possible version conflict.I have explained the best I could why and why it doesn’t work, so not much option there.
Yes, please, it would make life easier, since the last version suddenly changed the class name.