Commit Graph

432 Commits

Author SHA1 Message Date
Rhys Arkins 08f1739e15 fix: ignore npmrc in repository if user has configured one manually 2018-03-27 16:22:26 +02:00
Rhys Arkins 7379d7d1da logs: downgrade resolved config to trace 2018-03-27 15:37:09 +02:00
Rhys Arkins 09c7980566 fix: improve debugging of npmrc 2018-03-25 22:14:40 +02:00
Rhys Arkins fb230a7b29 fix: perform additional decrypt after preset resolve
To catch the use case where encrypted npmToken or npmrc is in the preset itself
2018-03-25 21:29:37 +02:00
Rhys Arkins 6c677cbc92 fix: use onboarding status to determine mirror mode config branch 2018-03-20 13:29:08 +01:00
Rhys Arkins 13609b735d fix: improve try/catch for mirrorMode config 2018-03-17 07:02:38 +01:00
Rhys Arkins e50d9c1f05 feat: mirrorMode
adds feature mirrorMode, aimed for “shadowing” a target repository.
2018-03-17 06:07:39 +01:00
Rhys Arkins 453ce13278 fix: Revert "refactor: array concatenation (#1601)"
This reverts commit dd26a018c5.
2018-03-06 15:54:39 +01:00
AndreiMargineanu dd26a018c5 refactor: array concatenation (#1601)
Refactors all instances of .concat() to use array spread operators instead

Closes #1459
2018-03-06 12:34:39 +01:00
Rhys Arkins a2c4ecefda fix: delete empty errors and warnings from migrated config 2018-03-04 07:12:02 +01:00
Rhys Arkins f95058d66b refactor: move npm registry to datasource 2018-02-27 10:49:24 +01:00
Rhys Arkins 9363fd8acf refactor: pass object to platform.initRepo
Also renames repoName to repository
2018-01-25 12:24:13 +01:00
ctaepper 280e74fa9f feat: expose env to npmrc and npm/yarn/pnpm (#1407)
Adds a config option to bot administrators called `exposeEnv`, for cases where repositories are trusted. If set to true, the bot's full `process.env` can be used for `.npmrc` variable substitution and is passed to child processes when generating lock files. Disabled by default, including in the App.
2018-01-25 10:38:30 +01:00
Rhys Arkins 0b7deb546c feat: apply package.json renovate config to whole repository (#1419)
Changes the way Renovate treats renovate config inside `package.json` files. Before, config used to be applied only to that particular file, meaning that it was not applied for the rest of a monorepo, or for other package managers like Docker. Now, any `renovate` section inside the repository’s root `package.json` will be applied globally, just the sams as if it were contained within a `renovate.json` file. This means there is no longer any case where you *must* have a `renovate.json` file instead of `package.json`.

Closes #1323

BREAKING CHANGE: renovate config in `./package.json` is now applied to whole repository, and renovate config inside non-root `package.json` files is now ignored.
2018-01-23 06:59:01 +01:00
Rhys Arkins ac09b9d7cd feat: cache npm results in memory per-run
We currently use got’s inbuilt caching for npmjs, however it still results in a roundtrip/304 even when cached. The when using presets is that a package like renovate-config-default gets looked up 10+ times unnecessarily. With this feature we assume that npm lookups don’t change for the duration of a run, and even if they did then we’d prefer the reliability of using the first lookup.

Closes #1389
2018-01-15 11:53:02 +01:00
Rhys Arkins 2e2f53b677 fix: move debug statement to fix tests 2018-01-10 09:38:42 +01:00
Rhys Arkins a2b3ca440d refactor: debug if repoIsOnboarded 2018-01-10 09:09:17 +01:00
Rhys Arkins 1cb920fa4b fix: set/reset npmrc during init
Detect npmrc in root of repo and make sure it’s set early. Also ensure npmrc is reset at start of each run if necessary.

Helps #1335
2017-12-30 06:11:04 +01:00
Rhys Arkins eeefc3c8f3 feat: stop and raise error if repository is misconfigured (#1302)
This PR updates Renovate to detect config validation problems and (1) stop processing, and (2) either raise an Issue if already onboarded, or (2) update the onboarding PR to reflect the error if still onboarding.

Closes #1300
2017-12-18 09:39:52 +01:00
Rhys Arkins cfd02be920 refactor: log renovateConfig when warning of validation errors 2017-12-16 07:09:54 +01:00
Rhys Arkins b5b714d4b5 fix: writeToken -> forkToken (#1295)
Rename writeToken to forkToken to make it clearer. This enables GitHub API to use one token for all reads, and another token just for writing to the forked repository.
2017-12-14 11:47:00 +01:00
Rhys Arkins bbb700c54d feat: add github writeToken capability in github wrapper 2017-12-12 14:54:09 +01:00
Rhys Arkins cb8fd6b4ed feat: fork mode (#1287)
This PR adds the capability to run Renovate in a new "fork mode". This new mode must be configured by the Renovate admin, and cannot be configured within repositories themselves (for now). Example use: `renovate --autodiscover --fork-mode`

In this mode: 
* Renovate will fork the repository if necessary (first run only)
* If the fork already existed, Renovate will ensure that its base branch is up to date with the source repository's
 * Branches will be created within the fork, PRs will be created in the source
2017-12-11 19:14:51 +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 b3ec1c0156 fix: set npmrc at repository level (#1169) 2017-11-15 12:30:39 +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 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 8c479071fd refactor: use global logger (#1116) 2017-11-08 06:44:03 +01:00
Rhys Arkins 602752f9fe refactor: use platform global (#1115) 2017-11-07 13:31:34 +01:00
renovate[bot] c1df1b2cb8 chore(deps): update dependency prettier to v1.8.0 (#1113)
* chore(deps): update dependency prettier to v1.8.0

* reformat
2017-11-07 11:52:15 +01:00
Rhys Arkins f8be45055a refactor: remove config.api and use platform dispatcher (#1114) 2017-11-07 11:46:10 +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