convex
Version:
Client for the Convex Cloud
25 lines (24 loc) • 845 B
JavaScript
;
import { Command } from "commander";
import { loadPackageJson } from "./lib/utils.js";
import chalk from "chalk";
import { oneoffContext } from "./lib/context.js";
export const update = new Command("update").description("Print instructions to update the convex package").action(async () => {
const ctx = oneoffContext;
let updateInstructions = "npm install convex@latest\n";
const oldPackages = (await loadPackageJson(ctx)).filter(
(elt) => elt.name.startsWith("@convex-dev")
);
for (const pkg of oldPackages) {
updateInstructions += `npm uninstall ${pkg.name}
`;
}
console.log(
chalk.green(
`To view the Convex changelog, go to https://blog.convex.dev/tag/releases/
When you are ready to upgrade, run the following commands:
${updateInstructions}`
)
);
});
//# sourceMappingURL=update.js.map