diff --git a/lib/get-git-auth-url.js b/lib/get-git-auth-url.js index a52b44ef..0c47344e 100644 --- a/lib/get-git-auth-url.js +++ b/lib/get-git-auth-url.js @@ -35,10 +35,7 @@ module.exports = async ({repositoryUrl, branch}) => { // Replace `git+https` and `git+http` with `https` or `http` if (protocols.includes('http') || protocols.includes('https')) { - repositoryUrl = format({ - ...parse(repositoryUrl), - ...{protocol: protocols.includes('https') ? 'https' : 'http'}, - }); + repositoryUrl = format({...parse(repositoryUrl), protocol: protocols.includes('https') ? 'https' : 'http'}); } } diff --git a/test/index.test.js b/test/index.test.js index d7a185ad..31e958bc 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -263,16 +263,16 @@ test.serial('Use new gitHead, and recreate release notes if a prepare plugin cre t.is(generateNotes.callCount, 2); t.deepEqual(generateNotes.args[0][1].nextRelease, nextRelease); t.is(prepare1.callCount, 1); - t.deepEqual(prepare1.args[0][1].nextRelease, {...nextRelease, ...{notes}}); + t.deepEqual(prepare1.args[0][1].nextRelease, {...nextRelease, notes}); nextRelease.gitHead = await getGitHead(); - t.deepEqual(generateNotes.args[1][1].nextRelease, {...nextRelease, ...{notes}}); + t.deepEqual(generateNotes.args[1][1].nextRelease, {...nextRelease, notes}); t.is(prepare2.callCount, 1); - t.deepEqual(prepare2.args[0][1].nextRelease, {...nextRelease, ...{notes}}); + t.deepEqual(prepare2.args[0][1].nextRelease, {...nextRelease, notes}); t.is(publish.callCount, 1); - t.deepEqual(publish.args[0][1].nextRelease, {...nextRelease, ...{notes}}); + t.deepEqual(publish.args[0][1].nextRelease, {...nextRelease, notes}); // Verify the tag has been created on the local and remote repo and reference the last gitHead t.is(await gitTagHead(nextRelease.gitTag), commits[0].hash); @@ -321,14 +321,10 @@ test.serial('Call all "success" plugins even if one errors out', async t => { t.is(success1.callCount, 1); t.deepEqual(success1.args[0][0], config); - t.deepEqual(success1.args[0][1].releases, [ - {...release, ...nextRelease, ...{notes}, ...{pluginName: '[Function: proxy]'}}, - ]); + t.deepEqual(success1.args[0][1].releases, [{...release, ...nextRelease, notes, pluginName: '[Function: proxy]'}]); t.is(success2.callCount, 1); - t.deepEqual(success2.args[0][1].releases, [ - {...release, ...nextRelease, ...{notes}, ...{pluginName: '[Function: proxy]'}}, - ]); + t.deepEqual(success2.args[0][1].releases, [{...release, ...nextRelease, notes, pluginName: '[Function: proxy]'}]); }); test.serial('Log all "verifyConditions" errors', async t => { diff --git a/test/integration.test.js b/test/integration.test.js index 3afe241a..3b5f90c1 100644 --- a/test/integration.test.js +++ b/test/integration.test.js @@ -614,7 +614,7 @@ test.serial('Exit with 1 if missing permission to push to the remote repository' const {stdout, code} = await execa( cli, ['--repository-url', 'http://user:wrong_pass@localhost:2080/git/unauthorized.git'], - {env: {...env, ...{GH_TOKEN: 'user:wrong_pass'}}, reject: false} + {env: {...env, GH_TOKEN: 'user:wrong_pass'}, reject: false} ); // Verify the type and message are logged t.regex(stdout, /EGITNOPERMISSION/);