Skip to content

plasmic-mcp-registry: withPlasmicRegistry package auto-detection returns empty (6 failing tests) #396

Description

@field123

withPlasmicRegistry's package auto-detection returns an empty list, so no Plasmic packages are detected and the webpack externals rule never fires. Six tests in packages/plasmic-mcp-registry/src/__tests__/next.test.ts fail.

Reproduce

yarn --cwd packages/plasmic-mcp-registry test
FAIL  next.test.ts > auto-detects @plasmicpkgs/* packages from dependencies
  AssertionError: expected [] to include '@plasmicpkgs/commerce'
FAIL  next.test.ts > auto-detects @elasticpath/plasmic-* packages
  AssertionError: expected [] to include '@elasticpath/plasmic-mcp-registry'
FAIL  next.test.ts > auto-detects @plasmicapp/host
  AssertionError: expected [] to include '@plasmicapp/host'
FAIL  next.test.ts > detects packages from devDependencies
  AssertionError: expected [] to include '@plasmicpkgs/graphql'
FAIL  next.test.ts > handles empty config input
  AssertionError: expected 0 to be greater than 0
FAIL  next.test.ts > webpack externals externalizes Plasmic packages on server
  AssertionError: expected "spy" to be called with arguments: [ null, …(1) ]

Test Files  1 failed | 5 passed (6)
Tests       6 failed | 77 passed (83)

Not a regression

Reproduced at d3b343f72 — the commit immediately before PR #393 merged — with the identical 6 failures. Pre-existing, and unrelated to the security batch.

Why it matters

The failures are consistent with the detection returning [] rather than with stale assertions, so the feature itself looks broken rather than the tests being wrong. Worth confirming which before fixing: if detection genuinely never matches, consumers relying on automatic externalization are silently getting none.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions