-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Avoid direct upgrade to v2 #770
Conversation
@acburdine This PR requires the implementation of the |
Would we want to cache the results of the |
63cfdfc
to
7e26409
Compare
Waiting for a merge of #772. Then i'll finalise and optimise this PR. |
Not sure i understand 🤔 Could you please expand your suggestion? Thanks :) |
i.e. let cache = false;
module.exports = function resolveVersion(...) {
// precheck conditions here
return Promise.resolve(cache || yarn(...)).then(...) Basically since versionResolver gets called twice (2x) there's no point in making the yarn call twice |
I see. Yeah we can do that 👍 |
2e39b2d
to
81cf6d8
Compare
fa0e5c9
to
cee24a8
Compare
I have changed the code - it was ugly to call the resolver twice. Cache is not needed anymore :) |
@vikaspotluri123 @acburdine This is ready for review. Would be cool if you could double check if i have missed a case. |
Okay i just discovered one case:
|
refs TryGhost#759 - extended version resolver - detect major version jumps
cee24a8
to
fecf402
Compare
Added |
I'll merge this into the 1.9 branch now. I'll open a new PR tomorrow to see all the changes from 1.9 and i'll add a QA list. If you have time helping with testing, let me know! |
refs TryGhost#759 - extended version resolver - detected major version jumps - optimised code around the force flag - added unit tests
refs #759 - extended version resolver - detected major version jumps - optimised code around the force flag - added unit tests
refs #759 - extended version resolver - detected major version jumps - optimised code around the force flag - added unit tests
refs #759
extend version resolver
detect major version jumps
optimised code structure (use proper force option - this was hard to maintain/understand)
add unit tests
do manual test