/skills/fuz-stack/references/npm-dependencies
  • docs
  • skills
  • fuz-stack
    • Code Generation
    • CSS Patterns
    • Database Query Patterns
    • Dependency Injection
    • Documentation System
    • fuz_util
    • mdz — Strict Markdown Dialect
    • Approved npm Dependencies
    • Path References in Documentation
    • Approved Rust Dependencies
    • Rust Patterns for the Fuz Ecosystem
    • Rust Performance Patterns
    • Rust Spine & Consumer Servers
    • Svelte 5 Patterns
    • Task Patterns
    • Testing Patterns
    • TSDoc Comment Style Guide
    • Twin Implementations (TS ↔ Rust)
    • WASM Patterns
    • Zod Schemas
  • grimoire
  • tools
  • hash

Approved npm Dependencies

The allowlist of external npm packages for the canonical TS/Svelte repos — libraries, apps, sites, tooling (different-paradigm or pre-canonical repos carry their own deps). Prefer these; reach outside only with explicit approval (§Adding a dependency).

Source of truth is each repo's package.json; this hand-maintained list is deliberately not exhaustive — narrowly repo-specific deps (one app's domain library, an editor extension's typings, a benchmark-only reference impl) are left out. Workspace-published packages (@fuzdev / @ryanatkn scopes, svelte-docinfo) are internal and never appear here. Verify against the repos periodically.

Language & build toolchain

PackagePurpose
typescriptTypeScript compiler
tslibTS runtime helpers
svelteComponent framework (runes)
@sveltejs/kitApplication framework
@sveltejs/vite-plugin-svelteSvelte ↔ Vite integration
@sveltejs/adapter-staticStatic-site adapter
@sveltejs/acorn-typescriptTS-aware acorn parser (Svelte toolchain)
@sveltejs/packageLibrary packaging (svelte-package)
svelte-checkSvelte / TS diagnostics
svelte2tsxSvelte → TSX for typechecking
viteBuild tool / dev server
vitestTest runner
jsdomDOM implementation for tests

Lint & format

PackagePurpose
eslintLinter
eslint-plugin-svelteSvelte lint rules
typescript-eslintTypeScript lint integration
@eslint/jsESLint's built-in JS rule presets (used only inside the shared eslint-config package)
globalsGlobal-identifier sets for ESLint configs (used only inside the shared eslint-config package)

Retired: prettier + prettier-plugin-svelte — tsv (gro format) formats every repo; don't add them (tsv keeps prettier only as its conformance oracle).

Release tooling

PackagePurpose
@changesets/changelog-gitGit-based changelog generator for changesets
@changesets/typesChangesets type definitions

Type definitions

PackagePurpose
@types/nodeNode.js types
@types/denoDeno runtime types
@types/estreeESTree AST types
@types/pgpg (node-postgres) types
@types/wsws types
@types/picomatchpicomatch types

Core utilities

PackagePurpose
zodSchema validation for app data
esm-envEnvironment flags (DEV / BROWSER)
zimmerframeAST walker
magic-stringSource-string edits with sourcemaps
@webref/cssW3C CSS reference data
@jridgewell/trace-mappingSourcemap decoding
date-fnsDate utilities
valibotSchema validation in svelte-docinfo (its own public schemas)
immerImmutable state updates (setup's state)

(dequal and fast-deep-equal appear only as benchmark baselines in fuz_util — not stack utilities; don't add them to app code.)

Backend & server

PackagePurpose
pgPostgreSQL client
@electric-sql/pgliteEmbedded Postgres (WASM)
honoHTTP server framework
@hono/node-serverHono Node adapter
@hono/node-wsHono Node WebSocket adapter
@hono/bunHono Bun adapter
@hono/denoHono Deno adapter
@node-rs/argon2Argon2 password hashing (native)
wsWebSocket implementation

Parsing & build internals

PackagePurpose
esbuildBundler / transform
oxc-parserFast JS/TS parser
ts-blank-spaceType-stripping transform
acornJS parser (ESTree)
acorn-jsxJSX plugin for acorn
chokidarFile watching
dotenv.env loader
picomatch / tinyglobbyGlob matching
commanderCLI argument parsing

Adding a dependency

Prefer web standards, then node: built-ins (fuz_host replaces these per module as it lands, with a Node implementation and the gro runtime's builtins behind one import), then this list. New scripts and tasks run on Node via gro, never on Deno. A new package needs explicit approval — name, purpose, what it replaces or enables, transitive footprint. Removing an unused dependency is pre-authorized: verify nothing references it, drop it, and if it was the last user, drop it from this list in the same change.

Dependency classification (peer vs dependency vs dev)

For a published library, the package.json field is a correctness decision. Litmus test: if a consumer ended up with a second copy of this package, would anything break? Yes → peer. No, but published code imports it → dependencies. Only the build sees it → devDependencies.

  • peerDependencies — must resolve to a single instance in the consumer's tree: a framework host (svelte, @sveltejs/kit; svelte/compiler used only as a parser shares no runtime state, so it may be a plain dependency, as in fuz_css) or anything whose instances/types cross the library's API boundary (zod schemas, esm-env flags). Two copies break instanceof, Zod .brand() identity, Svelte context keys, and the dev/prod env gate. Mirror the version in devDependencies so the library's own build resolves it. Required when the public API always reaches it; optional (via peerDependenciesMeta) for an opt-in path (a preprocessor, a deep-import module many consumers skip) — but only when a required peer guarantees it transitively: svelte and @sveltejs/kit both depend on esm-env, so a lib requiring either can leave esm-env optional. A singleton on a path with no required framework peer (esm-env in a node-only utility like fuz_util/log.ts) must be a required peer — npm auto-installs those, so the consumer never hits a missing-module crash.
  • dependencies — published code imports it as a self-contained detail never handed across the API boundary; pin a known-good version. Build-time helpers a consumer never touches (magic-string, zimmerframe in a Svelte preprocessor) belong here so the library ships its own copy. An optional peer is acceptable for such a helper only when a required framework peer already guarantees it (type-only @types/estree via svelte, erased at build). Never a devDependency-only import — that breaks any consumer who reaches the path.
  • devDependencies — build/test only, never shipped in dist.

Apps, sites, and templates are not libraries — leaf deploy targets with no installing consumers; everything is dependencies/devDependencies, never peers.