Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion .simple-release.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
import { readFileSync, writeFileSync } from "node:fs";
import { NpmProject } from "@simple-release/npm";

export const project = new NpmProject();
class ArchgateProject extends NpmProject {
async bump(options) {
const result = await super.bump(options);

if (result) {
const pkgPath = "package.json";
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
const version = pkg.version;
let changed = false;

for (const dep of Object.keys(pkg.optionalDependencies || {})) {
if (pkg.optionalDependencies[dep] !== version) {
pkg.optionalDependencies[dep] = version;
changed = true;
}
}

if (changed) {
writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
}
}

return result;
}
}

export const project = new ArchgateProject();
12 changes: 9 additions & 3 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@
"typescript": "^5"
},
"optionalDependencies": {
"archgate-darwin-arm64": ">=0.1.1",
"archgate-linux-x64": ">=0.1.1",
"archgate-win32-x64": ">=0.1.1"
"archgate-darwin-arm64": "0.11.0",
"archgate-linux-x64": "0.11.0",
"archgate-win32-x64": "0.11.0"
}
}
Loading