Commit graph

335 commits

Author SHA1 Message Date
Rhys Arkins
d2f54ba763
fix: do not escape unlinked depNames in pr bodies (#1275) 2017-12-07 13:57:30 +01:00
Rhys Arkins
696aaa38af
refactor: slim down onboarding PR description (#1274) 2017-12-07 13:32:56 +01:00
Rhys Arkins
987891ba2e
feat: bazel WORKSPACE support (#1268)
This PR adds support for bazel WORKSPACE package files, as suggested https://github.com/alexeagle/angular-bazel-example/issues/17#issuecomment-349167982

Renovate will:
1. Detect `WORKSPACE` files anywhere in the repository
2. Look for all `git_repository()` sections in the file
3. Extract any dependencies with name, remote and tag values
4. Look up any dependencies that (a) have a github https remote, and (b) a valid semver as tag
5. Update the tag to the latest available
2017-12-07 09:22:10 +01:00
Rhys Arkins
04e505d483
fix: handle existing range with no matching versions (#1273) 2017-12-06 18:53:55 +01:00
Rhys Arkins
b8dadb718d
feat: travis.yml node_js versions support (#1243)
This PR adds support for renovating the `node_js` versions in `.travis.yml` configuration files. Important notes:
- Functionality is disabled by default and hence opt-in via configuration
- Added a new manager type `node` because it is anticipated to support more than just Travis in future, with mostly unified logic
- Added the config option "policy" with supported values: lts, active, current, lts_latest and lts_active
- Policy is actually an array, to allow additive combining, e.g. `["lts_latest", "current"]`
- Actual node versions are *hardcoded*. There is no perfect metadata source for this and they change infrequently enough that it is definitely not a problem for now (next change will be in April 2018)
- If node versions need updating, they are listed from newest to oldest
- Replacing function attempts to detect the indention (spacing) in file and use that

To enable, configure `node.enabled=true` and optionally `node.policy=["<policy>"]` if you want something other than `lts`.

Closes #1208
2017-12-05 07:50:16 +01:00
JYC
ab3372d33c feat: copy local packages (#1244)
If we have in a package.json links to some local lib file:../path/to/folder
Then the local lib package.json will be copied to the tmp folder to be able to generate the right yarn lock file. This is not working with tgz files, only folder reference.

Closes #1215
2017-11-30 06:43:56 +01:00
Rhys Arkins
8e136c7143
fix: do not delete branches if PR creation fails (#1252)
GitHub’s API is behaving too flakily and this can end up with closing PRs by accident, which then block future PRs. See https://github.com/ikatyang/emoji-cheat-sheet/pull/110 for example problem
2017-11-28 17:11:52 +01:00
Rhys Arkins
eabff37a15
fix: exit gracefully if no files to commit (#1242)
This handles case where checking for lock file maintenance but lock file is up-to-date.
2017-11-27 08:25:07 +01:00
Rhys Arkins
72d46c20e2
refactor: remove label and assignees description from onboarding pr (#1235)
These can now be described via presets instead
2017-11-24 12:03:57 +01:00
Rhys Arkins
779ca36bc1
refactor: use semanticCommitType chore for pin/digest (#1234) 2017-11-24 10:58:44 +01:00
Rhys Arkins
65a5e90bb7
feat: split semanticPrefix into type and scope 2017-11-24 07:14:58 +01:00
Rhys Arkins
d0a08734e5
fix: remove semanticPrefix override from pin.group to pin (#1231) 2017-11-23 19:49:14 +01:00
Rhys Arkins
7675f3a9f1
fix: replace singapore/renovate references with renovateapp/renovate (#1229) 2017-11-23 14:08:31 +01:00
Rhys Arkins
8ea800dce0
fix: drop “fix devDependencies” customisation (#1198) 2017-11-19 06:32:06 +01:00
Rhys Arkins
4c4d5cfdac
refactor: check unpublishsafe only if configured (#1186) 2017-11-16 22:34:49 +01:00
Rhys Arkins
15c3a9a8be
refactor: use fileList to speed up getFile 404s (#1175) 2017-11-16 07:13:50 +01:00
Rhys Arkins
c89b957b8a
refactor: defer branch protection check (#1173) 2017-11-15 15:31:20 +01:00
Rhys Arkins
7c72156562
refactor: move semantic commit detection from init to later updates (#1170) 2017-11-15 13:39:44 +01:00
Rhys Arkins
59d3be4d1c
fix: replace h4 with ** (gitlab) (#1167)
Helps #954
2017-11-14 20:44:32 +01:00
Rhys Arkins
d2cd755f37
feat: persistent disk cache for changelog data (#1163)
Use `cacache` to persist changelog results between runs.
2017-11-13 17:44:09 +01:00
JYC
e16e2ff6f2 chore: fix dev environment for Windows (#1156)
- use cross-env for jest
- escape `prettier` script
- remove snapshots that include `path.join()`

Closes #1148
2017-11-12 14:44:10 +01:00
JYC
c9335d5bf6 Add VSTS support (#1049)
This PR adds support for Microsoft's [Visual Studio Team Services](https://www.visualstudio.com/team-services/) platform (in addition to existing GitHub and GitLab support). 

Closes #571
2017-11-12 10:26:53 +01:00
Rhys Arkins
6d17d4a58d
fix: only ignore monorepo packages if matching glob (#1153)
Previously, packages within a workspace or lerna project were ignores across the entire repo. Now, they are only ignored within package files that exist in the same lerna project or yarn workspace.

Closes #1147
2017-11-12 10:16:46 +01:00
Rhys Arkins
ce88c32f94
refactor: drop {{#if isGitHub}} from templates (#1150)
Pull Request and PR are already search/replaced in JS code for GitLab.
2017-11-12 07:22:13 +01:00
renovate[bot]
f4211f5386 chore(deps): update dependency jest to v21 (#775) 2017-11-10 15:02:25 +01:00
Rhys Arkins
3e34d52819
feat: cache changelog responses (#1143)
Returns cached value if from the to versions are an exact match. No expiry.

Closes #262
2017-11-10 14:48:14 +01:00
Rhys Arkins
ede1a59527
feat: support .renovaterc json configuration file (#1142)
Renovate will now check for `renovate.json`, `.renovaterc`, and `.renovaterc.json` in that order. JSON-only supported (no YAML).

Closes #969
2017-11-10 14:10:16 +01:00
Rhys Arkins
ca5b080aac
refactor: check blocked PR before checking schedule (#1140)
Instead of checking schedule first, now we check first if the PR is blocked by a closed PR. This provides more consistent feedback.

Closes #1100
2017-11-10 13:32:33 +01:00
Rhys Arkins
28a7ea7193
feat: enable Docker minor and patch tag upgrades (#1137) 2017-11-10 13:11:51 +01:00
Rhys Arkins
8a87bcd918
feat: rebase onboarding branch (#1139)
Previously, Renovate's "Configure Renovate" onboarding branch would never get rebased after it was created. Now, it will be rebased every time the base branch is updated, unless the list of modified files is more than `renovate.json` alone.

Closes #1111
2017-11-10 13:07:06 +01:00
Rhys Arkins
30b82c06a7
fix: gitlab MR bodies should use html (#1134) 2017-11-10 09:15:51 +01:00
Rhys Arkins
51cde5d03f
feat: multipleMajorPrs (#1129)
With this PR, Renovate will default to raising only one major PR at a time. e.g. if you have Webpack 1.x then you will get only one major PR for webpack v3 and not also for v2. set multipleMajorPrs=true to get multiple.

Closes #1101
2017-11-10 04:57:07 +01:00
Rhys Arkins
4cebc7ad64
feat: unstablePattern (#1125)
This adds a configuration option unstablePattern - used only by Docker currently - that can be used to define a regex patternt to identify “unstable” versions.

Closes #1035
2017-11-08 21:57:34 +01:00
Rhys Arkins
f044aca321 refactor: streamline platform file operations (#1121)
Remove original getFile, getFileContent, and getFileJson and replace with getFile (which used to be getFileContent.. shortened now for convenience). Also remove unused getSubdirectories functions.
2017-11-08 12:23:32 +01:00
Rhys Arkins
00e7821fcb
feat: use mostly markdown for pr bodies (#1118)
Existing solution uses HTML bodies for PR descriptions, as that was the easiest way to get consistency between GitHub and GitLab. However, VSTS supports only markdown so we needed to refactor how this is done. Now, GitHub PR bodies uses only minimal HTML (for summary/details) while GitLab PR bodies are converted to HTML using GitHub flavoured markdown for maximum compatibility. VSTS will be able to strip out the minimal markdown.

Closes #1018
2017-11-08 11:09:26 +01:00
Rhys Arkins
8c479071fd
refactor: use global logger (#1116) 2017-11-08 06:44:03 +01:00
Rhys Arkins
f8be45055a
refactor: remove config.api and use platform dispatcher (#1114) 2017-11-07 11:46:10 +01:00
Rhys Arkins
edfca74ede
refactor: make common platform public API (#1104)
Refactors file system of platforms and adds test to ensure GitHub and GitLab have same module.exports signatures.
2017-11-05 08:18:20 +01:00
Rhys Arkins
f4d0fea6ae
fix: use colon not at when describing existing docker image:tag (#1103) 2017-11-05 06:17:16 +01:00
Rhys Arkins
80bed05146
feat: return result from renovateRepository
Repository logic code has been rearranged for better logic and file separation.

Closes #654
2017-11-05 05:45:49 +01:00
Rhys Arkins
8c27d97d5d
feat: rebase stale pin branches (#1099) 2017-11-03 20:15:44 +01:00
Rhys Arkins
d5462049a6
chore: implement require-await eslint rule (#1095) 2017-11-03 11:56:25 +01:00
Rhys Arkins
dcdfc0d004
fix: refactor pin dependencies first using array.some (#1094) 2017-11-03 11:50:57 +01:00
Rhys Arkins
935a70e88c
refactor: use plain markdown for onboarding pr body (#1093)
This PR refactors the onboarding PR logic into its own subdirectory and redesigns it to use plain markdown instead of html. Plain markdown in PR bodies is a requirement for adding VSTS Support ( #1049 ).
2017-11-03 10:01:54 +01:00
Rhys Arkins
9769f5a5db
refactor: detectPackageFiles returns packageFiles not config (#1092) 2017-11-03 09:25:18 +01:00
Rhys Arkins
9c1b7d78cd
refactor: move monorepos logic to npm manager (#1091)
* refactor: move monorepos logic to npm manager

* fix test
2017-11-03 09:06:42 +01:00
Rhys Arkins
543d93c520
refactor: move migrate-validate to config/ (#1090) 2017-11-03 08:25:51 +01:00
Rhys Arkins
9dd3fd968c
feat: rename mistakenly closed PRs (#1085)
Renovate already detects PRs mistakenly closed during a certain time period when a bug was present. Now, it will rename those so that they are no longer detected and the ignore code does not have to remain indefinitely.
2017-11-03 06:29:29 +01:00
Rhys Arkins
90c3b1cdbd
fix: add gitlab MR labels at time of creation (#1006)
This refactor means that createPr now takes `labels` as a new parameter so that the GitLab API can include them with the MR creation request, so save one API call. This also fixes #985 as a result.
2017-11-01 13:55:36 +01:00
Rhys Arkins
58784fc958 feat: add renovateFork option
99% of the time we should not Renovate forked repositories. Previously, we skipped onboarding them unless a renovate.json was present. However, that meant that if someone forked a repository where the source was using Renovate, then the fork gets renovated automatically too. After this change, forked repositories need to set renovateFork=true in their renovate.json

Closes #940

BREAKING CHANGE: Forked repositories now need to configure renovateFork=true in renovate.json
2017-11-01 13:13:55 +01:00
Rhys Arkins
138d99a04f feat: default lockFileMaintenance to disabled (#1066)
Closes #590

BREAKING CHANGE: lock file maintenance is now disabled by default.
2017-11-01 13:13:55 +01:00
Rhys Arkins
950c65f827 feat: default pinVersions to null (autodetect) (#1062)
By defaulting pinVersions to null, this allows Renover to autodetect on a per-package file basis. Users may still manually configure (override autodetection) pinning enabled or disabled via config.

Closes #589

BREAKING CHANGE: Renovate will no longer default to pinning versions - instead it will autodetect whether to pin, unless overrided.
2017-11-01 13:13:55 +01:00
Rhys Arkins
2cd741d1df feat: deprecate ignoreFuture configuration option (#1063)
Drop support for (unused) ignoreFuture option.

Closes #588

BREAKING CHANGE: Support is removed for ignoreFuture configuration option
2017-11-01 13:13:55 +01:00
Rhys Arkins
56e6bd32b5
refactor: log if repository is a configured fork (#1071) 2017-11-01 11:42:20 +01:00
Rhys Arkins
780b3f3175
feat: autodetect js type during runtime (#1053)
This is instead of autodetecting lib or app during onbiarding. This means some package files might be all pinned while others in the same monorepo can be not. This also simplifies the onboarding logic.
2017-10-29 05:15:59 +01:00
Rhys Arkins
f582181504 fix: check day of month in schedule (#1048)
Fixes #1047
2017-10-25 11:37:05 +02:00
Rhys Arkins
0427604de6 refactor: move language extraction logic to manager (#1046)
* refactor: move docker and meteor extraction to manager

* refactor: move resolve docker logic to manager

* refactor extract config
2017-10-25 10:11:11 +02:00
Rhys Arkins
31e7c8a881 refactor: move languages from branch worker to manager (#1044) 2017-10-25 06:48:08 +02:00
Rhys Arkins
7d06bebe2e refactor: push detect dockerfiles to manager (#1043)
* refactor platform

* refactor detect package files

* fix

* refactor npm detect

* refactor meteor detect

* refactor: move detect package files completely to manager

* update snapshots
2017-10-25 06:00:07 +02:00
Rhys Arkins
da1ded5344 refactor: move more package worker logic to manager 2017-10-24 15:46:47 +02:00
Rhys Arkins
3b180aa679 refactor: move workers/package/npm to manager/npm/package 2017-10-24 15:46:47 +02:00
Rhys Arkins
d134d8b38e refactor: move workers/package/docker to manager/docker/package 2017-10-24 15:46:47 +02:00
Rhys Arkins
3960da6e38 refactor: use manager subdirectory for grouping (#1040) 2017-10-24 13:12:44 +02:00
Rhys Arkins
a2bdcde8fb fix: check for dockerfile content before processing (#1039) 2017-10-24 12:11:37 +02:00
Rhys Arkins
fbf0824dd8 refactor: rename lib/api to lib/registry (#1038)
docker and npm
2017-10-24 10:40:47 +02:00
Rhys Arkins
01fedc7e0c refactor: move github and gitlab api to platform (#1037) 2017-10-24 10:27:17 +02:00
Rhys Arkins
435478864e feat: renovate docker tag major/minor versions (#1029)
This feature enables docker tag "upgrading". Examples:
- From `node:6` to `node:8`
- From `node:6.10` to `node:6.11`
- From `node:6.11.1` to `node:6.11.3`
- From `node:6.10-onbuild` to `node:6.11-onbuild`
Currently these are disabled by default so they are opt-in, you can enable them by setting e.g. `{ docker: { minor: { enabled: true }, major: { enabled: true }}`

Closes #930
2017-10-24 06:36:52 +02:00
Rhys Arkins
9c16565a2d feat: enable docker by default (#1026)
Docker does now not need to be explicitly enabled.

Closes #942
2017-10-23 13:59:33 +02:00
Rhys Arkins
9bac600caf refactor: filter pinned dependencies first (#1023) 2017-10-23 12:45:32 +02:00
Rhys Arkins
a65a149b8d fix: try/catch dockerfile replace (#1022) 2017-10-23 11:28:46 +02:00
Rhys Arkins
9c9da3f6de fix: error and exit if cannot parse renovate.json (#1019) 2017-10-22 07:47:18 +02:00
Rhys Arkins
2fa50b3771 feat: rebase branch whenever versions need updating (#1018) 2017-10-21 16:42:40 +02:00
Rhys Arkins
50295417d4 fix: don’t prefix ranges with v in pr body (#1017) 2017-10-21 15:15:22 +02:00
Rhys Arkins
636c7d17de feat: skip group name if all depNames are the same (#1015)
This commonly applies to monorepos where the same dependency may be present in multiple.json files. Instead of using the group name to describe the PR, it uses the dependency name.

Closes #848
2017-10-21 07:46:47 +02:00
Rhys Arkins
d3df597aa7 fix: only detect meteor files that include json Npm.depends (#1009) 2017-10-20 14:29:12 +02:00
Rhys Arkins
34a7a459da fix: disabled types should be filtered out by package worker (#1005)
Closes #1004
2017-10-20 09:58:09 +02:00
Rhys Arkins
aba27eb757 feat: enable meteor by default (#1002)
Renovate will now check for and update meteor package.js files unless explicitly *disabled*.
2017-10-20 07:04:04 +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
1146cfbfe4 fix: pin prs should recreate closed (#991) 2017-10-19 13:10:59 +02:00
Rhys Arkins
fa48a7fdef feat: rename open prs before autoclosing (#990)
This is a failsafe against Renovate bugs and potentially also mistakes on the user’s part. Before deleting/pruning any branches, Renovate will rename the PR’s title so that it should not block future PRs.

Closes #989
2017-10-19 07:36:09 +02:00
Rhys Arkins
e5895aeecf refactor: use findPr for getBranchPr 2017-10-19 06:26:29 +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
652b910d81 fix: only detect meteor package.js files containing Npm.depends (#953)
Closes #952
2017-10-16 14:21:45 +02:00
Rhys Arkins
7c410c1283 feat: ignore mistakenly closed PRs and recreated closed (#951) 2017-10-16 13:13:31 +02:00
Rhys Arkins
ee44d1c3ba feat: reimplement findFilePaths using trees (#950)
* refactor: replace github code search with getTree/manual search (#944)

Previously Renovate was using the GitHub code search API once for each filename we are looking for. Instead, we now retrieve a list of files in the repository and cache it so it can be reused for filename matches.

Closes #939

* fix: use recursive=true

* fix: reset fileList for every repo (github)

* feat: implement findFilePaths on gitlab (#945)

* refactor: do not check manually for root package.json

* fix: reset fileList for every repo (gitlab)

* fix tests
2017-10-16 11:59:59 +02:00
Rhys Arkins
8fc61e35bc feat: add assignees and reviewers whenever status checks fail (#928)
This feature means that you can configure branches/PRs to automerge, but if status checks fail (preventing automerge) then you can still get assigneed the PR to take action. Previously such PRs remained unassigned because we do not assign automerging PRs by default, to reduce noise.

Closes #722
2017-10-13 10:56:18 +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
ad3f8d945f fix: wrap meteor parsing in try/catch (#921) 2017-10-12 18:25:26 +02:00
Rhys Arkins
393c24c652 fix: stop attempting branch merge if pr exists (#920) 2017-10-12 17:39:10 +02:00
Rhys Arkins
8b99ce5294 feat: detect languages during onboarding (#919)
* refactor: simplify onboarding logic

* docker meteor tests

* handle no package files case

* fix coverage
2017-10-12 16:29:20 +02:00
Rhys Arkins
97ebf27382 refactor: getOnboardingStatus returns config object (#918) 2017-10-12 10:58:16 +02:00
Rhys Arkins
e9ee8002df fix: revert docker/meteor onboarding code (#916)
* Revert "feat: support docker and meteor onboarding without npm"

This reverts commit 437145b901.

# Conflicts:
#	test/workers/repository/onboarding.spec.js

* chore: downgrade npm cache message from debug to trace
2017-10-11 19:25:25 +02:00
Rhys Arkins
bf2491bfc1 fix: don’t automerge pinned dependencies (#914) 2017-10-11 16:20:17 +02:00
Rhys Arkins
1696244ca0 feat: warn in onboarding if package.json missing or failed to parse (#911)
* chore: downgrade json parsing warning from warn to debug

* feat: warn in onboarding if package.json missing or failed to parse

Closes #891
2017-10-11 14:38:40 +02:00
Rhys Arkins
83ecc08541 fix: add commitMessage for pin groups (#910)
Fixes #895
2017-10-11 13:10:12 +02:00