I have renovate running with GitLab for some days now. I've noticed that every time renovate finds an updated dependency, it creates a PR with two commits, one with the updated package.json and one with updated or new yarn.lock. Is that the right behavior? I've never used yarn on any of our repos, but now I have the lock file on every one.
What would renovate do if I ignore the lock file through .gitignore? I didn't see anything mentioned in the docs.
It shouldn't be creating that file if you didn't have it already. Can you check if the same behaviour occurs in the latest version and let me know? I fixed a similar bug late last week.
I'm running [email protected] but is true that I started early last week. I'll remove and ignore the yarn.lock file and re-open if see the file being committed again. Thanks.
You shouldn't need to .gitignore the yarn.lock file though. Here's what you can do:
yarn.lock then revert them and/or delete the yarn.lock manuallyyarn.lockrenovate again, setting the recreateClosed option to trueThe reason for recreateClosed is because renovate's default behaviour is to notice if you previously closed a PR for a particular dependency/version and not create the same one again if so. But in this case you are closing because of a bug and not because you want to ignore that version, so you will need to tell renovate to recreate closed PRs (one time only).
I did what you mention and ran again renovate with recreateClosed=true and this is what I get for every update:
debug: Checking if branch exists: renovate/eslint-3.x
debug: Branch doesn't exist
verbose: Creating new branch renovate/eslint-3.x
debug: setNewValue: devDependencies.eslint = 3.17.1
debug: Starting search at index 1485
debug: Found match at index 1551
debug: Replacing "3.15.0" with "3.17.1" at index 1551
debug: Generating new yarn.lock file
error: Error updating dependency eslint: Error: ENOENT: no such file or directory, open '/tmp/tmp-22068v6NLWSwo3Han/yarn.lock'
After this, there is no branch created and no PR generated.
@IGZgustavomarin this should be fixed in renovate version 8.8.3 (just published). Sorry for the inconvenience it caused you and thanks for testing/verifying the bug again. Also thanks to @guumaster for pointing out the fix.
Thanks! By the way, these two are my accounts. One is my company username and the other my personal user.
Haha, OK