check-dependencies
check-dependencies copied to clipboard
Yarn support and/or callback
Per your request, re-opening here.
Currently this package doesn't support Yarn. This could be ameliorated either by:
- Adding support for Yarn
- Or, adding semi-generic support for package managers that come along (that support the package.json format, like Yarn does). This could be done by offering in the options to specify a callback function that's called if the dependencies are out of date. In there I could manually run Yarn or whatever else.
How would this be different from yarn check
?
@OliverJAsh Mostly in that the check is blazingly fast:
$ time check-dependencies
check-dependencies 0.14s user 0.02s system 105% cpu 0.156 total
Meanwhile:
$ time yarn check
yarn check v0.24.6
warning "selenium-webdriver#ws@^1.0.1" could be deduped from "1.1.2" to "[email protected]"
warning "bower#insight#request@^2.40.0" could be deduped from "2.79.0" to "[email protected]"
warning "chokidar#fsevents#node-pre-gyp@^0.6.29" could be deduped from "0.6.33" to "[email protected]"
warning "insight#inquirer#chalk@^0.5.0" could be deduped from "0.5.1" to "insight#[email protected]"
info Found 4 warnings.
success Folder in sync.
✨ Done in 3.35s.
yarn check 3.05s user 0.87s system 108% cpu 3.615 total
Tests were performed on current AngularJS master
with all dependencies installed.
3.05s vs 0.15s is a pretty significant difference!
Obviously, this doesn't come without drawbacks. I assume yarn check
does more work and is able to correct more scenarios, whereas check-dependencies
will only check top-level packages and will report success if someone has messed-up node_modules
otherwise. But it works good as a quick check "Do I have current dependencies or do I have to invoke yarn
/npm install
before running my gulp task?".
yarn check --verify-tree
should be a lot faster than a yarn check
, but unfortunately does not work for yarn workspaces
where you have hoisted node_modules
.
This package doesn't support that either, though.
root
package.json
node_modules/
a-module-dep
packages/
a-module
package.json