Compare commits

..

10 Commits

4 changed files with 35 additions and 7 deletions

View File

@ -1,5 +1,34 @@
# Changelog # Changelog
## 2024-06-23 - 1.3.10 - fix(aidocs_classes)
Fix changelog format to remove extra newline
- Updated `ts/aidocs_classes/commit.ts` to fix the changelog format.
## 2024-06-23 - 1.3.9 - fix(aidoc)
Fix changelog generation by properly stripping markdown code fences
- Corrected the changelog generation code to ensure markdown code fences are properly stripped.
## 2024-06-23 - 1.3.8 - fix(changelog)
Fix changelog generation by properly stripping markdown code fences
- Corrected the changelog generation code to ensure markdown code fences are properly stripped.
## 2024-06-23 - 1.3.7 - fix(aidoc)
Update to include package-lock.json in uncommitted changes check
- Modified the getUncommittedDiff method call in commit.ts to include package-lock.json along with pnpm-lock.yaml
## 2024-06-23 - 1.3.6 - fix(commit)
Fixed issue with retrieving uncommitted diffs in git repository
- Revised logic to correctly handle uncommitted changes by using an array for `getUncommittedDiff` method
- Ensured proper handling and representation of uncommitted changes in the output
## 2024-06-23 - 1.3.5 - fix(aidocs_classes) ## 2024-06-23 - 1.3.5 - fix(aidocs_classes)
Refactor and enhance changelog formatting Refactor and enhance changelog formatting

View File

@ -1,6 +1,6 @@
{ {
"name": "@git.zone/tsdoc", "name": "@git.zone/tsdoc",
"version": "1.3.5", "version": "1.3.10",
"private": false, "private": false,
"description": "An advanced TypeScript documentation tool using AI to generate and enhance documentation for TypeScript projects.", "description": "An advanced TypeScript documentation tool using AI to generate and enhance documentation for TypeScript projects.",
"type": "module", "type": "module",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@git.zone/tsdoc', name: '@git.zone/tsdoc',
version: '1.3.5', version: '1.3.10',
description: 'An advanced TypeScript documentation tool using AI to generate and enhance documentation for TypeScript projects.' description: 'An advanced TypeScript documentation tool using AI to generate and enhance documentation for TypeScript projects.'
} }

View File

@ -27,7 +27,7 @@ export class Commit {
smartgitInstance, smartgitInstance,
this.projectDir this.projectDir
); );
const diffString = await gitRepo.getUncommittedDiff(); const diffStringArray = await gitRepo.getUncommittedDiff(['pnpm-lock.yaml', 'package-lock.json']);
const projectContext = new ProjectContext(this.projectDir); const projectContext = new ProjectContext(this.projectDir);
let contextString = await projectContext.update(); let contextString = await projectContext.update();
contextString = ` contextString = `
@ -35,7 +35,7 @@ ${contextString}
Below is the diff of the uncommitted changes. If nothing is changed, there are no changes: Below is the diff of the uncommitted changes. If nothing is changed, there are no changes:
${diffString || 'No changes.'} ${diffStringArray[0] ? diffStringArray.join('\n\n') : 'No changes.'}
`; `;
let result = await this.aiDocsRef.openaiInstance.chat({ let result = await this.aiDocsRef.openaiInstance.chat({
@ -110,7 +110,7 @@ ${JSON.stringify(commitMessages, null, 2)}
previousChangelog = await plugins.smartfile.SmartFile.fromString( previousChangelog = await plugins.smartfile.SmartFile.fromString(
previousChangelogPath, previousChangelogPath,
result2.message, result2.message.replaceAll('```markdown', '').replaceAll('```', ''),
'utf8' 'utf8'
); );
} }
@ -120,8 +120,7 @@ ${JSON.stringify(commitMessages, null, 2)}
let newChangelog = `# Changelog\n\n${`## ${newDateString} - {{nextVersion}} - {{nextVersionScope}} let newChangelog = `# Changelog\n\n${`## ${newDateString} - {{nextVersion}} - {{nextVersionScope}}
{{nextVersionMessage}} {{nextVersionMessage}}
{{nextVersionDetails}} {{nextVersionDetails}}`}\n${oldChangelog}`;
`}\n\n${oldChangelog}`;
resultObject.changelog = newChangelog; resultObject.changelog = newChangelog;
return resultObject; return resultObject;