XiaoDaiGua-Ray 22dfe441e0
feat(layout): add a composable workspace designer
Add layout registration, visual editing, and source generation.

Preserve embedded pages and wait for asynchronous layout renderers.

Add workspace lint and formatting commands.
2026-12-01 17:34:27 +08:00

5.1 KiB

Workspaces, type checking, builds, and CI

Use this topic for dependencies, public exports, aliases, auto-imports, production builds, or deployment configuration. Runtime requirements come from .nvmrc and the root manifest.

Question Read first Follow through
Workspace and dependency boundaries pnpm workspace, lockfile, workspace ownership Package-boundary check, environment check
Path aliases, type checking, and auto-imports TypeScript project graph, shared configuration, Vite aliases Plugin configuration, generated declarations, Vitest configuration
Build entry points, deployment base, and SEO Application Vite configuration, deployment configuration, site metadata Documentation configuration, artifact assembly, deployment conventions
CI, container images, and release artifacts GitHub Actions, Dockerfile, Compose Full verification workflow, toolchain history

Each workspace's package.json#exports defines its public exports. Compare Vite, TypeScript, and Vitest resolution when changing aliases. Update generated declarations through configuration. When publishing the combined site, check both the admin and documentation bases.

Run pnpm test:<suite> from the root for a single suite under __test__, such as pnpm test:hooks. pnpm test:utils runs the utility suites together. pnpm test:all runs all Vitest tests once. Use pnpm test:run <path> for an individual test file.

pnpm lint checks resolved @deprecated usages in TypeScript, TSX, JavaScript scripts, and Vue script blocks. ESLint uses the existing workspace TypeScript projects and the script lint project. Use void 0 for runtime values and undefined in type annotations.

Run pnpm lint:fix for ESLint autofixes across the workspace. Use pnpm lint:fix <file> [...] to limit fixes to existing individual files. In file mode, the command rejects directories and patterns. The commit hook passes staged code files to the same fixer. The local rule fixes reads of the built-in runtime value. Type positions keep undefined. Rename shadowing bindings by hand. ESLint rule

pnpm fix runs ESLint followed by Prettier across the workspace. Use pnpm <workspace>:fix for a single workspace, pnpm packages:fix for all shared packages, or pnpm fix <directory> for a specific directory. Run pnpm format:fix for Prettier alone, including Markdown and JSON. The combined command returns a nonzero status if ESLint still reports errors or warnings after the fixes. Root scripts

Targeted verification: pnpm harness verify toolchain runs package-boundary and type checks. For changes to dependencies, public exports, or build configuration, run pnpm harness verify all once at completion using the verification scope. Preview affected entry points when build artifacts or deployment paths change. Toolchain prose alone does not trigger these runtime checks. Passing targeted checks does not prove CI, Docker, or production publication succeeded.