@docupace/pipeline 1.0.5-alpha.21 → 1.0.5-alpha.22
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 +1 -1
- package/src/changeset/cli.js +14 -2
package/package.json
CHANGED
package/src/changeset/cli.js
CHANGED
|
@@ -15,7 +15,19 @@ const program = new Command();
|
|
|
15
15
|
|
|
16
16
|
const args = process.argv;
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
async function createChangesetDirectory() {
|
|
19
|
+
try {
|
|
20
|
+
// Use path.join to build a safe path to `.changeset`
|
|
21
|
+
const targetDir = path.join(process.cwd(), '.changeset');
|
|
22
|
+
|
|
23
|
+
// Create the directory recursively if it doesn't exist
|
|
24
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
25
|
+
console.log(`Directory created at ${targetDir}`);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
console.error('Error creating .changeset directory:', error);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
19
31
|
|
|
20
32
|
function run(command) {
|
|
21
33
|
return new Promise((resolve, reject) => {
|
|
@@ -255,7 +267,7 @@ ${summary} [${jiraTicketId}]
|
|
|
255
267
|
`;
|
|
256
268
|
const changesetFile = `./.changeset/${jiraTicketId}.md`;
|
|
257
269
|
|
|
258
|
-
await
|
|
270
|
+
await createChangesetDirectory();
|
|
259
271
|
await fs.promises.writeFile(changesetFile, changesetContent);
|
|
260
272
|
console.log(`Created changeset file at ${changesetFile}`);
|
|
261
273
|
|