Commit Graph

14403 Commits

Author SHA1 Message Date
Rhys Arkins 7ad306da44 feat: allow rollback + upgrades
If a current version is missing, we now return both rollback as well as upgrades if upgrades are present.
2018-05-29 07:13:44 +02:00
Rhys Arkins 6c2cabac6e feat: optimise lerna reuse
Removes `npx` approach and instead installs each version globally.

Closes #1801
2018-05-29 06:25:46 +02:00
Rhys Arkins 7b149df595 logs: less debug 2018-05-28 22:25:33 +02:00
Rhys Arkins 720c280421 refactor: handle lock file errors due to registry not being ready 2018-05-28 20:12:17 +02:00
Rhys Arkins 6f77953795 fix(npm): use —no-audit 2018-05-28 19:41:34 +02:00
Rhys Arkins 4ae2ee10e9 refactor: run find after npm install 2018-05-28 19:19:10 +02:00
Rhys Arkins 98c250af1a fix: log info messages if package being updated fails 2018-05-28 18:47:58 +02:00
Rhys Arkins f211ebedaa fix: limit embedded changelogs to last 20 releases 2018-05-28 17:11:55 +02:00
Rhys Arkins 3ba49df83d refactor: disable non-offline tests 2018-05-28 16:25:53 +02:00
Rhys Arkins 19550a328c refactor: log npm 429 retries 2018-05-28 16:16:30 +02:00
Rhys Arkins 1210300dd2 fix: retry 429 with retry-after 2018-05-28 16:10:23 +02:00
Rhys Arkins 11d5a8b02e fix: don’t update starred versions 2018-05-28 15:18:40 +02:00
Rhys Arkins 1c115ae6b6 refactor: move getRangeStrategy into npm/lookup 2018-05-28 13:25:54 +02:00
Rhys Arkins c9e9bb73a8 fix: widen complex bump range instead of skip 2018-05-28 12:42:02 +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 addf184473 feat: refactor getPackageUpdates for manager expansion (#1994)
The goal of this PR is to refactor npm's version lookup/grouping as much as possible to enable the same logic to be used for other package managers.
2018-05-28 09:09:22 +02:00
Dragomir Țurcanu 65b9934a5b tests: remove semver validation (#2027)
Closes #2024
2018-05-27 16:54:11 +02:00
Rhys Arkins a9f47ca0b0 fix(yarn): read yarnrc contents properly
Properly fixes #2020
2018-05-26 18:22:32 +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 c2100ffc21 fix(yarn): look for .yarnrc for every package file
Closes #2020
2018-05-25 12:12:03 +02:00
Rhys Arkins 2610015467 fix: abort repository when lockfile error 2018-05-24 16:28:36 +02:00
Dragomir Țurcanu 89978d4ebe fix: GitLab MR rebasing logic (#2006)
Fixed the 404 error on branch rebasing. (GitLab)

Closes #1992
2018-05-23 19:26:56 +02:00
Rhys Arkins 6799374e34 fix(npmrc): don’t massage naked ‘_auth’ 2018-05-23 19:18:27 +02:00
Rhys Arkins c338bdd2dd fix(nmprc): massage _auth to _authToken only if base64 encoded 2018-05-23 18:13:17 +02:00
Rhys Arkins d6cc5b0755 fix: default rangeStrateg to “replace” 2018-05-23 11:17:20 +02:00
Rhys Arkins 00031c09fa refactor: return latestVersion with npmjs result 2018-05-21 17:42:49 +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 4c80a433df fix(npm): handle jump between unstable releases in same major
Closes #1990
2018-05-18 16:07:33 +02:00
Rhys Arkins 4822bc5d91 fix: Revert "fix(npm): ignore deprecated versions"
This reverts commit 7fcbb47b3a.
2018-05-18 08:34:34 +02:00
Rhys Arkins ced6ee20bb fix: Revert "fix(npm): deprecate only if deprecated === ‘this’"
This reverts commit 080d945153.
2018-05-18 08:34:17 +02:00
Rhys Arkins 080d945153 fix(npm): deprecate only if deprecated === ‘this’ 2018-05-18 08:23:49 +02:00
Rhys Arkins 7fcbb47b3a fix(npm): ignore deprecated versions
Closes #1988
2018-05-18 07:44:34 +02:00
Rhys Arkins 93379c4b79 refactor: separatePatchReleases -> separateMinorPatch
Closes #1952
2018-05-17 07:40:29 +02:00
Rhys Arkins 6c3645d18c refactor: separateMajorReleases -> separateMajorMinor 2018-05-17 07:37:37 +02:00
Rhys Arkins eaf10143c2 refactor: rename multipleMajorPrs -> separateMultipleMajor 2018-05-17 07:33:59 +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 10fae47aa0 logs: print cmd when lockfile error 2018-05-16 08:22:28 +02:00
Rhys Arkins d8aac6aff6 refactor: run find before installs 2018-05-16 08:20:51 +02:00
Ayoub Kaanich 70252b0513 feat(github): parallel paginate (#1973)
Fetch pages 2..10 in parallel

Closes #1944
2018-05-16 07:23:59 +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