From 2d993a8bddc130ec40ece861c123d586c5ef60c7 Mon Sep 17 00:00:00 2001 From: Javi Aguilar <122741+itsjavi@users.noreply.github.com> Date: Fri, 11 Aug 2023 19:49:58 +0200 Subject: [PATCH] chore(changeset): add custom commit script --- .changeset/commits.js | 13 +++++++++++++ .changeset/config.json | 2 +- .changeset/kind-geckos-hide.md | 5 ----- packages/storylite/CHANGELOG.md | 6 ++++++ packages/storylite/package.json | 2 +- 5 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 .changeset/commits.js delete mode 100644 .changeset/kind-geckos-hide.md diff --git a/.changeset/commits.js b/.changeset/commits.js new file mode 100644 index 0000000..3de2eff --- /dev/null +++ b/.changeset/commits.js @@ -0,0 +1,13 @@ +function getAddMessage() { + return `docs(changeset): add new entries` +} + +function getVersionMessage(releasePlan) { + const releasePlanTxt = String(releasePlan) + const parts = releasePlanTxt.split('@') + const versionParts = parts[parts.length - 1].split('\n') + const version = versionParts[0] ?? 'new version' + return `chore: release v${version}` +} + +module.exports = { getAddMessage, getVersionMessage } diff --git a/.changeset/config.json b/.changeset/config.json index 01e8e52..b000f17 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,7 +1,7 @@ { "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", "changelog": ["@changesets/changelog-github", { "repo": "itsjavi/storylite", "summary": "" }], - "commit": true, + "commit": "./commits.js", "fixed": [], "linked": [], "access": "public", diff --git a/.changeset/kind-geckos-hide.md b/.changeset/kind-geckos-hide.md deleted file mode 100644 index 2ff9644..0000000 --- a/.changeset/kind-geckos-hide.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@storylite/storylite': patch ---- - -minor changes diff --git a/packages/storylite/CHANGELOG.md b/packages/storylite/CHANGELOG.md index 9191b44..3673baf 100644 --- a/packages/storylite/CHANGELOG.md +++ b/packages/storylite/CHANGELOG.md @@ -1,5 +1,11 @@ # @storylite/storylite +## 0.2.2 + +### Patch Changes + +- [`bb3d34a`](https://github.com/itsjavi/storylite/commit/bb3d34a17d59af3890f785a4471202664bb85be2) Thanks [@itsjavi](https://github.com/itsjavi)! - minor changes + ## 0.2.1 ### Patch Changes diff --git a/packages/storylite/package.json b/packages/storylite/package.json index f6a124a..953581e 100644 --- a/packages/storylite/package.json +++ b/packages/storylite/package.json @@ -1,6 +1,6 @@ { "name": "@storylite/storylite", - "version": "0.2.1", + "version": "0.2.2", "description": "A lightweight alternative to StoryBook, built on top of Vite⚡️", "license": "MIT", "type": "module",