fix: patched bash interceptor, LSP shutdown, and concurrent command tracking
- Fixed bash interceptor to check both raw and cwd-normalized commands, catching commands hidden behind leading `cd ... &&` wrappers. - Fixed LSP client shutdown to await graceful shutdown with a 5s timeout before killing the process, and parallelized `shutdownAll` via `Promise.allSettled`. - Fixed concurrent bash command tracking by replacing a single abort controller with a Set, preventing premature cancellation of parallel commands. - Removed `./hooks` and `./hooks/*` export entries from the coding-agent package exports map. - Updated pinned Rust nightly toolchain from `nightly-2026-03-27` to `nightly-2026-04-29` in `rust-toolchain.toml` and CI workflow. - Replaced custom already-published detection in `ci-release-publish.ts` with `bun publish --tolerate-republish` flag.
This commit is contained in:
@@ -22,15 +22,7 @@ const packageDirs: PublishPackage[] = [
|
||||
{ dir: "packages/agent" },
|
||||
{ dir: "packages/coding-agent" },
|
||||
];
|
||||
const alreadyPublishedPatterns = [
|
||||
"previously published",
|
||||
"cannot publish over",
|
||||
"You cannot publish over",
|
||||
];
|
||||
|
||||
function isAlreadyPublished(output: string): boolean {
|
||||
return alreadyPublishedPatterns.some((pattern) => output.includes(pattern));
|
||||
}
|
||||
|
||||
async function readPackageJson(packageDir: string): Promise<PackageJson> {
|
||||
return (await Bun.file(path.join(repoRoot, packageDir, "package.json")).json()) as PackageJson;
|
||||
@@ -45,22 +37,19 @@ async function publishPackage(pkg: PublishPackage): Promise<void> {
|
||||
}
|
||||
|
||||
if (isDryRun) {
|
||||
console.log(`DRY RUN bun publish --access public (${pkg.dir})`);
|
||||
console.log(`DRY RUN bun publish --access public --tolerate-republish (${pkg.dir})`);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Publishing ${packageName}...`);
|
||||
const result = await $`bun publish --access public`.cwd(path.join(repoRoot, pkg.dir)).quiet().nothrow();
|
||||
const result = await $`bun publish --access public --tolerate-republish`.cwd(path.join(repoRoot, pkg.dir)).quiet().nothrow();
|
||||
const output = `${result.stdout.toString()}${result.stderr.toString()}`.trim();
|
||||
if (result.exitCode === 0) {
|
||||
if (output) console.log(output);
|
||||
return;
|
||||
}
|
||||
if (output) console.log(output);
|
||||
if (isAlreadyPublished(output)) {
|
||||
console.log("Already published, skipping");
|
||||
return;
|
||||
}
|
||||
|
||||
process.exit(result.exitCode ?? 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ for (const [name, version] of Object.entries(versionMap).sort()) {
|
||||
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");
|
||||
console.error("Expected lockstep versioning. Run the release script with the next version:");
|
||||
console.error(" bun scripts/release.ts <version>");
|
||||
console.error("Or update all package versions consistently before running this script.");
|
||||
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user