@deriv-com/smartcharts-champion 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deriv-com/smartcharts-champion",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "main": "dist/smartcharts.js",
5
5
  "author": "vinu@deriv.com",
6
6
  "config": {
@@ -61,6 +61,7 @@
61
61
  "@commitlint/cli": "^19.3.0",
62
62
  "@commitlint/config-conventional": "^19.2.2",
63
63
  "@commitlint/cz-commitlint": "^19.2.0",
64
+ "@deriv-com/shiftai-cli": "^1.0.7",
64
65
  "@semantic-release/changelog": "^6.0.3",
65
66
  "@semantic-release/github": "^9.2.6",
66
67
  "@semantic-release/npm": "^11.0.3",
package/release.utils.cjs CHANGED
@@ -147,21 +147,24 @@ const COMMIT_HASH_LENGTH = 7;
147
147
  * @param {Object} context `conventional-changelog` context.
148
148
  * @return {Object} the transformed commit.
149
149
  */
150
- // [AI]
151
150
  const customTransform = (commit, context) => {
152
151
  // Create a copy of the commit object to avoid modifying the immutable object
153
152
  const transformedCommit = { ...commit };
154
-
153
+
155
154
  if (transformedCommit.notes) {
156
155
  transformedCommit.notes.forEach(note => {
157
156
  note.title = 'Breaking changes';
158
157
  });
159
158
  }
160
159
 
161
- if (types.types[transformedCommit.type] && (types.types[transformedCommit.type].changelog || (transformedCommit.notes && transformedCommit.notes.length > 0))) {
162
- transformedCommit.type = `${types.types[transformedCommit.type].emoji ? types.types[transformedCommit.type].emoji : ''} \t ${
163
- types.types[transformedCommit.type].title
164
- }`;
160
+ if (
161
+ types.types[transformedCommit.type] &&
162
+ (types.types[transformedCommit.type].changelog ||
163
+ (transformedCommit.notes && transformedCommit.notes.length > 0))
164
+ ) {
165
+ transformedCommit.type = `${
166
+ types.types[transformedCommit.type].emoji ? types.types[transformedCommit.type].emoji : ''
167
+ } \t ${types.types[transformedCommit.type].title}`;
165
168
  } else {
166
169
  return null;
167
170
  }
@@ -190,7 +193,10 @@ const customTransform = (commit, context) => {
190
193
 
191
194
  if (context.host) {
192
195
  // User URLs.
193
- transformedCommit.subject = transformedCommit.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9]){0,38})/g, `[@$1](${context.host}/$1)`);
196
+ transformedCommit.subject = transformedCommit.subject.replace(
197
+ /\B@([a-z0-9](?:-?[a-z0-9]){0,38})/g,
198
+ `[@$1](${context.host}/$1)`
199
+ );
194
200
  }
195
201
  }
196
202
 
@@ -207,5 +213,4 @@ const customTransform = (commit, context) => {
207
213
 
208
214
  return transformedCommit;
209
215
  };
210
- // [/AI]
211
216
  module.exports = customTransform;