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

Resolve legacy dependency pouchdb-all-dbs #2874

Closed
openscript opened this issue Feb 13, 2021 · 3 comments
Closed

Resolve legacy dependency pouchdb-all-dbs #2874

openscript opened this issue Feb 13, 2021 · 3 comments

Comments

@openscript
Copy link
Contributor

Case

It is an improvement. Nothing is broken.

Issue

When I install the dependencies (one of them is rxdb) I get the following warning:

warning Pattern ["esprima-fb@~3001.0001.0000-dev-harmony-fb"] is trying to unpack in the same destination "/home/node/.cache/yarn/v6/npm-esprima-fb-3001.1.0-dev-harmony-fb-b77d37abcd38ea0b77426bb8bc2922ce6b426411-integrity/node_modules/esprima-fb" as pattern ["esprima-fb@~3001.1.0-dev-harmony-fb"]. This could result in non-deterministic behavior, skipping.

Info

  • Environment: node.js 14.15.1 with yarn
  • Adapter: doesn't matter
  • Stack: doesn't matter

Code

I've investigated this for a bit.

$ yarn why esprima-fb

yarn why v1.22.5
[1/4] Why do we have the module "esprima-fb"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "esprima-fb"
info Reasons this module exists
   - Hoisted from "rxdb#pouchdb-all-dbs#es3ify#esprima-fb"
   - Hoisted from "rxdb#pouchdb-all-dbs#es3ify#jstransform#esprima-fb"
info Disk size without dependencies: "2.01MB"
info Disk size with unique dependencies: "2.01MB"
info Disk size with transitive dependencies: "2.01MB"
info Number of shared dependencies: 0

pouchdb-all-dbs wasn't updated for a few years. It is only used once in rxdb:

// we have to clean up after tests so there is no stupid logging
// @link https://github.com/pouchdb/pouchdb-server/issues/226
const PouchdbAllDbs = require('pouchdb-all-dbs');
PouchdbAllDbs(PouchDB);

Honestly I don't 100% understand why this is needed, but I would happy to help to replace this dependency.

@pubkey
Copy link
Owner

pubkey commented Feb 13, 2021

As far as I remember, I needed that to fix some problems when using the same db instance multiple times. pouchdb/pouchdb-server#226
If you can, please remove the dependency. As long as the CI stays green of course.

Related #2152

@openscript
Copy link
Contributor Author

openscript commented Feb 14, 2021

I've upgraded the dependencies of pouchdb-all-dbs and sent a PR to them. If it doesn't get merged and released within one week I publish it by myself.

pouchdb-community/pouchdb-all-dbs#34

pubkey added a commit that referenced this issue Feb 22, 2021
@pubkey
Copy link
Owner

pubkey commented Feb 22, 2021

I merged your PR @openscript thank you very much.

@pubkey pubkey closed this as completed Feb 22, 2021
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

No branches or pull requests

2 participants