chore: add code formatting config and pre-commit hooks (#450)

This commit is contained in:
manjaroblack
2025-08-16 19:08:39 -05:00
committed by GitHub
parent 51284d6ecf
commit ed539432fb
130 changed files with 11886 additions and 10939 deletions

View File

@@ -1,28 +1,26 @@
#!/usr/bin/env node
/**
* Sync installer package.json version with main package.json
* Used by semantic-release to keep versions in sync
*/
const fs = require('fs');
const path = require('path');
const fs = require('node:fs');
const path = require('node:path');
function syncInstallerVersion() {
// Read main package.json
const mainPackagePath = path.join(__dirname, '..', 'package.json');
const mainPackage = JSON.parse(fs.readFileSync(mainPackagePath, 'utf8'));
// Read installer package.json
const installerPackagePath = path.join(__dirname, 'installer', 'package.json');
const installerPackage = JSON.parse(fs.readFileSync(installerPackagePath, 'utf8'));
// Update installer version to match main version
installerPackage.version = mainPackage.version;
// Write back installer package.json
fs.writeFileSync(installerPackagePath, JSON.stringify(installerPackage, null, 2) + '\n');
console.log(`Synced installer version to ${mainPackage.version}`);
}
@@ -31,4 +29,4 @@ if (require.main === module) {
syncInstallerVersion();
}
module.exports = { syncInstallerVersion };
module.exports = { syncInstallerVersion };