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

Doctor mode #722

Merged
merged 14 commits into from
Aug 29, 2020
Merged

Doctor mode #722

merged 14 commits into from
Aug 29, 2020

Conversation

raineorshine
Copy link
Owner

@raineorshine raineorshine commented Aug 16, 2020

Add --doctor option to iteratively install upgrades and run tests to identify breaking upgrades.

$ ncu --doctor
npm install
npm run test
ncu -u
npm install
npm run test
Failing tests found:
/Users/raine/projects/npm-check-updates/test/doctor/fail/test.js:13
  throw new Error('foo')
  ^
Now let's identify the culprit, shall we?
Restoring package.json
Restoring package-lock.json
npm install
npm install ncu-test-v2@2.0.0
npm run test
  ✓ ncu-test-v2 1.0.0 → 2.0.0
npm install ncu-test-return-version@2.0.0
npm run test
  ✗ ncu-test-return-version 1.0.0 → 2.0.0

@raineorshine
Copy link
Owner Author

@XhmikosR I'm really excited to add this new feature, but something's wrong with the output on Windows. Would you possibly be able to take a look? Would be a big help!

@stoically
Copy link
Collaborator

Excellent addition, thanks for working on this!

@gabriel-kohen-by
Copy link

I love this one. Can we configure additional tasks to run on --doctor mode? test task is obvious but we have some breaks during the actual tasks build.
Thank you.

@raineorshine
Copy link
Owner Author

I love this one. Can we configure additional tasks to run on --doctor mode? test task is obvious but we have some breaks during the actual tasks build.
Thank you.

@gabriel-kohen-by Good idea! Perhaps an option for doctor to run an arbitrary npm script?

ncu -u --doctor --doctor-test foo

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

Successfully merging this pull request may close these issues.

None yet

3 participants