diff --git a/lib/config/presets/__snapshots__/local.spec.ts.snap b/lib/config/presets/__snapshots__/local.spec.ts.snap index 8cbbc16a2444f6fae184771a7bcad70b111f9476..f2713740ee5bcb36f2eec6c1fdfae85e1877e59a 100644 --- a/lib/config/presets/__snapshots__/local.spec.ts.snap +++ b/lib/config/presets/__snapshots__/local.spec.ts.snap @@ -42,7 +42,7 @@ exports[`config/presets/local getPreset() forwards to github 1`] = ` Array [ Array [ "some/repo", - "", + "default", Object { "platform": "github", }, diff --git a/lib/config/presets/local.spec.ts b/lib/config/presets/local.spec.ts index 0c7a22f59fe8464b6cf80b81615241355cc6961c..affa203bf2d0ba6a14ea78909436617f4f3bf373 100644 --- a/lib/config/presets/local.spec.ts +++ b/lib/config/presets/local.spec.ts @@ -42,7 +42,7 @@ describe('config/presets/local', () => { }); it('forwards to github', async () => { - const content = await local.getPreset('some/repo', '', { + const content = await local.getPreset('some/repo', undefined, { platform: 'github', }); expect(githubGetPreset.mock.calls).toMatchSnapshot(); diff --git a/lib/manager/npm/post-update/yarn.ts b/lib/manager/npm/post-update/yarn.ts index a54b80b7e94021e87ff1d367738a4706e7b52e4e..f2dfc7b5acb845511caa857d74c496592fe30fd6 100644 --- a/lib/manager/npm/post-update/yarn.ts +++ b/lib/manager/npm/post-update/yarn.ts @@ -126,12 +126,9 @@ export async function generateLockFile( cwd, env, }); - stdout += updateRes.stdout - ? /* istanbul ignore next */ updateRes.stdout - : ''; - stderr += updateRes.stderr - ? /* istanbul ignore next */ updateRes.stderr - : ''; + // istanbul ignore next + stdout += updateRes.stdout || ''; + stderr += updateRes.stderr || ''; } if (yarnMajorVersion < 2) { @@ -146,12 +143,9 @@ export async function generateLockFile( cwd, env, }); - stdout += dedupeRes.stdout - ? /* istanbul ignore next */ dedupeRes.stdout - : ''; - stderr += dedupeRes.stderr - ? /* istanbul ignore next */ dedupeRes.stderr - : ''; + // istanbul ignore next + stdout += dedupeRes.stdout || ''; + stderr += dedupeRes.stderr || ''; } if ( config.postUpdateOptions && @@ -164,17 +158,13 @@ export async function generateLockFile( cwd, env, }); - stdout += dedupeRes.stdout - ? /* istanbul ignore next */ dedupeRes.stdout - : ''; - stderr += dedupeRes.stderr - ? /* istanbul ignore next */ dedupeRes.stderr - : ''; + // istanbul ignore next + stdout += dedupeRes.stdout || ''; + stderr += dedupeRes.stderr || ''; } } else if ( config.postUpdateOptions && - (config.postUpdateOptions.includes('yarnDedupeFewer') || - config.postUpdateOptions.includes('yarnDedupeHighest')) + config.postUpdateOptions.some((option) => option.startsWith('yarnDedupe')) ) { logger.warn('yarn-deduplicate is not supported since yarn 2'); }