From c8a7aaf23b8abfa9dddd8daacc2a3bdf58df8964 Mon Sep 17 00:00:00 2001 From: MomoCow Date: Fri, 14 Apr 2023 14:27:31 +0800 Subject: [PATCH 1/5] :wrench: update releaserc --- .releaserc.js | 3 +++ README.md | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.releaserc.js b/.releaserc.js index 8e46201..4b03c37 100644 --- a/.releaserc.js +++ b/.releaserc.js @@ -4,6 +4,9 @@ const fs = require('fs') const tplFile = path.resolve(__dirname, 'build/release-notes.hbs') module.exports = { + branches: [ + "main", + ], plugins: [ [ 'semantic-release-gitmoji', diff --git a/README.md b/README.md index 84e03cd..221a643 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # semantic-release-gitmoji -[![Build Status](https://app.travis-ci.com/momocow/semantic-release-gitmoji.svg?branch=master)](https://app.travis-ci.com/momocow/semantic-release-gitmoji) +[![Test Status](https://github.com/momocow/semantic-release-gitmoji/actions/workflows/test.yaml/badge.svg?branch=main)](https://github.com/momocow/semantic-release-gitmoji/actions/workflows/test.yaml) +[![Release Status](https://github.com/momocow/semantic-release-gitmoji/actions/workflows/release.yaml/badge.svg?branch=main)](https://github.com/momocow/semantic-release-gitmoji/actions/workflows/release.yaml) [![npm](https://img.shields.io/npm/v/semantic-release-gitmoji.svg)](https://www.npmjs.com/semantic-release-gitmoji) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) [![Gitmoji](https://img.shields.io/badge/gitmoji-%20😜%20😍-FFDD67.svg?style=flat-square)](https://gitmoji.carloscuesta.me/) From ecec1817b33bdbedd3e6ceb9cbd70ff1c8e7aea3 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Fri, 14 Apr 2023 06:30:08 +0000 Subject: [PATCH 2/5] :bookmark: v1.6.4 [skip ci] https://github.com/momocow/semantic-release-gitmoji/releases/tag/v1.6.4 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0537a75..7c574da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "semantic-release-gitmoji", - "version": "1.6.3", + "version": "1.6.4", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "semantic-release-gitmoji", - "version": "1.6.3", + "version": "1.6.4", "license": "MIT", "dependencies": { "dateformat": "^3.0.3", diff --git a/package.json b/package.json index 07ff978..0334b6f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "semantic-release-gitmoji", - "version": "1.6.3", + "version": "1.6.4", "description": "Different from conventional changelog, Gitmoji commits are used to determine a release type and generate release notes.", "main": "index.js", "scripts": { From 519cfcc51950fbb4bfa8d2c4b01fa6e46426ea84 Mon Sep 17 00:00:00 2001 From: Bryan Thomas <49354825+bryanjtc@users.noreply.github.com> Date: Mon, 16 Oct 2023 00:01:13 -0500 Subject: [PATCH 3/5] :arrow_up: Support semantic release v22 (#80) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0334b6f..ce6ee60 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "node-emoji": "^1.11.0" }, "peerDependencies": { - "semantic-release": "<22" + "semantic-release": "<23" }, "files": [ "lib", From 1422158637c1db543c122a17089e034cef78e93e Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 16 Oct 2023 05:01:49 +0000 Subject: [PATCH 4/5] :bookmark: v1.6.5 [skip ci] https://github.com/momocow/semantic-release-gitmoji/releases/tag/v1.6.5 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7c574da..b38e2be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "semantic-release-gitmoji", - "version": "1.6.4", + "version": "1.6.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "semantic-release-gitmoji", - "version": "1.6.4", + "version": "1.6.5", "license": "MIT", "dependencies": { "dateformat": "^3.0.3", diff --git a/package.json b/package.json index ce6ee60..e442f71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "semantic-release-gitmoji", - "version": "1.6.4", + "version": "1.6.5", "description": "Different from conventional changelog, Gitmoji commits are used to determine a release type and generate release notes.", "main": "index.js", "scripts": { From 4731362b3d7ebb887ae9e81021441ca1ceb0b80f Mon Sep 17 00:00:00 2001 From: DJCrabhat Date: Thu, 21 Dec 2023 21:49:47 -0800 Subject: [PATCH 5/5] :bug: allow matches with reserved regex characters --- lib/helper/parse-commits.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/helper/parse-commits.js b/lib/helper/parse-commits.js index 14720e4..258fdfb 100644 --- a/lib/helper/parse-commits.js +++ b/lib/helper/parse-commits.js @@ -46,9 +46,12 @@ function parseGitmoji ({ subject = '', message = '', body = '' } = {}, issues = const matched = emojiRegex().exec(subject) if (!matched || matched.index !== 0) return null - const gitmoji = matched[0] + const gitmoji = matched[0] const semver = gitmojis.find(matchEmoji(gitmoji))?.semver || 'other' - subject = subject.replace(new RegExp('^' + gitmoji), '') + + // lightly escape to issue where commits starts with a special regex char https://github.com/momocow/semantic-release-gitmoji/issues/76 + const gitmojiEscaped = gitmoji.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&') + subject = subject.replace(new RegExp('^' + gitmojiEscaped), '') return { subject, message: subject + '\n\n' + body, gitmoji, semver } }