docs(plugins): consolidate guides and document npm publishing

This commit is contained in:
Mohamed Boudra
2026-09-17 09:17:39 +02:00
parent 8c4b7e5f79
commit 7e4f9ecf36
31 changed files with 561 additions and 1680 deletions
@@ -1015,7 +1015,7 @@ export default function contribute(plugin: unknown) {
"Plugin entry points are missing",
);
await expect(service.installDirectory({ path: legacy })).rejects.toThrow(
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/v0.8/migration",
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/migration",
);
await expect(service.installDirectory({ path: startupFailure })).rejects.toThrow(
"startup exploded",
@@ -1025,7 +1025,7 @@ export default function contribute(plugin: unknown) {
id: "legacy-plugin",
status: "failed",
error:
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/v0.8/migration",
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/migration",
}),
expect.objectContaining({
id: "missing-entry",
@@ -80,7 +80,7 @@ it("marks pre-0.8 plugins failed on startup and recovers after migration and rel
expect(await service.listPlugins()).toEqual([
expect.objectContaining({
status: "failed",
error: expect.stringContaining("https://paseo.sh/docs/plugins/v0.8/migration"),
error: expect.stringContaining("https://paseo.sh/docs/plugins/migration"),
}),
]);
await writePlugin(root, ">=0.8.0");
@@ -97,7 +97,7 @@ it("still requires entry migration when an old plugin adds a compatible requirem
await writeFile(path.join(root, "index.ts"), "export default () => () => {};");
const { service } = await host();
await expect(service.installDirectory({ path: root })).rejects.toThrow(
"https://paseo.sh/docs/plugins/v0.8/migration",
"https://paseo.sh/docs/plugins/migration",
);
});
@@ -1422,7 +1422,7 @@ export default function contribute(server: { registerProvider(provider: Provider
const runtime = createTestRuntime();
await expect(runtime.startPlugin("legacy", directory)).rejects.toThrow(
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/v0.8/migration",
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/migration",
);
});
@@ -276,7 +276,7 @@ async function resolveEntryPaths(directory: string): Promise<{
const legacyEntry = await findEntry(directory, ["index.ts", "index.tsx"]);
if (legacyEntry) {
throw new Error(
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/v0.8/migration",
"This plugin was made for an older version of Paseo and cannot run on Paseo v0.8. Ask its author to update it. Plugin authors can follow the migration guide: https://paseo.sh/docs/plugins/migration",
);
}
throw new Error(