fix: remove TypeScript type annotations from bumpVersion function

- Updated the bumpVersion function to use plain JavaScript by removing TypeScript type annotations, improving compatibility with non-TypeScript environments.
- Cleaned up whitespace in the bump-version.mjs file for better readability.
This commit is contained in:
WebDevCody
2025-12-31 23:33:51 -05:00
parent 6d4ab9cc13
commit abe272ef4d

View File

@@ -24,7 +24,7 @@ if (!bumpType || !['major', 'minor', 'patch'].includes(bumpType)) {
const uiPackageJsonPath = join(__dirname, '..', 'package.json'); const uiPackageJsonPath = join(__dirname, '..', 'package.json');
const serverPackageJsonPath = join(__dirname, '..', '..', 'server', 'package.json'); const serverPackageJsonPath = join(__dirname, '..', '..', 'server', 'package.json');
function bumpVersion(packageJsonPath: string, packageName: string): string { function bumpVersion(packageJsonPath, packageName) {
try { try {
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8')); const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
const oldVersion = packageJson.version; const oldVersion = packageJson.version;
@@ -90,4 +90,3 @@ try {
console.error(`Error bumping version: ${error.message}`); console.error(`Error bumping version: ${error.message}`);
process.exit(1); process.exit(1);
} }