diff --git a/config/scripts/ci/sharding/ci-shard-timings.json b/config/scripts/ci/sharding/ci-shard-timings.json index 2892db33f7b..d6dc8e43bfd 100644 --- a/config/scripts/ci/sharding/ci-shard-timings.json +++ b/config/scripts/ci/sharding/ci-shard-timings.json @@ -6603,7 +6603,6 @@ "src/shared/plugins/contributions/plugin-command-replaces.test.ts": 230, "src/shared/plugins/contributions/plugin-content-pack-contributions.test.ts": 227, "src/shared/plugins/contributions/plugin-custom-editor-contribution.test.ts": 238, - "src/shared/plugins/contributions/plugin-execution-profile.test.ts": 164, "src/shared/plugins/contributions/plugin-panel-contribution.test.ts": 240, "src/shared/plugins/contributions/plugin-status-bar-item-contribution.test.ts": 232, "src/shared/plugins/declarative/plugin-declarative-catalog-rich.test.ts": 147, diff --git a/src/shared/plugins/contributions/plugin-execution-profile.test.ts b/src/shared/plugins/contributions/plugin-execution-profile.test.ts deleted file mode 100644 index 8a0ea19fc27..00000000000 --- a/src/shared/plugins/contributions/plugin-execution-profile.test.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { PLUGIN_MANIFEST_V2_SINCE } from '../manifest/plugin-schema-field-docs' -import { parsePluginManifest } from '../manifest/plugin-manifest' - -function manifestInput(): Record { - return { - manifestVersion: 2, - execution: 'data', - id: 'demo', - publisher: 'samples', - name: 'Demo', - version: '1.2.0', - engines: { orca: `>=${PLUGIN_MANIFEST_V2_SINCE}` } - } -} - -describe('execution profiles', () => { - it('rejects v2 contributions beyond the declared profile', () => { - const parsed = parsePluginManifest({ - ...manifestInput(), - execution: 'data', - contributes: { commands: [{ id: 'open', title: 'Open', action: 'view.tasks' }] } - }) - expect(parsed).toMatchObject({ ok: false, error: expect.stringContaining('execution') }) - }) -}) diff --git a/src/shared/plugins/manifest/plugin-manifest.test.ts b/src/shared/plugins/manifest/plugin-manifest.test.ts index 31ca4c139ca..ed6e13b73c9 100644 --- a/src/shared/plugins/manifest/plugin-manifest.test.ts +++ b/src/shared/plugins/manifest/plugin-manifest.test.ts @@ -1,6 +1,5 @@ import { describe, expect, it } from 'vitest' -import { PLUGIN_MANIFEST_V2_SINCE } from './plugin-schema-field-docs' -import { PLUGIN_COMMAND_LIMIT, parsePluginManifest, pluginManifestSchema } from './plugin-manifest' +import { parsePluginManifest } from './plugin-manifest' function manifest(overrides: Record = {}): Record { return { @@ -54,56 +53,4 @@ describe('pluginManifestSchema boundaries', () => { } }) }) - - it('refuses format 1 names in format 2', () => { - const result = parsePluginManifest({ - ...manifest({ capabilities: [{ kind: 'storage' }] }), - manifestVersion: 2, - execution: 'data', - engines: { orca: `>=${PLUGIN_MANIFEST_V2_SINCE}` } - }) - - expect(result.ok).toBe(false) - }) - - it('rejects duplicate contribution ids', () => { - const parsed = pluginManifestSchema.safeParse( - manifest({ - main: 'main.mjs', - contributes: { - panels: [ - { id: 'dashboard', title: 'One', entry: 'one.html' }, - { id: 'dashboard', title: 'Two', entry: 'two.html' } - ], - commands: [ - { id: 'run', title: 'One' }, - { id: 'run', title: 'Two' } - ], - events: [] - } - }) - ) - - expect(parsed.success).toBe(false) - if (!parsed.success) { - expect(parsed.error.issues.map((issue) => issue.message)).toEqual( - expect.arrayContaining(['duplicate panels id: dashboard', 'duplicate commands id: run']) - ) - } - }) - - it('caps contribution arrays before they reach renderer or worker registries', () => { - const commands = Array.from({ length: PLUGIN_COMMAND_LIMIT + 1 }, (_, index) => ({ - id: `command-${index}`, - title: `Command ${index}` - })) - expect( - parsePluginManifest( - manifest({ - main: 'main.mjs', - contributes: { panels: [], commands, events: [] } - }) - ).ok - ).toBe(false) - }) })