chore: drop non-code junk (pi-mono-reference, runtime state, root duplicates)
Remove files that should never have been tracked: - pi-mono-reference/: 688-file copy of an upstream monorepo, zero imports, used only as offline human reference - build/electron-builder.runtime.json: environment-specific build artifact with hardcoded local paths - state/cancel-signal-state.json: runtime state written by the app - prompt.txt, logo.svg (root): exact duplicates of the canonical copies under .planning/archive/ and assets/ Add state/ to .gitignore so future runtime state stays out.
This commit is contained in:
1 parent
34ca5b77f1
commit
1f7230fe87
691 files changed
+3
-190434
No files matched your search
@@ -1,96 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Syncs ALL @mariozechner/* package dependency versions to match their current versions.
|
||||
* This ensures lockstep versioning across the monorepo.
|
||||
*/
|
||||
|
||||
import { readFileSync, writeFileSync, readdirSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
const packagesDir = join(process.cwd(), 'packages');
|
||||
const packageDirs = readdirSync(packagesDir, { withFileTypes: true })
|
||||
.filter(dirent => dirent.isDirectory())
|
||||
.map(dirent => dirent.name);
|
||||
|
||||
// Read all package.json files and build version map
|
||||
const packages = {};
|
||||
const versionMap = {};
|
||||
|
||||
for (const dir of packageDirs) {
|
||||
const pkgPath = join(packagesDir, dir, 'package.json');
|
||||
try {
|
||||
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
||||
packages[dir] = { path: pkgPath, data: pkg };
|
||||
versionMap[pkg.name] = pkg.version;
|
||||
} catch (e) {
|
||||
console.error(`Failed to read ${pkgPath}:`, e.message);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Current versions:');
|
||||
for (const [name, version] of Object.entries(versionMap).sort()) {
|
||||
console.log(` ${name}: ${version}`);
|
||||
}
|
||||
|
||||
// Verify all versions are the same (lockstep)
|
||||
const versions = new Set(Object.values(versionMap));
|
||||
if (versions.size > 1) {
|
||||
console.error('\n❌ ERROR: Not all packages have the same version!');
|
||||
console.error('Expected lockstep versioning. Run one of:');
|
||||
console.error(' npm run version:patch');
|
||||
console.error(' npm run version:minor');
|
||||
console.error(' npm run version:major');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
console.log('\n✅ All packages at same version (lockstep)');
|
||||
|
||||
// Update all inter-package dependencies
|
||||
let totalUpdates = 0;
|
||||
for (const [dir, pkg] of Object.entries(packages)) {
|
||||
let updated = false;
|
||||
|
||||
// Check dependencies
|
||||
if (pkg.data.dependencies) {
|
||||
for (const [depName, currentVersion] of Object.entries(pkg.data.dependencies)) {
|
||||
if (versionMap[depName]) {
|
||||
const newVersion = `^${versionMap[depName]}`;
|
||||
if (currentVersion !== newVersion) {
|
||||
console.log(`\n${pkg.data.name}:`);
|
||||
console.log(` ${depName}: ${currentVersion} → ${newVersion}`);
|
||||
pkg.data.dependencies[depName] = newVersion;
|
||||
updated = true;
|
||||
totalUpdates++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check devDependencies
|
||||
if (pkg.data.devDependencies) {
|
||||
for (const [depName, currentVersion] of Object.entries(pkg.data.devDependencies)) {
|
||||
if (versionMap[depName]) {
|
||||
const newVersion = `^${versionMap[depName]}`;
|
||||
if (currentVersion !== newVersion) {
|
||||
console.log(`\n${pkg.data.name}:`);
|
||||
console.log(` ${depName}: ${currentVersion} → ${newVersion} (devDependencies)`);
|
||||
pkg.data.devDependencies[depName] = newVersion;
|
||||
updated = true;
|
||||
totalUpdates++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Write if updated
|
||||
if (updated) {
|
||||
writeFileSync(pkg.path, JSON.stringify(pkg.data, null, '\t') + '\n');
|
||||
}
|
||||
}
|
||||
|
||||
if (totalUpdates === 0) {
|
||||
console.log('\nAll inter-package dependencies already in sync.');
|
||||
} else {
|
||||
console.log(`\n✅ Updated ${totalUpdates} dependency version(s)`);
|
||||
}
|
||||
Reference in new issue
Block a user