From 651224e704b9974c55783ad1ae6ffb1d0505c29d Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Fri, 14 Dec 2018 23:48:42 -0500 Subject: [PATCH 01/25] build: remove unnecessary `docker` service in Travis --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c3c0da4d..ab8ab90f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ language: node_js -services: - - docker - node_js: - 10 - 8 From 7f26c5ddc4b8d8e09bfc5e1dea515bb37d23d8c1 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Wed, 19 Dec 2018 12:09:42 -0500 Subject: [PATCH 02/25] fix: look for modified fiels to commit only if there files matching the globs --- lib/git.js | 10 ++++++---- test/git.test.js | 10 ++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lib/git.js b/lib/git.js index 3f02846e..43e143aa 100644 --- a/lib/git.js +++ b/lib/git.js @@ -10,10 +10,12 @@ const debug = require('debug')('semantic-release:git'); * @return {Array} Array of modified files path. */ async function filterModifiedFiles(files, execaOpts) { - return (await execa.stdout('git', ['ls-files', '-m', '-o', ...files], execaOpts)) - .split('\n') - .map(file => file.trim()) - .filter(file => Boolean(file)); + return files.length > 0 + ? (await execa.stdout('git', ['ls-files', '-m', '-o', ...files], execaOpts)) + .split('\n') + .map(file => file.trim()) + .filter(file => Boolean(file)) + : []; } /** diff --git a/test/git.test.js b/test/git.test.js index 4bb2f520..277ea2af 100644 --- a/test/git.test.js +++ b/test/git.test.js @@ -47,6 +47,16 @@ test('Returns [] if there is no modified files', async t => { await t.deepEqual(await filterModifiedFiles(['file1.js', 'file2.js'], {cwd}), []); }); +test('Returns [] if there is no files for which to check modification', async t => { + // Create a git repository, set the current working directory at the root of the repo + const {cwd} = await gitRepo(); + // Create files + await outputFile(path.resolve(cwd, 'file1.js'), ''); + await outputFile(path.resolve(cwd, 'dir/file2.js'), ''); + + await t.deepEqual(await filterModifiedFiles([], {cwd}), []); +}); + test('Commit added files', async t => { // Create a git repository, set the current working directory at the root of the repo const {cwd} = await gitRepo(); From f8857d57f81dddddcbff72350d2c7ea8d20faea1 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 26 Dec 2018 17:01:22 +0000 Subject: [PATCH 03/25] fix(package): update aggregate-error to version 2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d76a3e4..a342db76 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ ], "dependencies": { "@semantic-release/error": "^2.1.0", - "aggregate-error": "^1.0.0", + "aggregate-error": "^2.0.0", "debug": "^4.0.0", "dir-glob": "^2.0.0", "execa": "^1.0.0", From ffe83a47d1923fdfb32bdc2b91d279a193ca0bd4 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 15 Dec 2018 13:35:31 +0000 Subject: [PATCH 04/25] chore(package): update ava to version 1.0.1 --- package.json | 2 +- test/git.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index a342db76..500fe09d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "p-reduce": "^1.0.0" }, "devDependencies": { - "ava": "^0.25.0", + "ava": "^1.0.1", "clear-module": "^3.0.0", "codecov": "^3.0.0", "commitizen": "^3.0.0", diff --git a/test/git.test.js b/test/git.test.js index 277ea2af..9353f855 100644 --- a/test/git.test.js +++ b/test/git.test.js @@ -84,7 +84,7 @@ test('Throw error if the last commit sha cannot be found', async t => { // Create a git repository, set the current working directory at the root of the repo const {cwd} = await gitRepo(); - await t.throws(gitHead({cwd})); + await t.throwsAsync(gitHead({cwd})); }); test('Push commit to remote repository', async t => { From 71be7837f5a9cddf705445c405ecd72b9844fc26 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Mon, 14 Jan 2019 13:04:05 -0500 Subject: [PATCH 05/25] fix: update globby to latest version Pierre Vanduynslager committed --- lib/glob-assets.js | 13 +++---------- package.json | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/glob-assets.js b/lib/glob-assets.js index fd0b5c0c..1a760560 100644 --- a/lib/glob-assets.js +++ b/lib/glob-assets.js @@ -1,12 +1,8 @@ -const path = require('path'); const {isPlainObject, castArray, uniq} = require('lodash'); const dirGlob = require('dir-glob'); const globby = require('globby'); const debug = require('debug')('semantic-release:github'); -const filesTransform = (files, cwd, transform) => - files.map(file => `${file.startsWith('!') ? '!' : ''}${transform(cwd, file.startsWith('!') ? file.slice(1) : file)}`); - module.exports = async ({cwd}, assets) => uniq( [].concat( @@ -14,11 +10,8 @@ module.exports = async ({cwd}, assets) => assets.map(async asset => { // Wrap single glob definition in Array let glob = castArray(isPlainObject(asset) ? asset.path : asset); - // TODO Temporary workaround for https://github.com/kevva/dir-glob/issues/7 and https://github.com/mrmlnc/fast-glob/issues/47 - glob = uniq([ - ...filesTransform(await dirGlob(filesTransform(glob, cwd, path.resolve)), cwd, path.relative), - ...glob, - ]); + // TODO Temporary workaround for https://github.com/mrmlnc/fast-glob/issues/47 + glob = uniq([...(await dirGlob(glob, {cwd})), ...glob]); // Skip solo negated pattern (avoid to include every non js file with `!**/*.js`) if (glob.length <= 1 && glob[0].startsWith('!')) { @@ -31,7 +24,7 @@ module.exports = async ({cwd}, assets) => const globbed = await globby(glob, { cwd, - expandDirectories: true, + expandDirectories: false, // TODO Temporary workaround for https://github.com/mrmlnc/fast-glob/issues/47 gitignore: false, dot: true, onlyFiles: false, diff --git a/package.json b/package.json index 500fe09d..1100a93d 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "dir-glob": "^2.0.0", "execa": "^1.0.0", "fs-extra": "^7.0.0", - "globby": "^8.0.1", + "globby": "^9.0.0", "lodash": "^4.17.4", "micromatch": "^3.1.4", "p-reduce": "^1.0.0" From f720fb986b9846644a193f97cac68af1e5fd07a3 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 14 Jan 2019 06:11:10 +0000 Subject: [PATCH 06/25] chore(package): update xo to version 0.24.0 --- index.js | 2 ++ lib/definitions/errors.js | 3 +-- package.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 9d7540ce..8b0cbbdf 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ function verifyConditions(pluginConfig, context) { pluginConfig.assets = defaultTo(pluginConfig.assets, preparePlugin.assets); pluginConfig.message = defaultTo(pluginConfig.message, preparePlugin.message); } + verifyGit(pluginConfig); verified = true; } @@ -23,6 +24,7 @@ async function prepare(pluginConfig, context) { verifyGit(pluginConfig); verified = true; } + await prepareGit(pluginConfig, context); } diff --git a/lib/definitions/errors.js b/lib/definitions/errors.js index f77d0c28..64f3b975 100644 --- a/lib/definitions/errors.js +++ b/lib/definitions/errors.js @@ -1,7 +1,6 @@ -const url = require('url'); const pkg = require('../../package.json'); -const homepage = url.format({...url.parse(pkg.homepage), ...{hash: null}}); +const [homepage] = pkg.homepage.split('#'); const linkify = file => `${homepage}/blob/master/${file}`; module.exports = { diff --git a/package.json b/package.json index 1100a93d..519306fb 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "semantic-release": "^15.0.0", "sinon": "^7.1.1", "tempy": "^0.2.1", - "xo": "^0.23.0" + "xo": "^0.24.0" }, "engines": { "node": ">=8.3" From 98f382c2abceebdfa04ef1fcadd930a245f369eb Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 5 Mar 2019 16:50:40 +0000 Subject: [PATCH 07/25] chore(package): update ava to version 1.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 519306fb..55b3d70e 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "p-reduce": "^1.0.0" }, "devDependencies": { - "ava": "^1.0.1", + "ava": "^1.3.1", "clear-module": "^3.0.0", "codecov": "^3.0.0", "commitizen": "^3.0.0", From aa07a61160905779d6972e94c09918d36896c931 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 11 Mar 2019 05:02:35 +0000 Subject: [PATCH 08/25] chore(package): update get-stream to version 5.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 55b3d70e..f4d40cfd 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "commitizen": "^3.0.0", "cz-conventional-changelog": "^2.0.0", "file-url": "^2.0.2", - "get-stream": "^4.0.0", + "get-stream": "^5.0.0", "git-log-parser": "^1.2.0", "nyc": "^13.1.0", "semantic-release": "^15.0.0", From 7ee4af9ebdff3a96c7115a8089b4f8722d721e3b Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 12 Mar 2019 16:01:12 +0000 Subject: [PATCH 09/25] fix(package): update p-reduce to version 2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f4d40cfd..2750d843 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "globby": "^9.0.0", "lodash": "^4.17.4", "micromatch": "^3.1.4", - "p-reduce": "^1.0.0" + "p-reduce": "^2.0.0" }, "devDependencies": { "ava": "^1.3.1", From 94e9e12a83410887d32b99600d5933327e2d5627 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 10 Apr 2019 12:53:50 +0000 Subject: [PATCH 10/25] fix(package): update micromatch to version 4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2750d843..862c6304 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "fs-extra": "^7.0.0", "globby": "^9.0.0", "lodash": "^4.17.4", - "micromatch": "^3.1.4", + "micromatch": "^4.0.0", "p-reduce": "^2.0.0" }, "devDependencies": { From 239eba1dfd6d898ceaad527b93b22a10ca599405 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 1 Apr 2019 09:37:37 +0000 Subject: [PATCH 11/25] fix(package): update aggregate-error to version 3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 862c6304..beaa3c94 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ ], "dependencies": { "@semantic-release/error": "^2.1.0", - "aggregate-error": "^2.0.0", + "aggregate-error": "^3.0.0", "debug": "^4.0.0", "dir-glob": "^2.0.0", "execa": "^1.0.0", From a24f2dbb23f21d2712dedfe127b9d60eb0902c45 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 15 Apr 2019 03:19:46 +0000 Subject: [PATCH 12/25] chore(package): update file-url to version 3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index beaa3c94..01b834e6 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "codecov": "^3.0.0", "commitizen": "^3.0.0", "cz-conventional-changelog": "^2.0.0", - "file-url": "^2.0.2", + "file-url": "^3.0.0", "get-stream": "^5.0.0", "git-log-parser": "^1.2.0", "nyc": "^13.1.0", From 7f516ac4395a7e964789615a1a2814d607e8daef Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 16 Apr 2019 10:11:17 +0000 Subject: [PATCH 13/25] chore(package): update nyc to version 14.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 01b834e6..c820d7af 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "file-url": "^3.0.0", "get-stream": "^5.0.0", "git-log-parser": "^1.2.0", - "nyc": "^13.1.0", + "nyc": "^14.0.0", "semantic-release": "^15.0.0", "sinon": "^7.1.1", "tempy": "^0.2.1", From 185f94e9e0d636e7371158767317fe969b845450 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 16 Apr 2019 12:05:52 +0000 Subject: [PATCH 14/25] chore(package): update tempy to version 0.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c820d7af..3d307f1a 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "nyc": "^14.0.0", "semantic-release": "^15.0.0", "sinon": "^7.1.1", - "tempy": "^0.2.1", + "tempy": "^0.3.0", "xo": "^0.24.0" }, "engines": { From 712d684e95d847f2b4ba82cd27419d2ae0a09ee0 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 11 May 2019 14:48:17 +0000 Subject: [PATCH 15/25] fix(package): update fs-extra to version 8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d307f1a..f5c8f3b7 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "debug": "^4.0.0", "dir-glob": "^2.0.0", "execa": "^1.0.0", - "fs-extra": "^7.0.0", + "fs-extra": "^8.0.0", "globby": "^9.0.0", "lodash": "^4.17.4", "micromatch": "^4.0.0", From 33942119710e9b362a0697077157efd4a381b426 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Sat, 1 Jun 2019 12:10:13 +0000 Subject: [PATCH 16/25] chore(package): update ava to version 2.0.0 --- package.json | 10 +++++++++- test/git.test.js | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f5c8f3b7..83b063c4 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,14 @@ "description": "semantic-release plugin to commit release assets to the project's git repository", "version": "0.0.0-development", "author": "Pierre Vanduynslager (https://github.com/pvdlg)", + "ava": { + "files": [ + "test/**/*.test.js" + ], + "helpers": [ + "test/helpers/**/*" + ] + }, "bugs": { "url": "https://github.com/semantic-release/git/issues" }, @@ -28,7 +36,7 @@ "p-reduce": "^2.0.0" }, "devDependencies": { - "ava": "^1.3.1", + "ava": "^2.0.0", "clear-module": "^3.0.0", "codecov": "^3.0.0", "commitizen": "^3.0.0", diff --git a/test/git.test.js b/test/git.test.js index 9353f855..6c5d927b 100644 --- a/test/git.test.js +++ b/test/git.test.js @@ -94,5 +94,5 @@ test('Push commit to remote repository', async t => { await push(repositoryUrl, 'master', {cwd}); - t.is(await gitRemoteHead(repositoryUrl), hash, {cwd}); + t.is(await gitRemoteHead(repositoryUrl, {cwd}), hash); }); From 39c4fd5db265edd68422f3eccc30090824790415 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2019 11:34:54 +0000 Subject: [PATCH 17/25] fix(package): update execa to version 2.0.0 --- lib/git.js | 6 +++--- package.json | 2 +- test/helpers/git-utils.js | 12 +++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/git.js b/lib/git.js index 43e143aa..8340946d 100644 --- a/lib/git.js +++ b/lib/git.js @@ -11,7 +11,7 @@ const debug = require('debug')('semantic-release:git'); */ async function filterModifiedFiles(files, execaOpts) { return files.length > 0 - ? (await execa.stdout('git', ['ls-files', '-m', '-o', ...files], execaOpts)) + ? (await execa('git', ['ls-files', '-m', '-o', ...files], execaOpts)).stdout .split('\n') .map(file => file.trim()) .filter(file => Boolean(file)) @@ -61,8 +61,8 @@ async function push(origin, branch, execaOpts) { * * @return {String} The sha of the head commit on the local repository */ -function gitHead(execaOpts) { - return execa.stdout('git', ['rev-parse', 'HEAD'], execaOpts); +async function gitHead(execaOpts) { + return (await execa('git', ['rev-parse', 'HEAD'], execaOpts)).stdout; } module.exports = {filterModifiedFiles, add, gitHead, commit, push}; diff --git a/package.json b/package.json index 83b063c4..6c04d9ca 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "aggregate-error": "^3.0.0", "debug": "^4.0.0", "dir-glob": "^2.0.0", - "execa": "^1.0.0", + "execa": "^2.0.0", "fs-extra": "^8.0.0", "globby": "^9.0.0", "lodash": "^4.17.4", diff --git a/test/helpers/git-utils.js b/test/helpers/git-utils.js index e6a693f3..8ff03eb4 100644 --- a/test/helpers/git-utils.js +++ b/test/helpers/git-utils.js @@ -60,8 +60,10 @@ export async function initBareRepo(repositoryUrl, branch = 'master') { * @returns {Array} The created commits, in reverse order (to match `git log` order). */ export async function gitCommits(messages, execaOpts) { - await pReduce(messages, (_, message) => - execa.stdout('git', ['commit', '-m', message, '--allow-empty', '--no-gpg-sign'], execaOpts) + await pReduce( + messages, + async (_, message) => + (await execa('git', ['commit', '-m', message, '--allow-empty', '--no-gpg-sign'], execaOpts)).stdout ); return (await gitGetCommits(undefined, execaOpts)).slice(0, messages.length); } @@ -151,7 +153,7 @@ export async function gitDetachedHead(repositoryUrl, head) { * @return {String} The HEAD sha of the remote repository. */ export async function gitRemoteHead(repositoryUrl, execaOpts) { - return (await execa.stdout('git', ['ls-remote', repositoryUrl, 'HEAD'], execaOpts)) + return (await execa('git', ['ls-remote', repositoryUrl, 'HEAD'], execaOpts)).stdout .split('\n') .filter(head => Boolean(head)) .map(head => head.match(/^(\S+)/)[1])[0]; @@ -165,7 +167,7 @@ export async function gitRemoteHead(repositoryUrl, execaOpts) { * @return {Array} Array of staged files path. */ export async function gitStaged(execaOpts) { - return (await execa.stdout('git', ['status', '--porcelain'], execaOpts)) + return (await execa('git', ['status', '--porcelain'], execaOpts)).stdout .split('\n') .filter(status => status.startsWith('A ')) .map(status => status.match(/^A\s+(.+)$/)[1]); @@ -180,7 +182,7 @@ export async function gitStaged(execaOpts) { * @return {Array} The list of files path included in the commit. */ export async function gitCommitedFiles(ref = 'HEAD', execaOpts) { - return (await execa.stdout('git', ['diff-tree', '-r', '--name-only', '--no-commit-id', '-r', ref], execaOpts)) + return (await execa('git', ['diff-tree', '-r', '--name-only', '--no-commit-id', '-r', ref], execaOpts)).stdout .split('\n') .filter(file => Boolean(file)); } From 184f7b36839b4aa88e42a1fffed4464c9c7086e6 Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Wed, 26 Jun 2019 12:13:35 -0400 Subject: [PATCH 18/25] fix: revert to execa `^1.0.0` --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c04d9ca..83b063c4 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "aggregate-error": "^3.0.0", "debug": "^4.0.0", "dir-glob": "^2.0.0", - "execa": "^2.0.0", + "execa": "^1.0.0", "fs-extra": "^8.0.0", "globby": "^9.0.0", "lodash": "^4.17.4", From 2819d3b8a3960cd0c406631f385d53e6ba4becc6 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2019 11:02:06 +0000 Subject: [PATCH 19/25] fix(package): update dir-glob to version 3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83b063c4..f6797371 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@semantic-release/error": "^2.1.0", "aggregate-error": "^3.0.0", "debug": "^4.0.0", - "dir-glob": "^2.0.0", + "dir-glob": "^3.0.0", "execa": "^1.0.0", "fs-extra": "^8.0.0", "globby": "^9.0.0", From a93b846c6de081b38e09f5967ca27c1378c7571c Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Sat, 29 Jun 2019 18:03:07 +0000 Subject: [PATCH 20/25] fix(package): update globby to version 10.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6797371..3be9ccd2 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "dir-glob": "^3.0.0", "execa": "^1.0.0", "fs-extra": "^8.0.0", - "globby": "^9.0.0", + "globby": "^10.0.0", "lodash": "^4.17.4", "micromatch": "^4.0.0", "p-reduce": "^2.0.0" From 55c6df7f91ac71e8e923c38dba32e0f7fc4450ed Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2019 19:58:17 +0000 Subject: [PATCH 21/25] chore(package): update commitizen to version 4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3be9ccd2..e2c30ff6 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "ava": "^2.0.0", "clear-module": "^3.0.0", "codecov": "^3.0.0", - "commitizen": "^3.0.0", + "commitizen": "^4.0.0", "cz-conventional-changelog": "^2.0.0", "file-url": "^3.0.0", "get-stream": "^5.0.0", From 9043edc1732cce8cc98ddb412871c9b5f6ee53ca Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Fri, 9 Aug 2019 14:29:38 -0400 Subject: [PATCH 22/25] chore: remove commitizen from our dependencies --- package.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/package.json b/package.json index e2c30ff6..b847bffc 100644 --- a/package.json +++ b/package.json @@ -14,11 +14,6 @@ "bugs": { "url": "https://github.com/semantic-release/git/issues" }, - "config": { - "commitizen": { - "path": "cz-conventional-changelog" - } - }, "contributors": [ "Stephan Bönnemann (http://boennemann.me)", "Gregor Martynus (https://twitter.com/gr2m)" @@ -39,8 +34,6 @@ "ava": "^2.0.0", "clear-module": "^3.0.0", "codecov": "^3.0.0", - "commitizen": "^4.0.0", - "cz-conventional-changelog": "^2.0.0", "file-url": "^3.0.0", "get-stream": "^5.0.0", "git-log-parser": "^1.2.0", @@ -98,7 +91,6 @@ "url": "https://github.com/semantic-release/git.git" }, "scripts": { - "cm": "git-cz", "codecov": "codecov -f coverage/coverage-final.json", "lint": "xo", "pretest": "npm run lint", From 4cb24c8c4d691b38f2d955cb29416cf9056b1814 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2019 20:34:37 +0000 Subject: [PATCH 23/25] chore(package): update clear-module to version 4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b847bffc..837e241d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "ava": "^2.0.0", - "clear-module": "^3.0.0", + "clear-module": "^4.0.0", "codecov": "^3.0.0", "file-url": "^3.0.0", "get-stream": "^5.0.0", From a317bae9278a9a99e18298e21c76b466d9b2678d Mon Sep 17 00:00:00 2001 From: Pierre Vanduynslager Date: Tue, 13 Aug 2019 17:19:04 -0400 Subject: [PATCH 24/25] ci(node): set node 8 to node 8.3 and add node 12 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ab8ab90f..4b5fcd36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ language: node_js node_js: + - 12 - 10 - - 8 + - 8.3 # Trigger a push build on master and greenkeeper branches + PRs build on every branches # Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147) From 4b73226a283caccf11d426d7f33ede145f24804f Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2019 04:22:50 +0000 Subject: [PATCH 25/25] chore(package): update xo to version 0.25.2 --- package.json | 2 +- test/helpers/git-utils.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 837e241d..9b3a3205 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "semantic-release": "^15.0.0", "sinon": "^7.1.1", "tempy": "^0.3.0", - "xo": "^0.24.0" + "xo": "^0.25.2" }, "engines": { "node": ">=8.3" diff --git a/test/helpers/git-utils.js b/test/helpers/git-utils.js index 8ff03eb4..bc06b373 100644 --- a/test/helpers/git-utils.js +++ b/test/helpers/git-utils.js @@ -91,10 +91,10 @@ export async function gitGetCommits(from, execaOpts) { * Checkout a branch on the current git repository. * * @param {String} branch Branch name. - * @param {Boolean} create `true` to create the branch, `false` to checkout an existing branch. + * @param {Boolean} create to create the branch, `false` to checkout an existing branch. * @param {Object} [execaOpts] Options to pass to `execa`. */ -export async function gitCheckout(branch, create = true, execaOpts) { +export async function gitCheckout(branch, create, execaOpts) { await execa('git', create ? ['checkout', '-b', branch] : ['checkout', branch], execaOpts); } @@ -176,12 +176,12 @@ export async function gitStaged(execaOpts) { /** * Get the list of files included in a commit. * - * @param {String} [ref='HEAD'] The git reference for which to retrieve the files. + * @param {String} ref The git reference for which to retrieve the files. * @param {Object} [execaOpts] Options to pass to `execa`. * * @return {Array} The list of files path included in the commit. */ -export async function gitCommitedFiles(ref = 'HEAD', execaOpts) { +export async function gitCommitedFiles(ref, execaOpts) { return (await execa('git', ['diff-tree', '-r', '--name-only', '--no-commit-id', '-r', ref], execaOpts)).stdout .split('\n') .filter(file => Boolean(file));