From 8b90fa8429aee5871f3f0c63ae19f1c877b6b2ba Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Thu, 22 Dec 2022 11:30:12 +0100 Subject: [PATCH 1/3] ci(shipjs): also push tags of non-published packages These tags get used to determine the next version number, and as we can't get rid of version number (yarn wouldn't include the package into the dependencies otherwise), that's required to be correct. This also fixes a little error in one example package accidentally set to public --- scripts/website/package.json | 1 + ship.config.js | 11 ++++------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/website/package.json b/scripts/website/package.json index d0e45aa984..278b6aedfa 100644 --- a/scripts/website/package.json +++ b/scripts/website/package.json @@ -1,5 +1,6 @@ { "name": "example-react-instantsearch-builder", + "private": true, "version": "1.0.0", "license": "MIT", "scripts": { diff --git a/ship.config.js b/ship.config.js index 54518b02c8..e8bb6632b7 100644 --- a/ship.config.js +++ b/ship.config.js @@ -1,17 +1,13 @@ const shell = require('shelljs'); const packages = JSON.parse( - shell.exec('yarn run --silent lerna list --toposort --json --no-private', { + shell.exec('yarn run --silent lerna list --toposort --json', { silent: true, }) ); module.exports = { - shouldPrepare: ({ releaseType, commitNumbersPerType }) => { - const { fix = 0 } = commitNumbersPerType; - if (releaseType === 'patch' && fix === 0) { - return false; - } + shouldPrepare: () => { return true; }, getTagName: () => @@ -23,7 +19,8 @@ module.exports = { ); return { - // This is used for shouldPrepare + // This version number is used for shouldPrepare. + // for it to be useful, we need to chang shipjs to accept an array of nextVersions nextVersion: packages[0].version, }; }, From 68a0eda618483401b794e8736d97fb58402017b4 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Thu, 22 Dec 2022 11:30:40 +0100 Subject: [PATCH 2/3] !amend --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b13f474648..8159a3ac90 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ build/ # Unneeded changelogs examples/*/*/CHANGELOG.md tests/*/CHANGELOG.md +scripts/*/CHANGELOG.md # Logs *.log From 1936604bce822bbbdc04b61ecf90f0a70a87d6c8 Mon Sep 17 00:00:00 2001 From: Haroen Viaene Date: Thu, 22 Dec 2022 14:15:22 +0100 Subject: [PATCH 3/3] Update ship.config.js --- ship.config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ship.config.js b/ship.config.js index e8bb6632b7..fddc7dcca8 100644 --- a/ship.config.js +++ b/ship.config.js @@ -21,6 +21,8 @@ module.exports = { return { // This version number is used for shouldPrepare. // for it to be useful, we need to chang shipjs to accept an array of nextVersions + // @TODO: update this to packages.map(package => package.version) once it's supported in shipjs + // see https://github.com/algolia/shipjs/issues/986 nextVersion: packages[0].version, }; },