diff --git a/docs/configuration.md b/docs/configuration.md index f915d325c44ba9bb1995ebf8e17cd53654fd2dde..ef22de91871b95eb62218d8bdc2e0d1807e0ae17 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -546,14 +546,6 @@ Obviously, you can't set repository or package file location with this method. <td>`RENOVATE_PR_BODY`</td> <td><td> </tr> -<tr> - <td>`yarnCacheFolder`</td> - <td>Location of yarn cache folder to use. Set to empty string to disable</td> - <td>string</td> - <td><pre>"/tmp/yarn-cache"</pre></td> - <td>`RENOVATE_YARN_CACHE_FOLDER`</td> - <td><td> -</tr> <tr> <td>`lockFileMaintenance`</td> <td>Configuration for lock file maintenance</td> diff --git a/lib/config/definitions.js b/lib/config/definitions.js index a7458b1a3ae27381d7a6e67118f81405cb9b3379..d43372a112b7ea14bbe899644e0694504fc0c03f 100644 --- a/lib/config/definitions.js +++ b/lib/config/definitions.js @@ -397,15 +397,6 @@ const options = [ cli: false, }, // Yarn Lock Maintenance - { - name: 'yarnCacheFolder', - description: - 'Location of yarn cache folder to use. Set to empty string to disable', - stage: 'global', - type: 'string', - default: '/tmp/yarn-cache', - cli: false, - }, { name: 'lockFileMaintenance', description: 'Configuration for lock file maintenance', diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index 445d2ea07bdc81b5cfdd6e4c8183084f5155f7fb..6befd739a36fdab980504ee62299404f7838b381 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -86,7 +86,6 @@ async function ensureBranch(config) { commitMessage = `${config.semanticPrefix} ${commitMessage.toLowerCase()}`; } const api = config.api; - const cacheFolder = config.yarnCacheFolder; const packageFiles = {}; const commitFiles = []; for (const upgrade of config.upgrades) { @@ -148,8 +147,7 @@ async function ensureBranch(config) { const yarnLockFile = await yarn.getLockFile( packageFile, packageFiles[packageFile], - api, - cacheFolder + api ); if (yarnLockFile) { // Add new yarn.lock file too diff --git a/lib/workers/branch/yarn.js b/lib/workers/branch/yarn.js index 231d0806a6fb1a73ff6c8ee2644d6e98e28a3908..36977841ca8c2fc0aab2464ca0206e049bf0f1c1 100644 --- a/lib/workers/branch/yarn.js +++ b/lib/workers/branch/yarn.js @@ -12,12 +12,7 @@ module.exports = { const yarnVersion = '0.27.5'; -async function generateLockFile( - newPackageJson, - npmrcContent, - yarnrcContent, - cacheFolder -) { +async function generateLockFile(newPackageJson, npmrcContent, yarnrcContent) { logger.debug('Generating new yarn.lock file'); const tmpDir = tmp.dirSync({ unsafeCleanup: true }); let yarnLock; @@ -41,10 +36,6 @@ async function generateLockFile( `yarn-${yarnVersion}.js` ); const yarnOptions = [yarnBin, 'install', '--ignore-scripts']; - if (cacheFolder && cacheFolder.length) { - logger.debug(`Setting yarn cache folder to ${cacheFolder}`); - yarnOptions.push(`--cache-folder ${cacheFolder}`); - } const result = cp.spawnSync('node', yarnOptions, { cwd: tmpDir.name, shell: true, @@ -69,7 +60,7 @@ async function generateLockFile( return yarnLock; } -async function getLockFile(packageFile, packageContent, api, cacheFolder) { +async function getLockFile(packageFile, packageContent, api) { // Detect if a yarn.lock file is in use const yarnLockFileName = path.join(path.dirname(packageFile), 'yarn.lock'); if (!await api.getFileContent(yarnLockFileName)) { @@ -82,8 +73,7 @@ async function getLockFile(packageFile, packageContent, api, cacheFolder) { const newYarnLockContent = await module.exports.generateLockFile( packageContent, npmrcContent, - yarnrcContent, - cacheFolder + yarnrcContent ); // Return file object return { @@ -117,8 +107,7 @@ async function maintainLockFile(inputConfig) { const newYarnLock = await module.exports.getLockFile( inputConfig.packageFile, packageContent, - inputConfig.api, - inputConfig.yarnCacheFolder + inputConfig.api ); logger.trace(`newYarnLock:\n${newYarnLock.contents}`); if (existingYarnLock.toString() === newYarnLock.contents.toString()) {