Commit graph

378 commits

Author SHA1 Message Date
Rhys Arkins
586ec1f5b8 refactor(npm): delete package homepage if it’s a github repo 2018-08-16 18:32:55 +02:00
Rhys Arkins
e9108a0502 refactor(npm): return package tags 2018-08-16 06:19:39 +02:00
Maximilian Gaß
eb167f571c fix(docker): Only add library/ for Docker Hub images (#2369) 2018-08-11 10:03:03 +02:00
Maximilian Gaß
6c8b7f479f fix(docker): resolve relative URLs from registry (#2370)
fix(docker): resolve relative URLs from registry
2018-08-09 17:40:07 +02:00
Maximilian Gaß
e26c6dd32d fix(docker): use library/ prefix instead of amd64/ (#2360)
The default prefix is library/. Using amd64/ as the prefix created weird
issues with pinning to digests that matched no images.
2018-08-07 16:51:40 +02:00
Rhys Arkins
cc2d860556 fix: correct log for npmjs headers 2018-08-07 07:30:59 +02:00
Rhys Arkins
77fb7070f5 fix: supportsDigests 2018-08-07 07:13:11 +02:00
Maximilian Gaß
3a62394435 feat: docker registry authentication (#2339)
Closes #798
2018-08-05 07:25:08 +02:00
Rhys Arkins
048eb6bf6e
feat: github-hosted presets (#2328)
Adds support for GitHub-hosted presets, using the `github>` prefix. Supports single preset per repository only.

Example:

```json
{
  "extends": ["github>renovatebot/renovate"]
}
```

The above would extend the `renovate.json` inside this repository (probably not a good idea, but an example).

Closes #2102, Closes #2312
2018-07-31 06:48:56 +02:00
Nicolas Byl
5a6bce3daa feat(docker): fallback to manifest parsing when digest header is missing (#2316)
As mentioned in #2315 some docker registries don't support the digest header. This PR falls back to parsing the resulting manifest if the header is present.

Closes #2315
2018-07-30 19:00:21 +02:00
Rhys Arkins
ebbc9d5f67 fix(npm): add check before massaging response 2018-07-30 08:42:50 +02:00
Rhys Arkins
83e00f2adc refactor(presets): move more logic into datasource 2018-07-30 08:08:28 +02:00
Rhys Arkins
89de664e7c fix: restore renovate-config to dependency return 2018-07-30 07:36:15 +02:00
Rhys Arkins
32c775265a refactor: separate npm.getPresets 2018-07-30 07:12:30 +02:00
Rhys Arkins
ac5e0313e0 refactor: rename getDependencyInner to getDependency 2018-07-29 16:13:11 +02:00
Rhys Arkins
31f2f4c610 refactor: rename getDependency to getPkgReleases 2018-07-29 16:04:00 +02:00
Rhys Arkins
d336f35ebb logs: log registry and repository when docker token fails 2018-07-26 21:04:23 +02:00
Rhys Arkins
10620707c0 tests: fix coverage 2018-07-26 16:43:12 +02:00
Nicolas Byl
5819c114ea feat: use www-authenticate headers for docker auth (#2314)
Adds support for processing www-authenticate Header to obtain a token from the Docker servers. In particular, this enables Artifactory to work (without username/passwords for now). This is backwards-compatible to Docker Hub which issues this header with the current hard-coded URLs.
2018-07-26 16:25:44 +02:00
Rhys Arkins
7066a5dd99 fix(docker): use tag suffix when looking up new digest 2018-07-21 10:47:29 +02:00
Rhys Arkins
7254b5f16c
feat: use generic lookup for docker (#2280)
Removes custom Docker lookup code and instead integrates it with the generic lookup routine used by other package managers. Logic for digest support was added but is used by Docker-only for now.

Closes #2081, Closes #2276
2018-07-20 09:09:01 +02:00
Rhys Arkins
7a52575738 fix: npm raw/res typo 2018-07-17 20:02:13 +02:00
Rhys Arkins
ad3ac0967c refactor: log npmjs headers 2018-07-17 19:24:05 +02:00
Rhys Arkins
5b15554930 fix(packagist): strip v from versions in response 2018-07-17 09:10:42 +02:00
Rhys Arkins
97c19cf3c3 refactor: packagist use semver composer 2018-07-17 08:23:41 +02:00
Kyle Hornberg
c59a9fdeb5 feat(pip): use PIP_INDEX_URL for repository url (#2240)
Adds support for PIP_INDEX_URL from environmental variables for self
hosted version. This is used instead of any urls set in the config.
2018-07-13 06:22:04 +02:00
Rhys Arkins
11c4741271 refactor: fix import order 2018-07-09 11:15:06 +02:00
Rhys Arkins
98bccb37a9 fix(npm): reset npmrcraw 2018-07-06 17:16:50 +02:00
Rhys Arkins
19e1eab56e fix(pypi): replace all hyphen with underscore before comparing names 2018-07-06 07:34:36 +02:00
Ayoub Kaanich
219950399e feat: endpoints credentials handling 2018-07-06 07:26:52 +02:00
Rhys Arkins
85e40963a0 logs: log pypi lookupUrl if name mismatch 2018-07-05 17:56:23 +02:00
Rhys Arkins
47bd56f10e fix(pypi): normalize name before compare 2018-07-05 17:43:23 +02:00
Rhys Arkins
6d82d7b46a fix: check before lower case 2018-07-05 15:58:43 +02:00
Rhys Arkins
a16754c501 fix: case-insensitive datasource name compare 2018-07-05 15:47:43 +02:00
Rhys Arkins
b2183fe0c2 logs: log regUrl for mismatched npm lookup 2018-07-05 15:42:02 +02:00
Rhys Arkins
16d88aee4c feat: ignoreDeprecated
Renovate now ignores any upgrades that are marked as deprecated, unless the current version is itself also deprecated. The new config option `ignoreDeprecated` can be set to false to disable this if necessary.

Closes #1988
2018-07-05 15:10:50 +02:00
Rhys Arkins
517de6f545
feat: repositoryUrls (#2221)
Adds config option repositoryUrls which can be used by pip to define an alternate host to pypi.

Closes #2181
2018-07-05 11:33:50 +02:00
Rhys Arkins
9153e3905f fix: check returned pypi name against requested name 2018-07-05 11:25:48 +02:00
Rhys Arkins
db38553d05 fix(npm): verify that received package name matches requested name 2018-07-05 11:10:25 +02:00
Rhys Arkins
24a89a775b
feat(npm): deprecation warnings (#2222)
Raises a deprecation warning issue per-dependency. Uses logic that if latest version is deprecated then the package is deprecated.

Closes #1592
2018-07-05 09:16:53 +02:00
Rhys Arkins
1a72984fe2 feat(npm): detect deprecated packages
Adds logic to detect presence of “deprecated” field in latest version. First step towards #1592
2018-07-04 20:33:48 +02:00
Rhys Arkins
4cfc4e769d refactor: skip duplicate setNpmrc 2018-07-03 14:21:46 +02:00
Rhys Arkins
d206897113 refactor: Revert "refactor: debug log npm token for each lookup"
This reverts commit b46a95a9e2.
2018-07-02 19:42:48 +02:00
Rhys Arkins
b46a95a9e2 refactor: debug log npm token for each lookup 2018-07-02 19:25:23 +02:00
Rhys Arkins
068ff16ec4 fix: Revert "feat: endpoint credentials handling (#2146)"
This reverts commit 04e0ca1f80.
2018-07-02 13:18:37 +02:00
Ayoub Kaanich
04e0ca1f80 feat: endpoint credentials handling (#2146)
Refactors credentials/token handling to rely less on env variables and instead use an endpoints middleware for credentials handling.

First step towards #2105
2018-07-02 10:01:42 +02:00
Rhys Arkins
c25e979aad refactor: push docker suffix filter to datasource 2018-06-29 14:28:24 +02:00
Rhys Arkins
0eef46102f refactor: docker getTags filter suffix and version 2018-06-29 14:14:36 +02:00
Rhys Arkins
108e8cb2b6 fix: remove console.log in npm datasource 2018-06-28 10:03:39 +02:00
Rhys Arkins
40962940a0
refactor: harmonize release timestamp (#2189)
Renames "date" and "time" values from datasources to instead be "releaseTimestamp".
2018-06-28 09:07:28 +02:00
Rhys Arkins
88a13f3ab9 fix: loosen default github endpoint check 2018-06-26 14:44:54 +02:00
Rhys Arkins
a08adb4291 fix: don’t replace github token if endpoint is api.github.com 2018-06-25 20:01:22 +02:00
Rhys Arkins
f1e130bf79 fix(docker): pass registry failure up 2018-06-25 00:49:26 +02:00
Ayoub Kaanich
e0ebf03e5a feat: PEP440 ranges (#2137)
Closes #2085
2018-06-19 13:32:05 +02:00
Rhys Arkins
321c5285fb fix: don’t use npm homepage as repositoryurl 2018-06-17 09:40:41 +02:00
Rhys Arkins
124807974a feat(nuget): support changelogs
Refactors nuget lookups to use generatic logic and fill in repositoryUrl to enable changelogs.
2018-06-14 15:52:37 +02:00
Sam Neirinck
87575f49a3 feat: nuget support
Adds basic support for renovating C# project files. The scope is initially limited to:

- .Csproj only (no VB.NET / F#)
- SDK style csproj's only (this is the default in .net core anyway)
- Limited to nuget.org support (no custom repository support)

Closes #935, Closes #2050
2018-06-14 11:17:14 +02:00
Rhys Arkins
688ec14b6a refactor: datasource return array of releases 2018-06-11 14:28:50 +02:00
Rhys Arkins
65eea92c8f refactor: add gitRef to packagist datasource 2018-06-11 13:16:59 +02:00
Rhys Arkins
c82c348c8e refactor: add gitRef to npm datasource 2018-06-11 13:16:42 +02:00
Rhys Arkins
dc9125e4a3 refactor: add gitRef to github datasource 2018-06-11 13:15:47 +02:00
Rhys Arkins
819acba06a refactor: Revert "refactor: use gitRef instead of gitHead"
This reverts commit 29d00aa477.
2018-06-11 10:30:40 +02:00
Rhys Arkins
29d00aa477 refactor: use gitRef instead of gitHead 2018-06-11 10:21:55 +02:00
Rhys Arkins
bb78d47e15 refactor: filter and sort versions in datasource 2018-06-11 09:55:44 +02:00
Rhys Arkins
371c10f259 refactor: rename clean=true to sanitize=true 2018-06-11 07:15:54 +02:00
Ayoub Kaanich
dc143eb4e5 fix: use better tag endpoint for github datasource 2018-06-11 06:54:17 +02:00
Rhys Arkins
01d2fb3bca
feat: datasource wrapper (#2100)
Adds a wrapper to all datasources to provide a generic purl-based interface.
2018-06-08 10:49:08 +02:00
Ayoub Kaanich
697b80aaf0 feat: composer exact semver support (without lockfile updates) (#1993)
This PR adds the packagist datasource plus basic exact semver Composer support. Composer lockfile updating is not yet supported.
2018-06-08 06:15:13 +02:00
Rhys Arkins
603b77799b
feat: refactor unpublishSafe for multiple package managers (#2090) 2018-06-06 11:04:54 +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
468349d8f4 feat: pypi datasource
Adds pypi datasource, compatible with existing npm and github ones. Performs no validation/filtering of versions.
2018-06-05 07:55:22 +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
188f1d90b6 refactor: configurable github datasource versioning
Closes #2062
2018-06-04 06:38:13 +02:00
Rhys Arkins
7feca361af refactor: github datasource default to tags 2018-06-04 06:36:48 +02:00
Rhys Arkins
fd03b8c7fa refactor: github datasource clean 2018-06-04 06:33:36 +02:00
Rhys Arkins
c21029ecbb
refactor: rename some versioning interface (#2078)
isPinnedVersion -> isVersion
rangify -> getNewValue
2018-06-04 06:03:21 +02:00
Ayoub Kaanich
c54d0ab69d refactor: add versioning wrapper 2018-06-03 17:02:53 +02:00
Rhys Arkins
ecb81eff39 fix: disable ghe token when looking up git datasource 2018-06-02 17:07:15 +02:00
Rhys Arkins
7c68d57612 fix: correctly filter pinned versions 2018-06-01 19:34:10 +02:00
Rhys Arkins
0c71862aa7 logs: info not warn for github retrieval problem 2018-06-01 17:13:16 +02:00
Rhys Arkins
8b279fd38b feat: use purl for buildkite 2018-06-01 17:12:08 +02:00
Rhys Arkins
c86ea5a4ec refactor: bazel use purl 2018-06-01 16:23:13 +02:00
Rhys Arkins
784a0598b9 refactor: use options for github datasource 2018-06-01 15:32:17 +02:00
Rhys Arkins
795df6e4bf fix: check for res.repository.url 2018-06-01 10:36:35 +02:00
Rhys Arkins
761573a865 fix: massage www out of npm repository url 2018-06-01 09:55:43 +02:00
Rhys Arkins
b5fdc67872
feat: github datasource getDependency (#2051)
Add new function `getDependency` with same structure as in npm.
2018-05-31 16:24:14 +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
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
00031c09fa refactor: return latestVersion with npmjs result 2018-05-21 17:42:49 +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
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
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
6dbf9c52ad fix: Revert "feat: support retrieving changelog from ghe hosted repositories (#1968)"
This reverts commit f2fb2e6bda.
2018-05-16 07:04:59 +02:00
Marco Massarotto
f2fb2e6bda feat: support retrieving changelog from ghe hosted repositories (#1968) 2018-05-16 06:38:14 +02:00
Rhys Arkins
53abbc064a refactor: lessen npmrc logging 2018-05-15 06:07:10 +02:00
Rhys Arkins
9db821682c refactor: debug token when npm lookup fails 2018-05-14 13:33:36 +02:00
Marco Massarotto
4b5efca7a7 feat: improve compatibility with nexus private npm repo (#1965)
as nexus hosted npm repository does not automatically 'extracts' any value from the published versions we have to manually pick the repository and namepage fields from the latest version if not already defined in the reponse root
2018-05-13 21:39:30 +02:00
Rhys Arkins
32fc33eedc fix(npm): don’t warn for ENOTFOUND lookup 2018-05-12 05:45:21 +02:00
Rhys Arkins
6cf4faeedf fix: use npm Basic authorization if massaging _auth 2018-05-11 21:01:36 +02:00
Rhys Arkins
2b2fbe97f1 fix(npm): massage _auth to _authToken 2018-05-11 20:10:07 +02:00
Rhys Arkins
a60940497e fix: log redacted auth details if npm lookup fails 2018-05-11 18:44:56 +02:00
Rhys Arkins
b07b49fa99 fix: use amd64/x instead of library/x for Docker Hub digest lookups 2018-05-08 19:15:12 +02:00
Rhys Arkins
1564150d9f refactor: streamline debug logging 2018-04-18 21:19:00 +02:00
Rhys Arkins
523b02fbc8
refactor: npm and semver (#1817) 2018-04-10 05:20:46 +02:00
Rhys Arkins
1ad05442e4 fixl handle npm registry 403 2018-04-02 20:18:26 +02:00
Rhys Arkins
13ca5d66f7 fix: actively handle 401 auth deny from docker registries 2018-03-29 12:45:22 +02:00
Rhys Arkins
20cdd20f18 refactor: downgrade docker warn to info 2018-03-29 10:49:00 +02:00
Rhys Arkins
6623047177 fix: add npm retries for null versions or parseError 2018-03-27 20:57:11 +02:00
Rhys Arkins
09c7980566 fix: improve debugging of npmrc 2018-03-25 22:14:40 +02:00
Rhys Arkins
cc4df96fe2 fix: return early if docker token acquisition fails 2018-03-23 15:56:44 +01:00
Rhys Arkins
a302b11a26
feat: custom docker registries (#1707)
Adds support for custom docker registries. To work (for now), registries must support anonymous public access to their v2 API. Tested against quay.io and gcr.io, including tags pagination for quay. Also needed to add a 10s timeout for registry queries to catch private/firewalled registries that we can't access.

Closes #797
2018-03-23 14:48:36 +01:00
Rhys Arkins
aa56c049b4 chore: remove err from dep not found info log 2018-03-22 10:21:19 +01:00
Rhys Arkins
9bc232d960 fix: log 401/404 responses from Docker Hub 2018-03-21 05:51:55 +01:00
Rhys Arkins
db1c33bb00 fix: throw registry-failure exception if docker has internal errors 2018-03-20 17:12:11 +01:00
Rhys Arkins
b02e170b11 fix: export semverSort from github datasource 2018-03-20 15:51:12 +01:00
Rhys Arkins
0cfba9d014 chore: lessen debugging - move to trace 2018-03-20 06:39:37 +01:00
Rhys Arkins
3d491797dc fix: retry npmjs 408
npmjs’s CDN is (erroneously) returning 408 Timeout responses sometimes, so these should be retried.
2018-02-27 14:31:36 +01:00
Rhys Arkins
f95058d66b refactor: move npm registry to datasource 2018-02-27 10:49:24 +01:00
Rhys Arkins
5d73738dde refactor: move docker registry to datasource 2018-02-27 10:28:31 +01:00
Rhys Arkins
49cedb15d8 fix: filter tags in getRepoTags request 2018-02-22 08:21:27 +01:00
Rhys Arkins
612ee76e0c fix: add try/catch to github datasource functions 2018-02-20 21:35:04 +01:00
Rhys Arkins
16a8d15e33 refactor: move bazel github operations to datasource 2018-02-16 16:32:48 +01:00