mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 09:42:53 +00:00
* feat(plugins): unify source installation and simplify plugin settings * feat(plugins): install npm sources and review CLI updates Treat install selectors as one-time choices. Keep source identity separate from the installed revision, and resolve ordinary updates from the current upstream default. npm only acquires directories; plugin loading remains independent of npm. * fix(plugins): preserve CLI diagnostics and exercise reviewed updates Move new source capability coverage to real browser journeys. Update the requirements regression to exercise preview and apply, and preserve the existing duplicate-selector diagnostic across positional option scopes. * test(plugins): remove unused pending helper * test(plugins): pack registry fixtures with the Windows command runner * test(plugins): assert failed client contribution setup * docs(plugins): consolidate guides and document npm publishing * docs(plugins): introduce publishing choices before npm instructions * test(plugins): own browser journey cleanup in a fixture * feat(plugins): prepare scaffolded packages for publishing
24 lines
1.0 KiB
TypeScript
24 lines
1.0 KiB
TypeScript
import { readFile } from "node:fs/promises";
|
|
import { fileURLToPath } from "node:url";
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
describe("plugin runtime-entry migration guide", () => {
|
|
it("maps every client registration method", async () => {
|
|
const contracts = await readFile(new URL("./client/contracts.ts", import.meta.url), "utf8");
|
|
const context = /export interface PluginClientContext[^{]*{([\s\S]*?)\n}/.exec(contracts)?.[1];
|
|
if (!context) throw new Error("PluginClientContext was not found");
|
|
const methods = [...context.matchAll(/^\s+(add[A-Z]\w*)\(/gm)].map((match) => match[1]);
|
|
const migration = await readFile(
|
|
fileURLToPath(new URL("../../../public-docs/plugins/migration.md", import.meta.url)),
|
|
"utf8",
|
|
);
|
|
const table = migration.slice(
|
|
migration.indexOf("| Old registration and location"),
|
|
migration.indexOf("## 4. Separate imports"),
|
|
);
|
|
|
|
expect(methods).not.toEqual([]);
|
|
for (const method of methods) expect(table).toContain(`client.${method}(`);
|
|
});
|
|
});
|