Fix API plugin-manager Vitest failure loading plugin host UI deps #278

Closed
opened 2026-06-04 21:21:57 +00:00 by steve · 0 comments
Owner

Problem

pnpm test fails in @lapis-notes/api because plugin-manager.test.ts loads
workspace/src/lib/deps and generated plugin-host provider values. That pulls
bits-uivaul-svelte .svelte files into Vitest without Vite transform,
raising Unknown file extension ".svelte".

Forgejo checks.yml also skips pnpm test and runs smoke only after
check:all.

Goal

Restore green pnpm test and align CI/docker CI check with unit tests before
smoke.

Acceptance Criteria

  • pnpm --filter @lapis-notes/api test passes (plugin-manager suite included)
  • Repo-root pnpm test passes
  • .forgejo/workflows/checks.yml runs pnpm test after spec lint and before smoke
  • pnpm docker:ci-check script mirrors the same step
  • spec/src/80-maintenance/monorepo-scripts.md documents CI unit-test step

Implementation Notes

Add vaul-svelte to API Vitest ssr.noExternal so transitive UI deps compile.
Add pnpm test to checks workflow and buildCiScript.

Validation Commands

  • pnpm --filter @lapis-notes/api test
  • pnpm test
  • pnpm test:scripts
  • pnpm check:all
  • make spec-lint

Implementation Summary

Added vaul-svelte to API Vitest ssr.noExternal so plugin-manager tests can load workspace deps and plugin-host UI providers without Node .svelte errors. Added pnpm test to checks.yml and docker:ci-check after spec lint and before smoke; updated monorepo-scripts.md and run-lapis-ci-check.test.mjs. Validated: pnpm test, pnpm test:scripts, pnpm check:all, make spec-lint.

## Problem `pnpm test` fails in `@lapis-notes/api` because `plugin-manager.test.ts` loads `workspace/src/lib/deps` and generated plugin-host provider values. That pulls `bits-ui` → `vaul-svelte` `.svelte` files into Vitest without Vite transform, raising `Unknown file extension ".svelte"`. Forgejo `checks.yml` also skips `pnpm test` and runs smoke only after `check:all`. ## Goal Restore green `pnpm test` and align CI/docker CI check with unit tests before smoke. ## Acceptance Criteria - [ ] `pnpm --filter @lapis-notes/api test` passes (plugin-manager suite included) - [ ] Repo-root `pnpm test` passes - [ ] `.forgejo/workflows/checks.yml` runs `pnpm test` after spec lint and before smoke - [ ] `pnpm docker:ci-check` script mirrors the same step - [ ] `spec/src/80-maintenance/monorepo-scripts.md` documents CI unit-test step ## Implementation Notes Add `vaul-svelte` to API Vitest `ssr.noExternal` so transitive UI deps compile. Add `pnpm test` to checks workflow and `buildCiScript`. ## Validation Commands - `pnpm --filter @lapis-notes/api test` - `pnpm test` - `pnpm test:scripts` - `pnpm check:all` - `make spec-lint` ## Implementation Summary Added vaul-svelte to API Vitest ssr.noExternal so plugin-manager tests can load workspace deps and plugin-host UI providers without Node .svelte errors. Added pnpm test to checks.yml and docker:ci-check after spec lint and before smoke; updated monorepo-scripts.md and run-lapis-ci-check.test.mjs. Validated: pnpm test, pnpm test:scripts, pnpm check:all, make spec-lint. <!-- backlog:task_id=TASK-fix-api-plugin-manager-vitest-ui-deps source_spec=spec/src/80-maintenance/monorepo-scripts.md -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lapis-notes/lapis#278
No description provided.