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
46 lines
1.8 KiB
TypeScript
46 lines
1.8 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { parsePluginSourceReference } from "./plugin-source-reference.js";
|
|
|
|
describe("plugin source references", () => {
|
|
it.each([
|
|
["npm:review@1.2.0:nested", "npm:review@1.2.0", "nested"],
|
|
["npm:review@^1.2.0", "npm:review@^1.2.0", undefined],
|
|
["npm:@team/review@next:plugins/main", "npm:@team/review@next", "plugins/main"],
|
|
["github:owner/repository", "github:owner/repository", undefined],
|
|
[
|
|
"git:git@example.test:owner/repository.git",
|
|
"git:git@example.test:owner/repository.git",
|
|
undefined,
|
|
],
|
|
["git:file:///repo:plugins/main", "git:file:///repo", "plugins/main"],
|
|
["owner/repository", "owner/repository", undefined],
|
|
["owner/repository:plugins/review", "owner/repository", "plugins/review"],
|
|
[
|
|
"https://example.test:8443/owner/repository.git",
|
|
"https://example.test:8443/owner/repository.git",
|
|
undefined,
|
|
],
|
|
[
|
|
"https://example.test:8443/owner/repository.git:plugins/review",
|
|
"https://example.test:8443/owner/repository.git",
|
|
"plugins/review",
|
|
],
|
|
["git@example.test:owner/repository.git", "git@example.test:owner/repository.git", undefined],
|
|
[
|
|
"git@example.test:owner/repository.git:plugins/review",
|
|
"git@example.test:owner/repository.git",
|
|
"plugins/review",
|
|
],
|
|
["file:///D:/plugins/repository", "file:///D:/plugins/repository", undefined],
|
|
[
|
|
"file:///D:/plugins/repository:plugins/review",
|
|
"file:///D:/plugins/repository",
|
|
"plugins/review",
|
|
],
|
|
["D:\\plugins\\repository", "D:\\plugins\\repository", undefined],
|
|
["D:\\plugins\\repository:plugins/review", "D:\\plugins\\repository", "plugins/review"],
|
|
])("parses %s", (reference, source, pluginPath) => {
|
|
expect(parsePluginSourceReference(reference)).toEqual({ source, pluginPath });
|
|
});
|
|
});
|