@docupace/pipeline 1.0.39-matttest.38 → 1.0.39-matttest.39

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": "@docupace/pipeline",
3
- "version": "1.0.39-matttest.38",
3
+ "version": "1.0.39-matttest.39",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1,4 +1,3 @@
1
- import { $ } from 'zx';
2
1
  import OpenAI from 'openai';
3
2
  import z from 'zod';
4
3
  import { zodResponseFormat } from 'openai/helpers/zod';
@@ -7,6 +6,7 @@ import path from 'path';
7
6
  import inquirer from 'inquirer';
8
7
  import { getMainPackage, getPackage } from './util.js';
9
8
  import { getPackageNames } from './package-util.js';
9
+ import { execSync } from 'child_process';
10
10
 
11
11
  async function createChangesetDirectory() {
12
12
  try {
@@ -24,11 +24,18 @@ async function createChangesetDirectory() {
24
24
  * Gets the current git branch name
25
25
  */
26
26
  async function getCurrentBranch() {
27
- const branchName = (await $`git branch --show-current`).stdout.trim();
28
- console.log(`Current branch: ${branchName}`);
29
- return branchName;
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
+ }
30
38
  }
31
-
32
39
  /**
33
40
  * Extracts a Jira ticket ID from a branch name
34
41
  */