tabcat / copy-deps

keep dependencies equal with those of another package
Other
0 stars 0 forks source link

design doc #1

Closed tabcat closed 1 year ago

tabcat commented 1 year ago

Updating dependencies takes time. Often it's beneficial to use same dependencies and versions as another package installed. dep-sync's role is to keep local dependencies the same version as another installed package.

To do this dep-sync will use npm list --json --long <package> where <package> is the package to keep some subset of dependencies synced. A config file for dep-sync will be used to configure which package dependencies to install:

dep-syncrc.json

{
  "ipfs-core": [
    "multiformats"
  ]
}

In this case the ipfs-core package and version has been manually installed and multiformats will be installed locally using the same version as what's listed in ipfs-core's package.json file.

tabcat commented 1 year ago

Instead of supporting a separate file it might be best to use the syncDependencies field of the package.json.