Commit graph

67 commits

Author SHA1 Message Date
Rhys Arkins
f582181504 fix: check day of month in schedule (#1048)
Fixes #1047
2017-10-25 11:37:05 +02:00
Rhys Arkins
31e7c8a881 refactor: move languages from branch worker to manager (#1044) 2017-10-25 06:48:08 +02:00
Rhys Arkins
a65a149b8d fix: try/catch dockerfile replace (#1022) 2017-10-23 11:28:46 +02:00
Rhys Arkins
2fa50b3771 feat: rebase branch whenever versions need updating (#1018) 2017-10-21 16:42:40 +02:00
Rhys Arkins
76ddde1cb5 fix: ignored digest pr comment (#1001) 2017-10-20 06:55:52 +02:00
Rhys Arkins
00dabb5dc1 feat: raise pr with warning if lock file generation fails (#994)
Previously, upgrades with failing lock files were not raised as PRs. Usually this is because of missing private module configuration. Now, Renovate will raise a PR but add a comment warning of the error, with the error log. It's raised as a comment because we now won't need to regenerate the lock file error every run, and we don't want to "lose" it if the PR description gets updated.

Closes #600
2017-10-19 14:05:10 +02:00
Rhys Arkins
01211f119f fix: strip duplicates from dependencies log
* fix: strip duplicates from dependencies log

* chore: update prAlreadyExisted log messages
2017-10-18 21:39:10 +02:00
Rhys Arkins
f980fea6ca feat: comment in closed PR when it is blocking an update (github) (#981)
This feature adds a new behaviour to Renovate, where it will now add a comment to any existing closed PRs that are "blocking" currently valid updates. A new API function "ensureComment" has been added, its purpose is so we can ensure there exists only one comment with a certain subject/heading. This lets us prevent duplicates as well as update existing, without having to keep state about it. ensureComment needs porting to gitlab, but should be quite easy.
2017-10-18 15:28:51 +02:00
Rhys Arkins
a4a14861b9 fix: replace some file sync functions with await (#980)
* refactor: await fs.readFile instead of sync version

* fix: replace fs and tmpDir sync with promises
2017-10-18 13:26:56 +02:00
Rhys Arkins
e310887f36 refactor: remove checkForClosedPr
replace with findPr
2017-10-17 11:09:03 +02:00
Rhys Arkins
3d84c22cf0 feat: skip regenerating lock file maintenance if branch exists (#956) 2017-10-16 21:57:48 +02:00
Rhys Arkins
7c410c1283 feat: ignore mistakenly closed PRs and recreated closed (#951) 2017-10-16 13:13:31 +02:00
Rhys Arkins
1a174226ed feat: keep branches/PRs updated when out of schedule (#926)
By default, Renovate will now continue *updating* - but not creating - branches even if off-schedule. This applies to features such as (a) rebasing branches if master changes, (b) updating if new version comes, (c) creating PRs if tests pass, (d) automerging. It is planned that (b) will be configurable in a future feature. To disable this behaviour altogether, set updateNotScheduled to false.

Closes #879
2017-10-13 06:42:17 +02:00
Rhys Arkins
393c24c652 fix: stop attempting branch merge if pr exists (#920) 2017-10-12 17:39:10 +02:00
renovate[bot]
8866603a46 fix(deps): update dependency get-installed-path to v4 (#892)
* fix(deps): update dependency get-installed-path to v4.0.3

* fix
2017-10-08 06:30:01 +02:00
Rhys Arkins
28a18b18da feat: write existing lockfile before regenerating (#881)
It appears that writing the existing lockfile before regenerating a new one can help speed some resolutions up.

Closes #815
2017-10-08 05:52:58 +02:00
Rhys Arkins
913d0cf208 feat: create PRs if branch automerge failed (#888) 2017-10-05 09:31:10 +02:00
Rhys Arkins
1c42140475 fix: write npmrc to subdirectories with lock file (#858)
* fix: write npmrc to subdirectories with lock file

* fix lint
2017-09-29 10:42:16 +02:00
Rhys Arkins
d5f11ad9bd feat: remove {} template strings from package.json name (#855) 2017-09-29 09:18:59 +02:00
Rhys Arkins
23f8467d1e feat: support non-root yarn workspaces (#852)
Previously, Renovate assumed that any yarn workspaces configuration would be in the root of the repository. Now, workspaces can be located within a subdirectory, e.g. `frontend/`. Note: Renovate still supports only one workspace per repository, please file an issue if you require more than one.

Closes #842
2017-09-29 08:08:52 +02:00
Rhys Arkins
9ff555c74b fix: promisify lockfiles (#826)
`npm` and `yarn` lockfile generation use promisified child process `exec` now instead of `spawnSync`.
2017-09-20 22:56:57 +02:00
Rhys Arkins
d7025f25d6 fix: Detect npm & yarn when globally installed (#825)
This fix improves the way Renovate detects embedded/installed npm and yarn. It tries:
- locally installed npm or yarn
- npm or yarn embedded inside globally installed renovate
- globally installed npm or yarn
- global `yarn` or `npm` commands as fallback

Fixes #824
2017-09-20 07:52:44 +02:00
Rhys Arkins
f9b12dbb3e fix: don’t massage packagefile name (#814) 2017-09-15 13:34:53 +02:00
Rhys Arkins
3956877288 fix: use replace rather than full substitution for invalid package file name (#813) 2017-09-15 12:58:06 +02:00
Rhys Arkins
20542e7529 fix: write only updated package.json files when checking for lock files (#810) 2017-09-14 22:10:51 +02:00
Rhys Arkins
760b128b3e feat: massage package.json files before lock file generation (#804)
- Any package names not matching valid pattern will be rewritten to “dummy”
- “engines” and “scripts” fields will be completely removed

Closes #801, Closes #784
2017-09-14 10:54:41 +02:00
Rhys Arkins
a88ba0d16a feat: Dockerfile digest support (#788)
This feature adds initial support for renovating Dockerfiles. Renovate now:
- Detects all `Dockerfile`s in repo
- Searches for `FROM x` in first non-comment line, breaks x into image, tag, digest
- Queries public Docker registry for image:tag combination to find latest digest
- Patches Dockerfile if necessary
- Creates branches/PRs as like with npm

Closes #795
2017-09-14 09:31:36 +02:00
Rhys Arkins
d765b34c33 feat: renovate meteor package.js dependencies (#786)
This feature adds support for renovating Meteor's `package.js` files. Meteor config is disabled by default so must be manually enabled to work. If enabled, Renovate uses GitHub's search API to look for any files named `package.js` that include the text `Npm.depends`. If so then the file is parsed using Regex to extract its dependencies and check them for updates.

Closes #785
2017-09-12 09:33:41 +02:00
Rhys Arkins
e5654fc812 fix: convert only first line of commit message to lowercase (#779)
Helps #777
2017-09-07 21:18:50 +02:00
Rhys Arkins
1a395a3dd9 fix: fix and improve schedule migrations (#761)
* fix: migrate “every xday” to “on xday”

* fix: do not migrate before and after if before is after after

e.g. do not migrate “after 1am and before 5am”
2017-09-01 11:27:54 +02:00
Rhys Arkins
16d36a15e2 feat: add npmToken, npmrc and yarnrc configuration support (#753)
Renovate config can now support the fields `npmToken`, `npmrc` and `yarnrc`. `npmrc` and `yarnrc` (note no `.` prefix) can be used as an alternative to checking the respective files into the repo and have the same effect. `npmToken` is a shorter alternative and allows for just the npm token to be added, defaulting to the public npm registry.
2017-08-29 09:25:44 +02:00
Rhys Arkins
6e9c73e35a feat: restart repo renovate after automerge (#751)
Previously, the automerge feature was causing some undesirable behaviour when multiple branches were open at the same time. Example: #707. The main problem is that other branches will still be calculated based on the original `package.json` contents and not the post-merge contents. The simplest solution seems to be:
- Stop all subsequent branch processing after any automerge
- Restart repository renovation
This continues until no branch has automerged in a cycle.

Closes #750
2017-08-28 15:50:11 +02:00
Rhys Arkins
8ebb32cd87 feat: display extended error in onboarding if lookup fails (#744)
Closes #626
2017-08-27 13:55:41 +02:00
Rhys Arkins
7c3df0ba23 feat: yarn workspaces lock file support (#743)
This feature adds explicit support for correctly generating the yarn.lock file for workspaces. Specifically, it means that the yarn.lock in the root directory is regenerated whenever *any* package.json is modified. Previously lock files were only every updated if its corresponding package.json changes, but that is not the way yarn workspaces works.

Closes #473
2017-08-27 08:17:34 +02:00
Rhys Arkins
ea9ace2a76 feat: branch worker updates (#736)
This is a major refactor of branch code to prepare for Yarn workspaces plus creating PRs for branches with failing lockfiles. Marked as "feature" to cause a minor version bump due to the moderate chance of accidentally breaking something.
2017-08-26 16:10:18 +02:00
Rhys Arkins
4bc7009db1 fix: improve schedule massage logic (#725)
- reuse suffix for any “before and after” splits
- move “on every weekday” massage to migrate
2017-08-24 07:04:04 +02:00
Rhys Arkins
e443e6b848 fix: only migrate 'and' schedule if it includes before and after (#724) 2017-08-23 12:38:47 +02:00
Rhys Arkins
21aa961264 feat: re-use node_modules per package file (#704)
tmpDir is now created once per-repository and package.json files are written and lockfiles generated based on the repo's directory structure. This way node_modules can be reused between branches in same run.

Closes #501
2017-08-22 06:28:46 +02:00
Rhys Arkins
b657d3c291 feat: support lock file maintenance automerge (#712)
Refactored the `automerge` field to change it to boolean. Existing string will be migrated to new config. Automerging lock files is now possible by adding `”lockFileMaintenance”: { ”automerge”: true}` to config.

Closes #706
2017-08-21 13:41:48 +02:00
Rhys Arkins
3099bf9da1 fix: migrate last day of month schedule to first of month (#680) 2017-08-15 11:54:36 +02:00
Rhys Arkins
26bafe8d7a fix: massage “on every” to “every” in schedules (#677) 2017-08-15 07:18:45 +02:00
Rhys Arkins
c38e2cdcfe fix: wrap and warn non-array schedule (#676) 2017-08-14 22:16:28 +02:00
Rhys Arkins
43660d51c4 feat: validate schedule (#674)
Also enables config errors to be shown in Configure Renovate PR.

Closes #550
2017-08-14 11:09:14 +02:00
Rhys Arkins
e9f672060e fix: disable unpublish-safe default (#672)
It was a mistake to enable this feature by default, and should be disabled. A check has been made to set the status to “success” if it was previously “pending” and the setting is now false. This should also cover the case when someone enables it and then disables it.

Fixes #667
2017-08-14 06:27:00 +02:00
Rhys Arkins
117316c0b1 fix: check current status check before setting (#655)
Fixes #649
2017-08-08 23:03:52 +02:00
Rhys Arkins
d7a6bbe367 feat: unpublish-safe status check (#635)
Renovate now adds a status check renovate/unpublish-safe that has the following behaviour:
If any upgrade in the branch is < 24 hours old then the status check state is "pending"
If all upgrades in the branch are 24 hours or more old then the status check state is "success"
This is able to be disabled via a new option "unpublishSafe".

Closes #494
2017-08-06 15:38:10 +02:00
Rhys Arkins
ae38fd5d06 fix: return false after successful branch automerge (#631)
This prevents attempts to view the PR or check branch status again.

Fixes #499
2017-08-06 06:36:04 +02:00
Rhys Arkins
a1e1b1770f fix: log full package lock generation error (#621) 2017-08-05 05:53:24 +02:00
Rhys Arkins
e913feb6ab fix: npm and yarn use branch logger (#615)
Closes #506
2017-08-04 16:23:45 +02:00
Rhys Arkins
b51915912f fix: check for legacy pr title format (#606)
Checks for legacy PR title format so we don't accidentally recreate any of those.
2017-08-04 11:55:49 +02:00