Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/core/src/plugin-type-closed-set.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ describe('Plugin.type closed set — runtime parity with the spec enum (#13925)'

it('a non-member is refused by PluginSchema with invalid_value at ["type"]', () => {
// `'plugin'` / `'module'` are PACKAGE manifest types (ManifestSchema.type),
// never plugin types; `'ui-plugin'` is the spelling a stale describe()
// string still uses; the casing variant guards against a lax comparator.
// never plugin types; `'ui-plugin'` is the LEGACY spelling of today's
// `'ui'` — once live, so callers outside this repo may still send it, and
// the closed set must keep REFUSING it rather than grow a tolerant alias
// (Prime Directive #12); the casing variant guards against a lax comparator.
for (const type of ['bogus', 'ui-plugin', 'plugin', 'module', 'Standard']) {
const result = PluginSchema.safeParse({ type });
expect(result.success, `PluginSchema accepted non-member '${type}'`).toBe(false);
Expand Down
6 changes: 4 additions & 2 deletions packages/rest/src/plugin-type-closed-set.pin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ describe('Plugin.type closed set — published-surface pins (#13925)', () => {
const declared: PluginMetadata = {
name: 'closed-set-pin-metadata',
version: '1.0.0',
// @ts-expect-error — `'ui-plugin'` (a stale describe() spelling) is
// not a `PluginType` (#13925).
// @ts-expect-error — `'ui-plugin'` is the LEGACY spelling of today's
// `'ui'` — once live, so callers outside this repo may still send it,
// and the published union must keep REFUSING it rather than grow a
// tolerant alias (Prime Directive #12). Not a `PluginType` (#13925).
type: 'ui-plugin',
async init() {},
};
Expand Down
Loading