Skip to content

Commit a6aaced

Browse files
Merge remote-tracking branch 'origin/develop_v3' into VE-4802
2 parents c53a2b8 + a7a0d53 commit a6aaced

12 files changed

Lines changed: 3108 additions & 776 deletions

.husky/commit-msg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx --no-install commitlint --edit "$1"
5+
npm run build
6+
npx tsx mustache.ts
7+
git add README.md
8+
npx lint-staged

.husky/pre-commit

Lines changed: 0 additions & 7 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 1223 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Alternatively, if you want to include the package directly in your website HTML
1616

1717
```html
1818
<script type='module' integrity='sha384-9M4o9H23Ax5ZTzsMRLgdlFBYk2hy+ub6XDiZhHWJjfebQ+MZ9iZw+GNep9ac0uFV' crossorigin="anonymous">
19-
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@3.0.1';
19+
import ContentstackLivePreview from 'https://esm.sh/@contentstack/live-preview-utils@3.1.0';
2020
2121
ContentstackLivePreview.init({
2222
stackDetails: {

changelog-template.hbs

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# Changelog
2+
3+
{{!--
4+
Introduction
5+
• This template tries to follow conventional commits format https://www.conventionalcommits.org/en/v1.0.0/
6+
• The template uses regex to filter commit types into their own headings (this is more than just fixes and features headings)
7+
• It also uses the replaceText function in package.json to remove the commit type text from the message, because the headers are shown instead.
8+
• The text 'Breaking:' or 'Breaking changes:' can be located anywhere in the commit.
9+
• The types feat:, fix:, chore:, docs:, refactor:, test:, style:, perf: must be at the beginning of the commit subject with an : on end.
10+
• They can optionally have a scope set to outline the module or component that is affected eg feat(bldAssess):
11+
• There is a short hash on the end of every commit that is currently commented out so that change log did not grow too long (due to some system's file size limitations). You can uncomment if you wish [`{{shorthash}}`]({{href}})
12+
13+
Example Definitions
14+
• feat: A new feature
15+
• fix: A bug fix
16+
• perf: A code change that improves performance
17+
• refactor: A code change that neither fixes a bug nor adds a feature
18+
• style: Changes that do not affect the meaning of the code (white-space, formatting, spelling mistakes, missing semi-colons, etc)
19+
• test: Adding missing tests or correcting existing tests
20+
• docs: Adding/updating documentation
21+
• chore: Something like updating a library version, or moving files to be in a better location and updating all file refs
22+
--}}
23+
24+
25+
{{!-- In package.json need to add this to remove label text from the change log output (because the markdown headers are now used to group them).
26+
NOTES • Individual brackets have been escaped twice to be Json compliant.
27+
• For items that define a scope eg feat(bldAssess): We remove the 1st bracket and then re-add it so we can select the right piece of text
28+
{
29+
"name": "my-awesome-package",
30+
"auto-changelog": {
31+
"replaceText": {
32+
"([bB]reaking:)": "",
33+
"([bB]reaking change:)": "",
34+
"(^[bB]uild:)": "",
35+
"(^[bB]uild\\()": "\\(",
36+
"(^[dD]eprecate:)": "",
37+
"(^[dD]eprecate\\()": "\\(",
38+
"(^[fF]eat:)": "",
39+
"(^[fF]eat\\()": "\\(",
40+
"(^[fF]ix:)": "",
41+
"(^[fF]ix\\()": "\\(",
42+
"(^[cC]hore:)": "",
43+
"(^[cC]hore\\()": "\\(",
44+
"(^[dD]ocs:)": "",
45+
"(^[dD]ocs\\()": "\\(",
46+
"(^[rR]efactor:)": "",
47+
"(^[rR]efactor\\()": "\\(",
48+
"(^[tT]est:)": "",
49+
"(^[tT]est\\()": "\\(",
50+
"(^[sS]tyle:)": "",
51+
"(^[sS]tyle\\()": "\\(",
52+
"(^[pP]erf:)": "",
53+
"(^[pP]erf\\()": "\\("
54+
}
55+
}
56+
}
57+
--}}
58+
59+
{{!--
60+
Regex reminders
61+
^ = starts with
62+
\( = ( character (otherwise it is interpreted as a regex lookup group)
63+
* = zero or more of the previous character
64+
\s = whitespace
65+
. = any character except newline
66+
| = or
67+
[aA] = character a or character A
68+
--}}
69+
70+
71+
{{#each releases}}
72+
{{#if href}}
73+
## [{{title}}]({{href}})
74+
{{else}}
75+
## {{title}}
76+
{{/if}}
77+
78+
> {{niceDate}}
79+
80+
{{#if summary}}
81+
{{summary}}
82+
{{/if}}
83+
84+
{{! List commits that fix a given issues}}
85+
{{#each fixes}}
86+
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}}){{/each}}
87+
{{/each}}
88+
89+
{{! List merge commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}}
90+
{{#commit-list merges heading='### Breaking Changes :warning:' message='[bB]reaking [cC]hange:|[bB]reaking:' exclude='\[skip-changelog\]'}}
91+
- {{message}} @{{author}} <!--[`#{{id}}`]({{href}}) -->
92+
{{/commit-list}}
93+
94+
{{! List commits organised under a heading, but not those already listed in the breaking section }}
95+
{{#commit-list merges heading='### Build' message='^[bB]uild:|^[bB]uild\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
96+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
97+
{{/commit-list}}
98+
99+
{{#commit-list merges heading='### Deprecated Features' message='^[dD]eprecate:|^[dD]eprecate\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
100+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
101+
{{/commit-list}}
102+
103+
{{#commit-list merges heading='### New Features' message='^[fF]eat:|^[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
104+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
105+
{{/commit-list}}
106+
107+
{{#commit-list merges heading='### Fixes' message='^[fF]ix:|^[fF]ix\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
108+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
109+
{{/commit-list}}
110+
111+
{{#commit-list merges heading='### Chores And Housekeeping' message='^[cC]hore:|^[cC]hore\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
112+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
113+
{{/commit-list}}
114+
115+
{{#commit-list merges heading='### Documentation Changes' message='^[dD]ocs:|^[dD]ocs\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
116+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
117+
{{/commit-list}}
118+
119+
{{#commit-list merges heading='### Refactoring and Updates' message='^[rR]efactor:|^[rR]efactor\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
120+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
121+
{{/commit-list}}
122+
123+
{{#commit-list merges heading='### Changes to Test Assests' message='^[tT]est:|^[tT]est\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
124+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
125+
{{/commit-list}}
126+
127+
{{#commit-list merges heading='### Tidying of Code eg Whitespace' message='^[sS]tyle:|^[sS]tyle\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
128+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
129+
{{/commit-list}}
130+
131+
{{#commit-list merges heading='### Performance Improvements' message='^[pP]erf:|^[pP]erf\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
132+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
133+
{{/commit-list}}
134+
135+
{{#commit-list merges heading='### CI Improvements' message='^[cC][iI]:|^[cC][iI]\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
136+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
137+
{{/commit-list}}
138+
139+
{{#commit-list merges heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild ?\(|^[dD]eprecate:|^[dD]eprecate ?\(|^[fF]eat:|^[fF]eat ?\(|^[fF]ix:|^[fF]ix ?\(|^[cC]hore:|^[cC]hore ?\(|^[cC][iI]:|^[cC][iI] ?\(|^[dD]ocs:|^[dD]ocs ?\(|^[rR]efactor:|^[rR]efactor ?\(|^[tT]est:|^[tT]est ?\(|^[sS]tyle:|^[sS]tyle ?\(|^[pP]erf:|^[pP]erf ?\(|\[skip-changelog\]'}}
140+
- {{message}} ({{author}}{{#if href}} - [#{{id}}]({{href}}){{/if}})
141+
{{/commit-list}}
142+
143+
{{! List commits with 'breaking:' or 'Breaking change:' anywhere in the message under a heading}}
144+
{{#commit-list commits heading='### Breaking Changes :warning:' message='[bB]reaking [cC]hange:|[bB]reaking:' exclude='\[skip-changelog\]'}}
145+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
146+
{{/commit-list}}
147+
148+
{{! List commits organised under a heading, but not those already listed in the breaking section }}
149+
{{#commit-list commits heading='### Build' message='^[bB]uild:|^[bB]uild\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
150+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
151+
{{/commit-list}}
152+
153+
{{#commit-list commits heading='### Deprecated Features' message='^[dD]eprecate:|^[dD]eprecate\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
154+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
155+
{{/commit-list}}
156+
157+
{{#commit-list commits heading='### New Features' message='^[fF]eat:|^[fF]eat\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
158+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
159+
{{/commit-list}}
160+
161+
{{#commit-list commits heading='### Fixes' message='^[fF]ix:|^[fF]ix\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
162+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
163+
{{/commit-list}}
164+
165+
{{#commit-list commits heading='### Chores And Housekeeping' message='^[cC]hore:|^[cC]hore\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
166+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
167+
{{/commit-list}}
168+
169+
{{#commit-list commits heading='### Documentation Changes' message='^[dD]ocs:|^[dD]ocs\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
170+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
171+
{{/commit-list}}
172+
173+
{{#commit-list commits heading='### Refactoring and Updates' message='^[rR]efactor:|^[rR]efactor\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
174+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
175+
{{/commit-list}}
176+
177+
{{#commit-list commits heading='### Changes to Test Assests' message='^[tT]est:|^[tT]est\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
178+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
179+
{{/commit-list}}
180+
181+
{{#commit-list commits heading='### Tidying of Code eg Whitespace' message='^[sS]tyle:|^[sS]tyle\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
182+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
183+
{{/commit-list}}
184+
185+
{{#commit-list commits heading='### Performance Improvements' message='^[pP]erf:|^[pP]erf\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
186+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
187+
{{/commit-list}}
188+
189+
{{#commit-list commits heading='### CI Improvements' message='^[cC][iI]:|^[cC][iI]\(' exclude='[bB]reaking [cC]hange:|[bB]reaking:|\[skip-changelog\]'}}
190+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
191+
{{/commit-list}}
192+
193+
{{#commit-list commits heading='### General Changes' exclude='[bB]reaking [cC]hange:|[bB]reaking:|^[bB]uild:|^[bB]uild ?\(|^[dD]eprecate:|^[dD]eprecate ?\(|^[fF]eat:|^[fF]eat ?\(|^[fF]ix:|^[fF]ix ?\(|^[cC]hore:|^[cC]hore ?\(|^[cC][iI]:|^[cC][iI] ?\(|^[dD]ocs:|^[dD]ocs ?\(|^[rR]efactor:|^[rR]efactor ?\(|^[tT]est:|^[tT]est ?\(|^[sS]tyle:|^[sS]tyle ?\(|^[pP]erf:|^[pP]erf ?\(|\[skip-changelog\]'}}
194+
- {{subject}} ({{author}}{{#if href}} - [{{shorthash}}]({{href}}){{/if}})
195+
{{/commit-list}}
196+
197+
{{/each}}

commitlint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import configConventional from '@commitlint/config-conventional';
2+
3+
export default {
4+
extends: [configConventional],
5+
};

0 commit comments

Comments
 (0)