Closed elmigranto closed 5 years ago
I see that version specified in package.json
for pg-boss
is ^7.4.1
, which should be resolvable to 7.8.1
used by my app. Guess duplicates are the issue with yarn
or something like that…
(upd: I was in the middle of git rebase
, after I finished with conflicts and did some other yarn
things, duplicates were gone.)
Still, I think the original questions is still a valid one. What's your take, Tim? @timgit
The reference dependency list you included already has pg, so if that's the case pg is already there. What's the problem that you're trying to solve with this? Did you receive any errors, or is this an optimization request? I use pg-boss both with and without a shared pool from another framework, but ultimately it's all pg at the end of the day. What's the harm in having pg located in multiple places in node_modules? This is quite common and allows each package version isolation just in case it's needed.
I noticed that I had 2 pg
versions, but it was due to my setup and it went away after I was done with a rebase. Both, app and pg-boss
eventually resolved to the same up-to-date pg
version. This was the main reason I filed this issue, but since it ultimately had nothing to do with pg-boss
, I think we can close this.
There are some other arguments that can be made for the case of having pg
in peerDependencies
for pg-boss
beyond that, but I don't think they warrant doing anything at this point. (E.g. having something else other than Postgres that supports its wire protocol, or having some kind of proxy, or different pg
version, etc.)
Anyhow, thanks for responding, I think I mostly agree with you here. Cheers ♥️
npm
haspeerDependencies
which are to be provided by the app. Would it be better to specify library's (soft) need forpg
there? I have three main arguments for this:pg-boss
is able to accept custom#executeSql(text, params)
argument meaningpg
may not be requiredpg
version on the app level and have some constraints forpg
Currently, my install has two different(this one does not seem to be related topg
versions unnecessarilypg-boss
)Right now, my
yarn.lock
file has two copies ofpg
very closely versioned with app's one being newer: