Dependency policy
Runtime dependencies require strong justification. Each one adds bundle size, security exposure, compatibility constraints, and ongoing maintenance.
Before adding a runtime dependency, document the capability it supplies, why a small local implementation or platform API is insufficient, its tree-shaking and bundle impact, license, maintenance health, security posture, and SSR/browser requirements. Prefer a peer dependency when the consumer must own a singleton runtime, as with Vue.
Third-party ranges in published packages (#348)
Runtime dependencies of a publishable package declare third-party packages with caret ranges (^1.8.0), not exact versions. An exact pin in a library installs a second copy whenever the consumer's own range resolves to a different patch, and it stops consumers from taking a security fix until we publish again. The floor of each range is the version we build and test with; pnpm-lock.yaml still pins exactly what CI installs, and Renovate moves both together. devDependencies are not published and stay exact.
Integration contracts the consumer installs themselves are peers. A peer that only some consumers need is marked optional in peerDependenciesMeta, so npm and pnpm check its range without installing it. @ghostvue/vue declares unplugin-vue-components (^32.0.0, the supported resolver major) this way for @ghostvue/vue/resolver; the resolver still never imports the plugin.
tests/integration/third-party-ranges.test.ts enforces this for @ghostvue/vue and @ghostvue/mcp. @ghostvue/nuxt still pins @nuxt/kit and @nuxt/schema exactly; relaxing those is a separate change.
Icons are not a dependency. Components take icon content from consumers, and packages do not add an icon library or icon adapter package; see ADR 0013.
Development tooling may be broader but remains intentional. Avoid overlapping tools that enforce the same rule in different ways. Pin exact development versions through the lockfile and update them in reviewed changes. Dependabot opens those update pull requests; see CI and dependency updates.
pnpm blocks dependency install scripts unless they are explicitly allowlisted in pnpm-workspace.yaml. esbuild is allowlisted because Vite/VitePress require its platform binary; additions to that list require the same security review as a new runtime dependency.
@ghostvue/eslint-plugin (GHO-22)
The ESLint plugin adds no runtime dependency and no new package to the lockfile. Template traversal and AST types come from vue-eslint-parser, the parser eslint-plugin-vue already installs for this repository and for consumers; the plugin does not import it at runtime and only calls the parser services it provides. Both eslint (^9 || ^10) and vue-eslint-parser (^10) are peer dependencies because the consumer's ESLint config owns those singletons. The package pins the same versions as development dependencies (eslint 10.15.0 and vue-eslint-parser 10.4.1, both MIT and already resolved through eslint-plugin-vue) for types and rule tests. The list of native HTML and SVG attribute names is kept locally instead of adding an attribute-list package, since only set membership is needed.
Internal @ghostvue/* ranges (#345)
A publishable package that needs a sibling @ghostvue/* package at runtime declares it as a peer dependency with workspace:^ (plus a workspace:* development dependency so the workspace build links it). @ghostvue/themes peers on @ghostvue/vue, and @ghostvue/nuxt peers on both. Peers keep a single copy of @ghostvue/vue in the consumer's app, so themed wrappers and headless parts share state. workspace:^ packs to a caret range (^0.1.0), not the exact version that workspace:* produces, so a patch difference neither nests a second copy nor fails npm with ERESOLVE. The five publishable packages version in lockstep (the Changesets fixed group in .changeset/config.json), so a caret range on a 0.x version admits only same-minor siblings. internalRangeProblems() in scripts/lib/release-dry-run.js rejects any other specifier in dependencies, peerDependencies, or optionalDependencies; the release dry run and tests/integration/release-pipeline.test.ts both run it.
Run pnpm boundaries after changing package manifests. Do not bypass pnpm's strict peer dependency checks merely to accept an invalid graph.
Integration dependencies (GHO-59)
Reviewed November 2026 for @ghostvue/nuxt and GhostVueResolver(). All are MIT-licensed and build-time only: none ships in a browser bundle.
| Package | Version | Where | Why |
|---|---|---|---|
@nuxt/kit | 4.6.4 | @ghostvue/nuxt dependency | Official module API (defineNuxtModule, addComponent, addImports). No local substitute: Nuxt module hooks are only reachable through it. |
@nuxt/schema | 4.6.4 | @ghostvue/nuxt dependency | Types for the published NuxtModule signature and the ghostvue config-key augmentation. @nuxt/kit only declares it as an optional peer. |
nuxt | ^4.6.0 peer; 4.6.4 dev | @ghostvue/nuxt peer and dev, apps/nuxt-fixture dev | The consumer owns its Nuxt runtime. 4.6.4 is the tested version; the peer floor matches the module's compatibility. |
vite | 8.3.5 | @ghostvue/nuxt dev, apps/nuxt-fixture | Nuxt 4.6.4's @nuxt/vite-server peers on vite ^8.3.5; the root stays on 8.2.6 so this does not move the library build toolchain. |
unplugin-vue-components | ^32.0.0 peer; 32.1.0 | @ghostvue/vue optional peer, root dev dependency | Root dev copy proves GhostVueResolver() in the real plugin. The optional peer (#348) sets the supported major. |
@ghostvue/vueis a peer of@ghostvue/nuxt(one Vue runtime and one copy of the components, owned by the app).@ghostvue/themesis an optional peer needed only for the themed/CSS opt-in.- No install scripts were allowlisted;
allowBuildsis unchanged. - Nuxt pulls a large development graph (Nitro, Vite, Rolldown). It is confined to
packages/nuxtandapps/nuxt-fixture(whose dependencies are all development dependencies). - Residual:
pnpm audit --prodreports picomatch 4.0.7 (GHSA-fc5q-39xc-vjpf, high, ReDoS on repeated extglobs) through@ghostvue/nuxt > @nuxt/kit > tinyglobby. The advisory names 4.0.8 as patched, but no 4.0.8 is published to npm, so there is nothing to bump or refresh to. The same 4.0.7 is already in the development graph onmaster. Exposure is build-time only: the globs come from the Nuxt app's own configuration, not from end users. Follow-up: refresh the lockfile once a patched picomatch is published.
Security audit triage
Triage pnpm audit findings by real exposure, not raw counts: the report counts dependency paths, so one advisory can appear many times. Fix in this order:
- Bump the owning direct dependency to a patched exact version.
- Refresh a transitive dependency inside its parent's declared range (
pnpm -r update <pkg> --depth Infinity --lockfile-only, thenpnpm dedupe --lockfile-only), which changes only the lockfile. Without--depth Infinity, pnpm 11 leaves transitive copies alone. The weekly security lockfile refresh does this for every flagged package and opens a pull request. - Add an
overridesentry inpnpm-workspace.yamlonly when no patched parent exists, and record the override and its removal condition in this section.
Never suppress audit checks. Record each residual advisory below with its scope and follow-up. The overrides in use are listed under security overrides.
November 2026 audit (GHO-173)
Before: 52 findings (1 critical, 16 high, 30 moderate, 5 low); --prod: 2 high through apps/playground > vue. After: 11 findings (1 high, 9 moderate, 1 low); --prod: none.
| Advisory | Was | Action |
|---|---|---|
| shell-quote GHSA-pqg4-j6r4-53mv (critical) | 1.10.0 via @changesets/cli | @changesets/cli 3.0.3; lockfile refresh to launch-editor 2.14.2, shell-quote 1.12.0 |
| launch-editor GHSA-587h/698v/r825 | 2.14.1 via @changesets/cli | Lockfile refresh to 2.14.2 |
| @vue/server-renderer GHSA-g2v6-rqmx-r4w6 (high, prod path) | 3.5.41 via vue | vue 3.5.45 (root, playground, @ghostvue/vue and @ghostvue/themes dev pins) |
| source-map-js GHSA-68fv-2mgg-jv7q (high) | 1.2.1 via Vue compilers, PostCSS | vue 3.5.45 requires ^1.2.2; lockfile resolves 1.2.2 for every path |
| vite 8 GHSA-587h/698v/r825/rq7h/vfpm/9jrq | 8.2.1 (root, vitest) | vite 8.2.6 |
| vitest / @vitest/mocker GHSA-82fw, GHSA-qxg6 | 4.1.10 | vitest, @vitest/coverage-v8 4.1.12 |
| undici (19 advisories, 7 high) | 8.10.0 via jsdom | Lockfile refresh to 8.12.4 (inside jsdom's ^8.9.0) |
| brace-expansion GHSA-qhr7/6j4f/q2hr | 2.1.4, 5.0.9 via eslint, test-utils | Lockfile refresh to 2.1.8 and 5.0.13 |
| postcss-selector-parser GHSA-rj75-hqrm-r3gf | 7.1.5 via eslint-plugin-vue | Lockfile refresh to 7.2.1 |
| minimatch GHSA-g3hv-75wg-m249 (eslint path) | 10.2.6 via eslint | eslint 10.15.0 (uses minimatch ^11.0.5) |
Residual advisories, all development-only and absent from pnpm audit --prod:
- vite 5.4.21 and esbuild 0.21.5 through
vitepress1.6.4 (8 Vite advisories: 1 high, 6 moderate, 1 low, plus the esbuild finding below). VitePress 1.6.4 is the latest stable release and pins Vite 5; the patched Vite 6.4.4 is a major the 1.x line does not support, so an override would ship an untested graph. Most advisories target the Vite dev server (fs.allow/fs.denybypass, cross-origin requests) or Windows-only launch-editor paths;docs:builddoes not start a server. Runpnpm docs:devonly on loopback. Follow-up: move to VitePress 2 once it is stable. - esbuild 0.21.5 in
@ghostvue/themes(moderate, GHSA-67mh-4wv8-2f99). The advisory affects esbuild'sserveAPI;scripts/bundle-define.mjsonly callsesbuild.build. The same version is still required by VitePress 1.6.4, so a bump would not clear the finding. Follow-up: bump with the VitePress upgrade. - minimatch 9.0.9 and glob 10.5.0 through
@vue/test-utils>js-beautify1.x (moderate). Test-only HTML formatting with no user-controlled patterns; glob's advisory is a timeout-cancellation bypass. Rechecked in the minimatch recheck below.
minimatch recheck (#483, 2026-11-29)
Dependabot alert 12 (GHSA-g3hv-75wg-m249, moderate) affects minimatch >=7.0.0 <11.0.1. Neither the 9.x nor the 10.x line has a patched release, so every remaining path needs its parent to move to minimatch 11. Exploitation needs attacker-controlled glob patterns; every remaining path is development-only and absent from pnpm audit --prod.
- Lint, fixed.
typescript-eslint8.67.0 → 8.74.0 (published 2026-11-23; peerseslint ^10,typescript <6.1). Its@typescript-eslint/typescript-estreerequests minimatch^11.0.1and the lockfile resolves 11.0.8. - Test formatting, open.
@vue/test-utils2.4.11 >js-beautify1.15.4 resolves minimatch 9.0.9 througheditorconfig1.0.7 andglob10.5.0. The latest@vue/test-utils(2.6.0) moves tojs-beautify ^2.0.0, whose latest release (2.0.3) still requestseditorconfig ^3.0.2(minimatch~10.2.4) andglob ^13.0.6(minimatch^10.2.2), so upgrading test-utils alone moves the finding to 10.x. Usage: Vue Test Utils formats wrapper HTML for test output; patterns come from the package, not test input. Upgrade condition: a js-beautify release inside test-utils' range that depends oneditorconfig4+ (minimatch~11.0.5) andglob14+ (minimatch^11.0.5). - Nuxt build tooling, open.
nuxt4.6.4 >@nuxt/nitro-server>nitropack2.13.6 >archiver8.0.0 >readdir-glob3.0.0 resolves minimatch 10.2.6. The patchedreaddir-glob4.0.0 (minimatch^11.0.1) is outside archiver's^3.0.0range, archiver 8.0.0 is the latest release, and the latestnuxt(4.7.0) andnitropack(2.14.0) still requestarchiver ^8.0.0. Usage: nitropack imports archiver only in its Azure preset to zip build output; the Nuxt fixture uses the default preset, so the code path does not run. Upgrade condition: an archiver release acceptingreaddir-glob4 inside nitropack's range, then a lockfile refresh.
Keep alert 12 open until both open paths resolve minimatch 11.0.1+.
December 2026 refresh
Dependabot security updates failed for every transitive advisory because of the pnpm 11 behavior above. A lockfile refresh cleared cross-spawn GHSA-ghv9-86vm-4v8m (critical, 7.0.6 to 7.1.2), terser GHSA-6jpm-p5cq-9q44 (5.51.2 to 5.51.4), and node-forge GHSA-w73w-hhm4-q25p (1.4.3 to 1.4.4). New residuals, development-only unless noted:
- tar GHSA-25mm-r35j-6hgm (high) through
nuxt>nitropack>@vercel/nft>@mapbox/node-pre-gyp2.0.3 (tar ^7.4.0). The fix is tar 8.0.0 and node-pre-gyp 2.0.3 is the latest release. GitHub scores it as runtime because nitropack is a dependency ofnuxt, but GhostVue only uses it to build the Nuxt fixture. Upgrade condition: a node-pre-gyp release accepting tar 8 inside@vercel/nft's range, then a lockfile refresh. - glob GHSA-qxr8-q827-836c and minimatch GHSA-c859-jr93-m5j4 (moderate) through
@vue/test-utils>js-beautify2.0.3 and thearchiverpath in the minimatch recheck above. Same upgrade conditions as that recheck, with glob 14.0.6+ and minimatch 11.0.8+.
These tar, glob, and minimatch residuals are now cleared by the security overrides below.
Security overrides
A lockfile refresh on 2026-12-04 cleared none of the 31 open Dependabot alerts: each patched release is a new major that the latest parent does not accept. The overrides in pnpm-workspace.yaml move the transitive copies that are safe to move; each targets one parent so no other path changes. Remove an entry once its condition is met, then refresh the lockfile.
| Override | Clears | Why it is safe | Remove when |
|---|---|---|---|
@mapbox/node-pre-gyp>tar: ^8.0.2 | tar 7.5.24, 19 alerts (18 high) | @vercel/nft loads node-pre-gyp only to locate native binaries; tar is used by its install and package commands, which nitropack never runs. tar 8 keeps the CommonJS extract and create exports. The Nuxt fixture builds unchanged. | node-pre-gyp accepts tar 8 inside @vercel/nft's range. |
js-beautify>glob: ^14.0.6 | glob 13.0.7, 1 alert | js-beautify uses glob only in its CLI; @vue/test-utils calls the html formatter. | js-beautify depends on glob 14.0.6+ inside @vue/test-utils' range. |
editorconfig>minimatch: ^11.0.8 | minimatch 10.2.6 on the test-utils path (alerts 12 and 16) | editorconfig calls Minimatch and escape, unchanged in 11. editorconfig 4 makes the same move. | js-beautify depends on editorconfig 4+. |
readdir-glob>minimatch: ^11.0.8 | minimatch 10.2.6 on the Nuxt archiver path (alerts 12, 16) | readdir-glob 4.0.0 differs from 3.0.0 only by this minimatch major and its Node 20 floor; GhostVue requires Node 22. | archiver accepts readdir-glob 4 inside nitropack's range. |
Still open: the 9 Vite and esbuild alerts through vitepress 1.6.4, recorded in the November 2026 audit above. Overriding Vite 5 to 6 under VitePress 1.x is the untested graph that entry rules out.
@ghostvue/mcp (GHO-17)
Approved by Zac, Nov 22, 2026 for implementation. Adopted in GHO-227 as exact pins in packages/mcp/package.json (stdio server, tool registration helper, error envelope). Contract and footprint: GHO-17 MCP first-release contract §7; ADR 0015.
Runtime dependencies (MIT). Adopted as exact pins; since #348 the manifest declares caret ranges on these floors and the lockfile pins the tested version:
| Package | Floor | Why |
|---|---|---|
@modelcontextprotocol/sdk | 1.32.2 | Official MCP stdio server, tool registration, protocol framing |
zod | 4.6.7 | Required SDK peer (^3.25 || ^4.0; pin 4.x for new package) — tool input validation |
ajv | 8.20.0 | Serve-time manifest validation against bundled @ghostvue/core/manifest.schema.json (same major as CI) |
Stdio-only code should import @modelcontextprotocol/sdk/server narrowly; the SDK still installs transitive HTTP packages (hono, express, …). Measured installed node_modules for these three direct pins plus transitives: 17,407,541 bytes (scratch npm i --prefix /tmp with sdk@1.32.2, zod@4.6.7, ajv@8.20.0, 2026-11-22); SDK package alone 4,492,221 bytes unpacked per npm view @modelcontextprotocol/sdk@1.32.2 dist.unpackedSize. Measurement exceeds 16 MiB; 18 MiB cap unchanged per plan §7.
Adoption check (GHO-227, 2026-11-23): the same scratch npm i of the three pins installs 95 packages at 17,408,020 bytes (du -sb node_modules), and pnpm --filter @ghostvue/mcp deploy --prod measures 16,346,101 bytes; both are under the 18 MiB cap. npm audit --omit=dev on that scratch install reports 0 vulnerabilities. The server imports only @modelcontextprotocol/sdk/server, …/server/stdio.js, and …/types.js; ajv is pinned now and is first used for serve-time manifest validation in GHO-228.
Installed-size gate (GHO-232, 2026-11-25): pnpm mcp:packed installs the packed tarball with pnpm install --prod into a scratch project and fails above 18 MiB, excluding dist/assets/. First recorded run: 93 packages, 20,097,742 bytes of node_modules, of which 3,619,281 bytes are dist/assets/, so 16,478,461 bytes (15.72 MiB) are gated. pnpm audit --prod in packages/mcp, and in that scratch install, reports no known vulnerabilities.