diff --git a/package.json b/package.json index dc6135d..94d82b9 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "dependencies": { "c12": "^0.2.7", "consola": "^2.15.3", + "convert-gitmoji": "^0.1.0", "execa": "^6.1.0", "mri": "^1.2.0", "scule": "^0.2.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8af7171..fd85118 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ specifiers: c12: ^0.2.7 c8: latest consola: ^2.15.3 + convert-gitmoji: ^0.1.0 eslint: latest execa: ^6.1.0 jiti: ^1.14.0 @@ -19,6 +20,7 @@ specifiers: dependencies: c12: 0.2.7 consola: 2.15.3 + convert-gitmoji: 0.1.0 execa: 6.1.0 mri: 1.2.0 scule: 0.2.1 @@ -32,7 +34,7 @@ devDependencies: standard-version: 9.5.0 typescript: 4.7.4 unbuild: 0.7.4 - vitest: 0.15.1_c8@7.11.3 + vitest: 0.16.0_c8@7.11.3 packages: @@ -1108,6 +1110,12 @@ packages: q: 1.5.1 dev: true + /convert-gitmoji/0.1.0: + resolution: {integrity: sha512-6kbm1aC+cbEO5NKPQkEiP5tOb5rmXs/J5RzBL/2IA487POp//5RggnNHim+5q7qwLo9dmQWhjV9GpSTybnLfYg==} + dependencies: + typescript: 4.7.4 + dev: false + /convert-source-map/1.8.0: resolution: {integrity: sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==} dependencies: @@ -3721,13 +3729,13 @@ packages: readable-stream: 3.6.0 dev: true - /tinypool/0.1.3: - resolution: {integrity: sha512-2IfcQh7CP46XGWGGbdyO4pjcKqsmVqFAPcXfPxcPXmOWt9cYkTP9HcDmGgsfijYoAEc4z9qcpM/BaBz46Y9/CQ==} + /tinypool/0.2.1: + resolution: {integrity: sha512-HFU5ZYVq3wBfhSaf8qdqGsneaqXm0FgJQpoUlJbVdHpRLzm77IneKAD3RjzJWZvIv0YpPB9S7LUW53f6BE6ZSg==} engines: {node: '>=14.0.0'} dev: true - /tinyspy/0.3.2: - resolution: {integrity: sha512-2+40EP4D3sFYy42UkgkFFB+kiX2Tg3URG/lVvAZFfLxgGpnWl5qQJuBw1gaLttq8UOS+2p3C0WrhJnQigLTT2Q==} + /tinyspy/0.3.3: + resolution: {integrity: sha512-gRiUR8fuhUf0W9lzojPf1N1euJYA30ISebSfgca8z76FOvXtVXqd5ojEIaKLWbDQhAaC3ibxZIjqbyi4ybjcTw==} engines: {node: '>=14.0.0'} dev: true @@ -3811,7 +3819,6 @@ packages: resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} engines: {node: '>=4.2.0'} hasBin: true - dev: true /uglify-js/3.15.4: resolution: {integrity: sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA==} @@ -3935,8 +3942,8 @@ packages: fsevents: 2.3.2 dev: true - /vitest/0.15.1_c8@7.11.3: - resolution: {integrity: sha512-NaNFi93JKSuvV4YGnfQ0l0GKYxH0EsLcTrrXaCzd6qfVEZM/RJpjwSevg6waNFqu2DyN6e0aHHdrCZW5/vh5NA==} + /vitest/0.16.0_c8@7.11.3: + resolution: {integrity: sha512-Ntp6jrM8wf2NMtamMBLkRBBdeqHkgAH/WMh5Xryts1j2ft2D8QZQbiSVFkSl4WmEQzcPP0YM069g/Ga1vtnEtg==} engines: {node: '>=v14.16.0'} hasBin: true peerDependencies: @@ -3961,8 +3968,8 @@ packages: chai: 4.3.6 debug: 4.3.4 local-pkg: 0.4.1 - tinypool: 0.1.3 - tinyspy: 0.3.2 + tinypool: 0.2.1 + tinyspy: 0.3.3 vite: 2.9.12 transitivePeerDependencies: - less diff --git a/src/markdown.ts b/src/markdown.ts index a1ee96c..3d3595b 100644 --- a/src/markdown.ts +++ b/src/markdown.ts @@ -1,4 +1,5 @@ import { upperFirst } from 'scule' +import { convert } from 'convert-gitmoji' import type { ChangelogConfig } from './config' import type { GitCommit } from './git' @@ -47,7 +48,7 @@ export function generateMarkDown (commits: GitCommit[], config: ChangelogConfig) markdown.push(`See all changes: https://github.com/${config.github}/compare/${config.from}...${config.to}`) } - return markdown.join('\n').trim() + return convert(markdown.join('\n').trim(), true) } function formatCommit (commit: GitCommit) {