@docupace/pipeline 1.0.6-alpha.9 → 1.0.7-7.micro-cli

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.
Files changed (68) hide show
  1. package/.prettierrc.cjs +12 -12
  2. package/README.md +136 -0
  3. package/bin/azuread_update_callbacks_for_app.sh +58 -0
  4. package/bin/next-changeset-validate.sh +8 -8
  5. package/bitbucket-pipelines.yml +60 -0
  6. package/eslint.config.js +49 -26
  7. package/jest.config.js +15 -0
  8. package/next/changeset.sh +75 -75
  9. package/next/copy.sh +34 -34
  10. package/next/deploy.sh +40 -40
  11. package/next/execute.sh +123 -117
  12. package/next/sonar.sh +23 -23
  13. package/package.json +22 -7
  14. package/src/auth0/alias.js +79 -0
  15. package/src/auth0/alias.test.js +172 -0
  16. package/src/auth0/cli.js +82 -0
  17. package/src/auth0/configure.js +902 -0
  18. package/src/auth0/configure.test.js +167 -0
  19. package/src/auth0/export.js +48 -0
  20. package/src/auth0/export.test.js +103 -0
  21. package/src/auth0/metadata.js +141 -0
  22. package/src/auth0/metadata.test.js +186 -0
  23. package/src/auth0/vault.js +60 -0
  24. package/src/auth0/vault.test.js +134 -0
  25. package/src/changeset/changelog-wiki.js +328 -0
  26. package/src/changeset/changeset-config.js +34 -0
  27. package/src/changeset/cli.js +237 -281
  28. package/src/changeset/create.js +215 -0
  29. package/src/changeset/package-util.js +87 -0
  30. package/src/changeset/util.js +43 -0
  31. package/src/changeset/validate.js +91 -47
  32. package/src/changeset/version.js +102 -0
  33. package/src/jenkins/setParams.groovy +58 -59
  34. package/src/lib/merge-driver.js +204 -0
  35. package/src/merge/cli-merge-all.js +507 -0
  36. package/src/merge/cli-merge.js +492 -0
  37. package/src/merge/cli-resolve.js +399 -0
  38. package/src/merge/cli.js +38 -0
  39. package/src/merge/merge-changelog.js +87 -0
  40. package/src/merge/merge-package.js +106 -0
  41. package/src/merge/merge-types.js +82 -0
  42. package/src/merge/pr.js +231 -0
  43. package/src/micro/cli.js +71 -0
  44. package/src/micro/ms-deploy.js +273 -0
  45. package/src/micro/ms-publish.js +186 -0
  46. package/src/next/alias.js +53 -0
  47. package/src/next/apache.js +81 -0
  48. package/src/next/cli.js +111 -15
  49. package/src/next/config.js +137 -72
  50. package/src/next/connect.js +226 -0
  51. package/src/next/copy.js +61 -30
  52. package/src/next/deploy.js +633 -312
  53. package/src/next/git-to-semver.js +79 -0
  54. package/src/next/haproxy.js +76 -0
  55. package/src/next/jenkins.js +123 -88
  56. package/src/next/jira.js +84 -0
  57. package/src/next/logger.js +17 -0
  58. package/src/next/pipline.js +114 -115
  59. package/src/next/publish.js +71 -48
  60. package/src/next/pull.js +7 -7
  61. package/src/next/sonar.js +23 -23
  62. package/src/next/test.js +5 -0
  63. package/src/next/util.js +93 -0
  64. package/src/next/vault.js +45 -0
  65. package/terraform/apply.sh +37 -0
  66. package/terraform/init.sh +72 -0
  67. package/terraform/plan.sh +76 -0
  68. package/terraform/validate.sh +17 -0
@@ -0,0 +1,215 @@
1
+ import OpenAI from 'openai';
2
+ import z from 'zod';
3
+ import { zodResponseFormat } from 'openai/helpers/zod';
4
+ import fs from 'fs';
5
+ import path from 'path';
6
+ import inquirer from 'inquirer';
7
+ import { getMainPackage, getPackage, findJiraTicketId } from './util.js';
8
+ import { getPackageNames } from './package-util.js';
9
+ import { execSync } from 'child_process';
10
+
11
+ async function createChangesetDirectory() {
12
+ try {
13
+ // Use path.join to build a safe path to `.changeset`
14
+ const targetDir = path.join(process.cwd(), '.changeset');
15
+
16
+ // Create the directory recursively if it doesn't exist
17
+ await fs.promises.mkdir(targetDir, { recursive: true });
18
+ } catch (error) {
19
+ console.error('Error creating .changeset directory:', error);
20
+ }
21
+ }
22
+
23
+ /**
24
+ * Gets the current git branch name
25
+ */
26
+ async function getCurrentBranch() {
27
+ try {
28
+ const branchName = execSync('git branch --show-current', {
29
+ encoding: 'utf8',
30
+ shell: true,
31
+ }).trim();
32
+ console.log(`Current branch: ${branchName}`);
33
+ return branchName;
34
+ } catch (error) {
35
+ console.error('Error getting current branch:', error.message);
36
+ throw error;
37
+ }
38
+ }
39
+ /**
40
+ * Extracts a Jira ticket ID from a branch name
41
+ */
42
+ function extractJiraTicketId(branchName) {
43
+ const jiraTicketId = findJiraTicketId(branchName);
44
+ if (!jiraTicketId) {
45
+ throw new Error('No Jira ticket found in the branch name.');
46
+ }
47
+ return jiraTicketId;
48
+ }
49
+
50
+ /**
51
+ * Fetches Jira ticket data from Jira API
52
+ */
53
+ async function fetchJiraTicketData(jiraTicketId) {
54
+ const jiraBaseUrl = 'https://docupacellc.atlassian.net';
55
+ const jiraEmail = process.env.JIRA_API_EMAIL;
56
+ const jiraApiKey = process.env.JIRA_API_KEY;
57
+ const jiraFullApiKey = `${jiraEmail}:${jiraApiKey}`;
58
+ const jiraUrl = `${jiraBaseUrl}/rest/api/2/issue/${jiraTicketId}`;
59
+
60
+ const jiraResponse = await fetch(jiraUrl, {
61
+ headers: {
62
+ Authorization: `Basic ${Buffer.from(jiraFullApiKey).toString('base64')}`,
63
+ 'Content-Type': 'application/json',
64
+ },
65
+ });
66
+
67
+ if (!jiraResponse.ok) {
68
+ throw new Error(
69
+ `Failed to fetch Jira ticket ${jiraTicketId}. Status: ${jiraResponse.status}, Ticket URL: ${jiraUrl}`,
70
+ );
71
+ }
72
+
73
+ return await jiraResponse.json();
74
+ }
75
+
76
+ /**
77
+ * Generates release notes using OpenAI
78
+ */
79
+ async function generateReleaseNotes(jiraTicketData) {
80
+ const openaiClient = new OpenAI({
81
+ apiKey: process.env['OPENAI_API_KEY'],
82
+ });
83
+
84
+ const ChangeRequestSchema = z.object({
85
+ change_type: z.enum(['patch', 'minor']),
86
+ summary: z.string(),
87
+ jira_ticket_id: z.string(),
88
+ });
89
+
90
+ const openAiResponse = await openaiClient.chat.completions.create({
91
+ model: 'gpt-4o-mini',
92
+ messages: [
93
+ {
94
+ role: 'system',
95
+ content: `Process JSON from a Jira ticket to generate simple maximum 2 sentence release note for the ticket and determine the change type for bug it should be a patch for new feature it should be a minor change`,
96
+ },
97
+ {
98
+ role: 'user',
99
+ content: JSON.stringify(jiraTicketData),
100
+ },
101
+ ],
102
+ response_format: zodResponseFormat(ChangeRequestSchema, 'changeset_schema'),
103
+ temperature: 0,
104
+ });
105
+
106
+ const assistantResponse = openAiResponse.choices[0].message.content;
107
+ return JSON.parse(assistantResponse);
108
+ }
109
+
110
+ /**
111
+ * Writes the changeset file
112
+ */
113
+ async function writeJiraChangesetFile(
114
+ packages,
115
+ jiraTicketId,
116
+ changeType,
117
+ summary,
118
+ ) {
119
+ const text = `${summary} [${jiraTicketId}]`;
120
+ await writeChangesetFile(packages, jiraTicketId, changeType, text);
121
+ }
122
+
123
+ export async function writeChangesetFile(packages, filename, changeType, text) {
124
+ const packageEntries = packages
125
+ .map((pkg) => `'${pkg.name}': ${changeType}`)
126
+ .join('\n');
127
+
128
+ const changesetContent = `---
129
+ ${packageEntries}
130
+ ---
131
+
132
+ ${text}
133
+ `;
134
+
135
+ const changesetFile = `./.changeset/${filename}.md`;
136
+
137
+ await createChangesetDirectory();
138
+ await fs.promises.writeFile(changesetFile, changesetContent);
139
+ console.log(`Created changeset file at ${changesetFile}`);
140
+ }
141
+
142
+ /**
143
+ * Main function to create a changeset
144
+ */
145
+
146
+ export async function createChangeset() {
147
+ const packages = getPackageNames();
148
+
149
+ if (packages.length > 1) {
150
+ const allPackages = packages;
151
+ const response = await inquirer.prompt([
152
+ {
153
+ type: 'checkbox',
154
+ name: 'packages',
155
+ message: 'Which packages do you want to generate changesets for?',
156
+ choices: allPackages.map((appPackage) => ({
157
+ name: appPackage.name,
158
+ value: appPackage.name,
159
+ })),
160
+ validate: (input) => {
161
+ if (input.length === 0) {
162
+ return 'Please select at least one package.';
163
+ }
164
+ return true;
165
+ },
166
+ },
167
+ ]);
168
+
169
+ const selectedPackages = allPackages.filter((appPackage) =>
170
+ response.packages.includes(appPackage.name),
171
+ );
172
+
173
+ // Get package contents for all selected packages
174
+ const selectedPackageContents = await Promise.all(
175
+ selectedPackages.map(async (selectedPackage) => {
176
+ return await getPackage(selectedPackage.path);
177
+ }),
178
+ );
179
+
180
+ await createChangesetForPackage(selectedPackageContents);
181
+ } else {
182
+ const mainPackage = await getMainPackage();
183
+ await createChangesetForPackage([mainPackage]);
184
+ }
185
+ }
186
+
187
+ export async function createChangesetForPackage(packages) {
188
+ try {
189
+ // Step 1: Get the current branch name
190
+ const branchName = await getCurrentBranch();
191
+
192
+ // Step 2: Extract Jira ticket number
193
+ const jiraTicketId = extractJiraTicketId(branchName);
194
+
195
+ // Step 3: Fetch Jira ticket data
196
+ const jiraTicketData = await fetchJiraTicketData(jiraTicketId);
197
+ const jiraSummary = jiraTicketData.fields.summary;
198
+ console.log(
199
+ `Generating release notes for ${jiraTicketId} - ${jiraSummary}`,
200
+ );
201
+
202
+ // Step 4: Generate release notes using OpenAI
203
+ const { change_type, summary } = await generateReleaseNotes(jiraTicketData);
204
+ console.log(`Change type: ${change_type}`);
205
+ console.log(`Release note: ${summary}`);
206
+
207
+ // Step 5: Create a changeset .md file for all packages
208
+ await writeJiraChangesetFile(packages, jiraTicketId, change_type, summary);
209
+
210
+ console.log('Changeset created successfully!');
211
+ } catch (err) {
212
+ console.error(`Error: ${err.message}`);
213
+ process.exit(1);
214
+ }
215
+ }
@@ -0,0 +1,87 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+
4
+ export function getPackageNames(rootPath = '.') {
5
+ const appsDir = path.join(rootPath, 'apps');
6
+ const packagesDir = path.join(rootPath, 'packages');
7
+ const rootPackageJson = path.join(rootPath, 'package.json');
8
+
9
+ // Check if this is a monorepo (has apps and/or packages directories)
10
+ const hasAppsDir =
11
+ fs.existsSync(appsDir) && fs.statSync(appsDir).isDirectory();
12
+ const hasPackagesDir =
13
+ fs.existsSync(packagesDir) && fs.statSync(packagesDir).isDirectory();
14
+
15
+ if (hasAppsDir || hasPackagesDir) {
16
+ // This is a monorepo
17
+ const packages = [];
18
+
19
+ // Get packages from apps directory
20
+ if (hasAppsDir) {
21
+ const appsPackages = getPackagesFromDirectory(appsDir);
22
+ packages.push(...appsPackages);
23
+ }
24
+
25
+ // Get packages from packages directory
26
+ if (hasPackagesDir) {
27
+ const packagesPackages = getPackagesFromDirectory(packagesDir);
28
+ packages.push(...packagesPackages);
29
+ }
30
+
31
+ return packages;
32
+ } else {
33
+ // This is not a monorepo, return single package
34
+ if (fs.existsSync(rootPackageJson)) {
35
+ try {
36
+ const packageJson = JSON.parse(
37
+ fs.readFileSync(rootPackageJson, 'utf8'),
38
+ );
39
+ return packageJson.name
40
+ ? [{ name: packageJson.name, path: rootPath, content: packageJson }]
41
+ : [];
42
+ } catch (error) {
43
+ console.error('Error reading root package.json:', error);
44
+ return [];
45
+ }
46
+ }
47
+ return [];
48
+ }
49
+ }
50
+
51
+ function getPackagesFromDirectory(dirPath) {
52
+ const packages = [];
53
+
54
+ try {
55
+ const items = fs.readdirSync(dirPath);
56
+
57
+ for (const item of items) {
58
+ const itemPath = path.join(dirPath, item);
59
+ const packageJsonPath = path.join(itemPath, 'package.json');
60
+
61
+ // Check if item is a directory and has package.json
62
+ if (
63
+ fs.statSync(itemPath).isDirectory() &&
64
+ fs.existsSync(packageJsonPath)
65
+ ) {
66
+ try {
67
+ const packageJson = JSON.parse(
68
+ fs.readFileSync(packageJsonPath, 'utf8'),
69
+ );
70
+ if (packageJson.name) {
71
+ packages.push({
72
+ name: packageJson.name,
73
+ path: itemPath,
74
+ content: packageJson,
75
+ });
76
+ }
77
+ } catch (error) {
78
+ console.error(`Error reading package.json in ${itemPath}:`, error);
79
+ }
80
+ }
81
+ }
82
+ } catch (error) {
83
+ console.error(`Error reading directory ${dirPath}:`, error);
84
+ }
85
+
86
+ return packages;
87
+ }
@@ -0,0 +1,43 @@
1
+ import path from 'path';
2
+ import fs from 'fs';
3
+
4
+ async function fileExists(filePath) {
5
+ try {
6
+ await fs.promises.access(filePath);
7
+ return true;
8
+ } catch {
9
+ return false;
10
+ }
11
+ }
12
+ export async function getMainPackage() {
13
+ const mainModulePath = process.cwd();
14
+ return getPackage(mainModulePath);
15
+ }
16
+
17
+ export async function getPackage(mainModulePath) {
18
+ if (mainModulePath) {
19
+ const packageJsonPath = path.join(mainModulePath, 'package.json');
20
+ if (await fileExists(packageJsonPath)) {
21
+ const fileContent = await fs.promises.readFile(packageJsonPath, 'utf-8');
22
+ const packageJson = JSON.parse(fileContent);
23
+ return packageJson;
24
+ }
25
+ }
26
+ throw new Error('Main package.json not found');
27
+ }
28
+
29
+ /**
30
+ * Locates and extracts a JIRA Ticket ID from a given string.
31
+ * <p>
32
+ * The JIRA Ticket ID is expected to follow the pattern of uppercase letters (at least two) followed by a hyphen and digits (e.g., DC-1234, INFP-9).
33
+ * @param str the string to search for a JIRA ticket ID
34
+ * @returns {JIRA-TicketID|null}
35
+ */
36
+ export function findJiraTicketId(str) {
37
+ if (!str) {
38
+ return null;
39
+ }
40
+ const regex = /([A-Z]{2,}-\d+)/;
41
+ const matches = str.match(regex);
42
+ return matches ? matches[0] : null;
43
+ }
@@ -1,47 +1,91 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
-
4
- export async function validateChangesets(directoryPath) {
5
- try {
6
- // Step 1: Read the directory for md files excluding README.md
7
- const allFiles = fs.readdirSync(directoryPath);
8
- const mdFiles = allFiles.filter(
9
- (file) => file.endsWith('.md') && file !== 'README.md',
10
- );
11
-
12
- // Step 2: Check for pre.json and parse it
13
- const preJsonPath = path.join(directoryPath, 'pre.json');
14
- let preJson;
15
-
16
- if (!fs.existsSync(preJsonPath) && mdFiles.length === 0) {
17
- throw new Error('Error: No pre.json and no md files found.');
18
- }
19
-
20
- if (fs.existsSync(preJsonPath)) {
21
- preJson = JSON.parse(fs.readFileSync(preJsonPath, 'utf-8'));
22
-
23
- if (preJson.mode == 'pre') {
24
- // Step 4a: Get list of changesets from pre.json
25
- const changesets = preJson.changesets || [];
26
- const changesetNames = changesets.map((change) => change);
27
-
28
- // Step 4b: Match files with the list of changesets
29
- const mdFileNamesWithoutExt = mdFiles.map((file) =>
30
- path.basename(file, '.md'),
31
- );
32
- const unmatchedFiles = mdFileNamesWithoutExt.filter(
33
- (fileName) => !changesetNames.includes(fileName),
34
- );
35
-
36
- if (unmatchedFiles.length == 0) {
37
- throw new Error('Error: No new MD files found:');
38
- }
39
- }
40
- }
41
-
42
- console.log('Validation successful.');
43
- } catch (error) {
44
- console.log(error.message);
45
- throw error;
46
- }
47
- }
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import { $ } from 'zx';
4
+
5
+ import { isMonoRepo, setGitInfo } from '../next/util.js';
6
+ import { versionStatus } from './version.js';
7
+
8
+ const CHANGESET_DIR = '.changeset';
9
+
10
+ function areArraysEqualIgnoringOrder(arr1, arr2) {
11
+ if (arr1.length !== arr2.length) return false;
12
+
13
+ const sortedA = [...arr1].sort();
14
+ const sortedB = [...arr2].sort();
15
+
16
+ return sortedA.every((element, index) => element === sortedB[index]);
17
+ }
18
+
19
+ export async function validateChangesets() {
20
+ await setGitInfo();
21
+ const destBranch = process.env.BITBUCKET_PR_DESTINATION_BRANCH;
22
+ await $`git fetch origin ${destBranch}:${destBranch}`;
23
+ let releases;
24
+
25
+ try {
26
+ console.log('🔍 Validating changesets...');
27
+ releases = await versionStatus(destBranch);
28
+ } catch (e) {
29
+ console.error(
30
+ '❌ No changeset found. Please add a changeset to this PR. Please see more information at https://docupacellc.atlassian.net/wiki/spaces/PM/pages/1350893571/Creating+changesets+for+Docupace+Next',
31
+ e,
32
+ );
33
+ process.exit(-1);
34
+ }
35
+
36
+ if (!['master', 'main'].includes(destBranch)) {
37
+ if (releases.some((item) => item.type !== 'patch')) {
38
+ console.error(
39
+ '❌ A changeset must be a patch for change to a release branch',
40
+ );
41
+ process.exit(-1);
42
+ }
43
+ }
44
+
45
+ console.log('✅ Changeset validation passed.');
46
+ }
47
+
48
+ export async function validateChangesetPath(directoryPath) {
49
+ try {
50
+ // Step 1: Read the directory for md files excluding README.md
51
+ const allFiles = fs.readdirSync(directoryPath);
52
+ const mdFiles = allFiles.filter(
53
+ (file) => file.endsWith('.md') && file !== 'README.md',
54
+ );
55
+
56
+ // Step 2: Check for pre.json and parse it
57
+ const preJsonPath = path.join(directoryPath, 'pre.json');
58
+ let preJson;
59
+
60
+ if (!fs.existsSync(preJsonPath) && mdFiles.length === 0) {
61
+ throw new Error('Error: No pre.json and no md files found.');
62
+ }
63
+
64
+ if (fs.existsSync(preJsonPath)) {
65
+ preJson = JSON.parse(fs.readFileSync(preJsonPath, 'utf-8'));
66
+
67
+ if (preJson.mode == 'pre') {
68
+ // Step 4a: Get list of changesets from pre.json
69
+ const changesets = preJson.changesets || [];
70
+ const changesetNames = changesets.map((change) => change);
71
+
72
+ // Step 4b: Match files with the list of changesets
73
+ const mdFileNamesWithoutExt = mdFiles.map((file) =>
74
+ path.basename(file, '.md'),
75
+ );
76
+ const unmatchedFiles = mdFileNamesWithoutExt.filter(
77
+ (fileName) => !changesetNames.includes(fileName),
78
+ );
79
+
80
+ if (unmatchedFiles.length == 0) {
81
+ throw new Error('Error: No new MD files found:');
82
+ }
83
+ }
84
+ }
85
+
86
+ console.log('Validation successful.');
87
+ } catch (error) {
88
+ console.log(error.message);
89
+ throw error;
90
+ }
91
+ }
@@ -0,0 +1,102 @@
1
+ import { setGitInfo } from '../next/util.js';
2
+ import { $ } from 'zx';
3
+ import fs from 'fs';
4
+ import { updateComponentVersion } from '../next/jira.js';
5
+ import { findJiraTicketId } from './util.js';
6
+ import { revertBaseBranch, updateBaseBranch } from './changeset-config.js';
7
+ import semver from 'semver';
8
+
9
+ const changeSetPackage = `{
10
+ "name": "changeset-package",
11
+ "version": "1.0.0",
12
+ "description": "",
13
+ "scripts": {
14
+ },
15
+ "type": "module",
16
+ "keywords": [],
17
+ "author": "",
18
+ "license": "ISC",
19
+ "dependencies": {},
20
+ "devDependencies": {
21
+ "@changesets/cli": "^2.27.10"
22
+ }
23
+ }
24
+ `;
25
+
26
+ export function toShortVersion(version) {
27
+ const parsed = semver.parse(version);
28
+ if (!parsed) return null;
29
+ return `${parsed.major}.${parsed.minor}`;
30
+ }
31
+
32
+ export async function versionStatus(sinceBranch) {
33
+ const outputPath = './changeset-output.json';
34
+
35
+ if (sinceBranch) {
36
+ await $`pnpm changeset status --output=${outputPath} --since=${sinceBranch}`;
37
+ } else {
38
+ await $`pnpm changeset status --output=${outputPath}`;
39
+ }
40
+
41
+ // Read the file and parse JSON
42
+ const jsonOutput = JSON.parse(await fs.promises.readFile(outputPath, 'utf8'));
43
+
44
+ await fs.promises.rm(outputPath);
45
+ return jsonOutput.releases;
46
+ }
47
+
48
+ export async function versionCommand(closeVersion = false) {
49
+ console.log('📦 Running Changeset versioning...');
50
+ if (!process.env.IS_DEV) {
51
+ await setGitInfo();
52
+ await $`mv package.json package.json.bak`;
53
+ await $`mv pnpm-lock.yaml pnpm-lock.yaml.bak`;
54
+ await fs.promises.writeFile('package.json', changeSetPackage);
55
+ await $`pnpm install`;
56
+ await $`rm package.json pnpm-lock.yaml`;
57
+ await $`mv package.json.bak package.json`;
58
+ await $`mv pnpm-lock.yaml.bak pnpm-lock.yaml`;
59
+ }
60
+ if (closeVersion) {
61
+ await $`pnpm changeset pre exit`;
62
+ }
63
+
64
+ let originalBaseBranch;
65
+ try {
66
+ originalBaseBranch = updateBaseBranch();
67
+ const releases = await versionStatus();
68
+ revertBaseBranch(originalBaseBranch);
69
+ await $`pnpm changeset version`;
70
+
71
+ return releases;
72
+ } catch {
73
+ revertBaseBranch(originalBaseBranch);
74
+ return [];
75
+ }
76
+ }
77
+
78
+ export async function updateJiraWithVersion(releases) {
79
+ const lastCommit = (await $`git log -1 --pretty=%B`).stdout.trim();
80
+ console.log(`Last commit '${lastCommit}' being processed to get Jira ticket`);
81
+
82
+ const jiraTicketId = findJiraTicketId(lastCommit);
83
+
84
+ // If we have all the necessary data, update the component version in Jira
85
+ if (jiraTicketId) {
86
+ for (const release of releases) {
87
+ try {
88
+ await updateComponentVersion(
89
+ jiraTicketId,
90
+ release.name,
91
+ release.newVersion,
92
+ );
93
+ } catch (error) {
94
+ console.error(
95
+ `Failed to update Jira component version: ${error.message}`,
96
+ );
97
+ }
98
+ }
99
+ }
100
+
101
+ console.log('✅ Changeset versioning complete.');
102
+ }