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

Yarn support and/or callback #26

Open
taoeffect opened this issue Nov 29, 2016 · 3 comments
Open

Yarn support and/or callback #26

taoeffect opened this issue Nov 29, 2016 · 3 comments

Comments

@taoeffect
Copy link

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.
@OliverJAsh
Copy link

How would this be different from yarn check?

@mgol
Copy link
Owner

mgol commented May 30, 2017

@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?".

@kuceb
Copy link

kuceb commented May 21, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants