Files
paseo/packages/cli/src/output/render.test.ts
T
Mohamed Boudra a5d2b7d863 Declare and enforce plugin Paseo version requirements (#4430)
* feat(plugins): enforce declared Paseo version requirements

Treat manifests without a Paseo requirement as pre-0.8 plugins so the first breaking plugin release offers an explicit migration path. Check the daemon and app independently before plugin execution, and preserve installed Git revisions when updates are incompatible.

* fix(nix): refresh dependency hash for plugin requirements

* refactor(plugins): validate test manifest inputs and name compatibility input
2026-09-07 17:20:19 +02:00

17 lines
583 B
TypeScript

import { expect, it } from "vitest";
import { renderError, toCommandError } from "./index.js";
it("preserves the message of an Error with an RPC code in JSON output", () => {
const error = Object.assign(new Error("Plugin requires Paseo >=0.8.0. Your daemon is 0.7.2."), {
code: "handler_error",
requestId: "request-1",
});
expect(JSON.parse(renderError(toCommandError(error), { format: "json" }))).toEqual({
error: {
code: "handler_error",
requestId: "request-1",
message: "Plugin requires Paseo >=0.8.0. Your daemon is 0.7.2.",
},
});
});