ccfb08f4d5
Follow-up to #20, which was merged before this landed. bot-agents has no `package.json` `imports` aliases (`src/` is flat and everything imports relatively), so no code changes. This records the new rule in the docs: - `.agents/memory/imports-aliases-barrels.md`: aliases may target only a direct subfolder of `src/` (its `index.ts` or a `#x/*` pattern); nothing outside `src/`, not `src/` itself, not deeper folders; such code imports relatively. - `.agents/memory/tests-layout-vitest.md`: `tests/` reach the public entry through a relative import, not a `#plugin` alias. - `.agents/skills/migrate-deno-repo/SKILL.md` and `AGENTS.md`: same rule. `vp check`, `vp test`, and `damem doctor` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #21 Reviewed-by: bot <noreply@capsulizers.com> Co-authored-by: Danny Kim <temeddix@gmail.com> Co-committed-by: Danny Kim <temeddix@gmail.com>
3.5 KiB
3.5 KiB
description
| description |
|---|
| Node.js (no engines in apps; images pin 24) with Vite+ (vp) and npm; only package.json, tsconfig.json, vite.config.ts plus a committed package-lock.json |
The stack
- Runtime: Node.js. App repos have no
enginesfield (user decision 2026-10-18): the container or runner image decides the version, so the Containerfile base image (node:24-alpine) and CI'snode-version: "24"are the pins. Published packages (the lint plugins) keep their ownengines.nodefloor.npm run lit-checkrunsnode scripts/lit-check.ts, which needs Node 22.18+ (unflagged type stripping andmodule.registerHooks); Node 24 satisfies it. Withoutenginesor a.node-version, localvpuses its default Node (vp env default). bot-agents has no Containerfile or setup step: the self-hosted runner'snode:24-bookwormjob image runs the action and its checks, andsrc/post.tsneeds 24.2+ (import.meta.main). - Bun is not supported (dropped 2026-10-15). No Bun CI legs, docs, or
runtime branches. Oxlint's
RuleTesterrefuses to run under Bun anyway, andvpbrings its own Node, the way uv brings its own Python. - Toolchain: Vite+ (
vite-plusdevDependency, commandvp): Vite, Vitest, Oxlint, Oxfmt, type checking, tsdown. - Package manager: npm everywhere.
package-lock.jsonis committed in apps and libraries (user agreed 2026-10-14:npm cineeds it). There is nopackageManagerfield; Vite+ detects npm from the lockfile.
Config files
Exactly three, plus the lockfile: package.json, tsconfig.json,
vite.config.ts. No .oxlintrc.json, .prettierrc, eslint.config.*,
vitest.config.*, .npmrc, or tsdown.config.*. Tool options go into
vite.config.ts keys (lint, fmt, test, pack) or, when a tool only
reads package.json (eslint-doc-generator), into a package.json key.
The target is a short vite.config.ts, around 30 lines (not strict).
Commands
| Command | Does |
|---|---|
vp check |
format check, Oxlint (type-aware), and type check together |
vp check --fix |
the same, applying formatting and safe fixes |
vp test |
Vitest; vp test tests runs only the top-level tests/ |
vp build |
Vite production build (apps) |
vp dev |
Vite dev server (apps) |
vp pack |
tsdown library build into dist/ (packages) |
npm ci / npm install |
install; never another package manager |
vp check, vp test, and the build (vp build or vp pack) must all pass
before any push. CI installs the toolchain with voidzero-dev/setup-vp.
Gotchas found during the migration
vp checkdoes not reportisolatedDeclarationserrors (TS9010); onlyvp packdoes, so packages runvp packin CI on every PR.- Oxfmt sorts
package.jsonkeys by default; that order is accepted, so there is nofmtoption for it (package-json-shape). - Oxlint and Oxfmt skip what
.gitignorelists; that is the only reasondist/andnode_modules/are not linted. Keep build output gitignored. - Vite+ bundles
vite.config.tsitself and resolves#imports in it. - Oxlint loads a
.tsplugin file directly on Node 24 (jsPlugins), so repo-local lint plugins need no build step.