Commit Graph

3688 Commits

Author SHA1 Message Date
Rhys Arkins bc652673ba fix: properly handle null rollback 2018-06-05 10:48:38 +02:00
Rhys Arkins 05260a5b16 refactor: remove semver dependency from github datasource
Instead, perform isVersion filter in lookup
2018-06-05 08:15:11 +02:00
Rhys Arkins 98e9198c8e refactor: replace indexOfs 2018-06-04 20:44:32 +02:00
Connor Brathwaite 398303235b (refactor): delegate generic predicate checking to @sindresorhus/is (#2021)
Closes #1764
2018-06-04 20:07:22 +02:00
Rhys Arkins 9fbaf9a3ca fix: unpublishable / unpublishSafe
Corrected logic mistake and renamed unpublishable (internal) to canBeUnpublished to make it easier to follow logic.

Closes #2080
2018-06-04 14:56:47 +02:00
Rhys Arkins 0aaee7bd82 refactor: simplify lookup 2018-06-04 12:23:21 +02:00
Rhys Arkins c21029ecbb refactor: rename some versioning interface (#2078)
isPinnedVersion -> isVersion
rangify -> getNewValue
2018-06-04 06:03:21 +02:00
Rhys Arkins d8cb261ecb refactor: rename version -> value (#2076)
Renames currentVersion to currentValue, newVersion to newValue, newVersionMajor to newMajor, and newVersionMinor to newMinor.
2018-06-04 05:48:20 +02:00
Ayoub Kaanich 549b12529f feat: use versionScheme for changelog 2018-06-03 19:32:34 +02:00
Ayoub Kaanich ec53ef78e9 refactor: lookup use versioning wrapper 2018-06-03 18:08:32 +02:00
Rhys Arkins 0523a6ef99 refactor: simplify filterVersions 2018-06-03 16:45:34 +02:00
Rhys Arkins 527c355b48 refactor: move getRangeStrategy to manager (#2072) 2018-06-03 14:25:05 +02:00
Rhys Arkins dd09707c20 refactor: default versionScheme to ‘semver’ 2018-06-03 07:43:09 +02:00
Rhys Arkins a8786a1714 logs: don’t log full pr in branch 2018-06-01 19:33:52 +02:00
Rhys Arkins 5a8c9f57f6 logs: info not warn for no rollback 2018-06-01 17:51:14 +02:00
Rhys Arkins 784a0598b9 refactor: use options for github datasource 2018-06-01 15:32:17 +02:00
Rhys Arkins bc7728f1d2 refactor: use purl.parse 2018-06-01 14:48:49 +02:00
Rhys Arkins d02914fd3b tests: update test for repositoryUrl 2018-06-01 10:11:42 +02:00
Rhys Arkins e39cc9a584 feat: use purl for package lookups (#2041) 2018-06-01 09:02:51 +02:00
Rhys Arkins 54e4733ca5 refactor: fetch return if skipReason present 2018-05-31 21:02:07 +02:00
Rhys Arkins d6132ff634 fix: flatten only if updates are present 2018-05-31 20:53:29 +02:00
Rhys Arkins a8bcd004dd logs: fix fileCount 2018-05-31 13:07:09 +02:00
Rhys Arkins f347e500a0 fix: use getBranchPr for finding open PR for rebase check 2018-05-30 11:03:30 +02:00
Rhys Arkins d71639bbf8 refactor: fetch array or object 2018-05-29 10:27:41 +02:00
Rhys Arkins 7b149df595 logs: less debug 2018-05-28 22:25:33 +02:00
Rhys Arkins f211ebedaa fix: limit embedded changelogs to last 20 releases 2018-05-28 17:11:55 +02:00
Rhys Arkins b43f51dac7 fix: embed release notes for at most first 50 releases
Closes #2032
2018-05-28 10:13:50 +02:00
Rhys Arkins 941d06172d fix: fortify get changelog to not error
Adds check for res before res.project and wraps in try/catch so that any future errors are ignored and don’t stop the PR.

Fixes #2023
2018-05-26 06:58:02 +02:00
Rhys Arkins 2610015467 fix: abort repository when lockfile error 2018-05-24 16:28:36 +02:00
Rhys Arkins 7f8dd25a97 refactor: matchesSemver -> matches 2018-05-21 17:40:15 +02:00
Rhys Arkins 63f2669153 refactor: semverSort -> sortVersions 2018-05-21 17:35:50 +02:00
Rhys Arkins 7a1d30c8b6 refactor: move semver to lib/versioning 2018-05-21 17:30:55 +02:00
Rhys Arkins d45f957cfd refactor: defer isX upgrade classifications 2018-05-21 17:20:41 +02:00
Rhys Arkins 2f1e1a979a fix: Revert "feat: permission check in initRepo (#1983)"
This reverts commit 09978ae8dd.
2018-05-19 09:15:10 +02:00
Dragomir Țurcanu 09978ae8dd feat: permission check in initRepo (#1983)
Added permission checking on `initRepo` which, in case of an error, throws a clear message (`The token doesn't have the write permissions to the repository`)

Closes #509
2018-05-19 08:33:41 +02:00
Rhys Arkins c89929d3e2 fix: rename changelog cache file 2018-05-19 08:22:37 +02:00
Marco Massarotto 929231b46c Feat/allow ghe changelog (#1981)
This PR follows up and fixes #1968

The previous PR didn't behave correctly as it was expecting Github Enterprise to ALWAYS been configured and that the github.com token was available in the `GITHUB_COM_TOKEN` env variable.
But for non GHE project `GITHUB_COM_TOKEN` is not defined and github.com token is available at the `GITHUB_TOKEN` env variable instead.

This updated PR fix this issue and avoid further problems by prioritising `github.com` over GHE.
Now the code is NOOP if no `GITHUB_ENDPOINT` is configured.

If it's configured, instead, now the codes assumes that, by DEFAULT, a dependency is hosted on `github.com` so it removes `GITHUB_ENDPOINT` and use `GITHUB_COM_TOKEN` as Github token immediately.
They are restored only if needed, when a dependency is hosted on the provided GithubEnterprise.
2018-05-19 07:44:56 +02:00
Rhys Arkins 702ccee67a refactor: rename changelog fields 2018-05-18 17:20:20 +02:00
Rhys Arkins 7f4cb4aa57 feat: rangeStrategy (#1954)
This PR replaces the existing `pinVersions`, `upgradeInRange` and `versionStrategy` settings with a single one: `rangeStrategy`.

Previously:
 - `pinVersions` could be `true` or `false`, but defaulted to `null`, which meant that Renovate would decide. `true` meant that Renovate would replace existing ranges like `^1.0.0` with an exact/pinned version such as `1.2.0`.
 - `upgradeInRange` could be true or false, default to false. If `true`, it would mean Renovate would replace an existing range like `^1.0.0` with something like `^1.2.0`
 - `versionStrategy` could be `replace` or `widen` and was mainly used for `peerDependencies` to widen existing ranges, e.g. from `^1.0.0` to `^1.0.0 || ^2.0.0`

It was possible to set conflicting settings, e.g. configuring `pinVersions=true` and `upgradeInRange=true`.

Now, we combine them into a single setting: `rangeStrategy`:
 - `auto` = Renovate decides (this will be done on a manager-by-manager basis)
 - `pin` = convert ranges to exact versions
 - `bump` = same as `upgradeInRange` previously, e.g. bump the range even if the new version satisifies the existing range
 - `replace` = Same as pinVersions === false && upgradeInRange === false, i.e. only replace the range if the new version falls outside it
 - `widen` = Same as previous versionStrategy==='widen'
2018-05-17 07:16:13 +02:00
Rhys Arkins 407b302cfe logs: info not warn for no packageFile content 2018-05-16 08:50:30 +02:00
Rhys Arkins 6dbf9c52ad fix: Revert "feat: support retrieving changelog from ghe hosted repositories (#1968)"
This reverts commit f2fb2e6bda.
2018-05-16 07:04:59 +02:00
Rhys Arkins c4d3b3dfb4 refactor: pass bad credentials error from branch to repo 2018-05-16 07:03:27 +02:00
Marco Massarotto f2fb2e6bda feat: support retrieving changelog from ghe hosted repositories (#1968) 2018-05-16 06:38:14 +02:00
Rhys Arkins 791f31b9ac fix: handle null content returned for package file 2018-05-16 06:37:26 +02:00
Rhys Arkins 4f5896c908 refactor: monorepo -> internal-package 2018-05-15 13:46:41 +02:00
Rhys Arkins 409cd4adde refactor: monorepoPackages -> internalPackages 2018-05-15 07:21:10 +02:00
Rhys Arkins 2b2b1d92ab logs: packageFiles -> config 2018-05-14 07:56:17 +02:00
Rhys Arkins 69b264cf01 fix(npm): don’t read npmrc files if ignoreNpmrcFiles=true 2018-05-13 23:06:27 +02:00
Rhys Arkins ebe9607d79 fix(npm): npmrc/ignoreNpmrc logic 2018-05-13 22:04:06 +02:00
Rhys Arkins 49bbcd48e8 fix(onboarding): rebase existing content
# Conflicts:
#	lib/workers/repository/onboarding/branch/rebase.js
2018-05-13 14:43:07 +02:00