diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 358b9fe..68d95bb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,45 +17,27 @@ jobs: steps: - uses: actions/checkout@v6 - - name: Setup pnpm - uses: pnpm/action-setup@v6 - with: - version: 10 - - - name: Setup Node.js - uses: actions/setup-node@v6 + - uses: voidzero-dev/setup-vp@v1 with: node-version: 24 - cache: pnpm + cache: true - name: Setup Bun uses: oven-sh/setup-bun@v2 with: bun-version: 1.3.14 - - name: Install dependencies - run: pnpm install --frozen-lockfile + - name: Build registry + run: vp run registry:build - name: Lint - run: pnpm lint - - - name: Format check - run: pnpm fmt:check - - - name: Build registry - run: pnpm registry:build - - - name: Build web app - run: pnpm --filter @stanza/web build - - - name: Typecheck - run: pnpm check-types + run: vp check - name: Tests - run: pnpm test + run: vp test - - name: Build CLI bundle - run: pnpm --filter stanza-cli build + - name: Build + run: vp run build - name: Smoke-test built CLI run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1e0f9a..63bb8c9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,39 +24,32 @@ jobs: # Changesets needs full history to compute the changelog. fetch-depth: 0 - - name: Setup pnpm - uses: pnpm/action-setup@v6 - with: - version: 10 - - - name: Setup Node.js - uses: actions/setup-node@v6 + - uses: voidzero-dev/setup-vp@v1 with: node-version: 24 - cache: pnpm + cache: true - name: Setup Bun uses: oven-sh/setup-bun@v2 - - name: Install dependencies - run: pnpm install --frozen-lockfile - - name: Build registry - run: pnpm registry:build + run: vp run registry:build - - name: Lint + typecheck + test - run: | - pnpm lint - pnpm fmt:check - pnpm check-types - pnpm test + - name: Lint + run: vp check + + - name: Tests + run: vp test + + - name: Build + run: vp run build:cli - name: Create release PR or publish id: changesets uses: changesets/action@v1 with: - version: pnpm changeset version - publish: pnpm release + version: vp exec changeset version + publish: vp run release title: "chore: release" commit: "chore: release" env: diff --git a/.oxfmtrc.json b/.oxfmtrc.json deleted file mode 100644 index 69149df..0000000 --- a/.oxfmtrc.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "./node_modules/oxfmt/configuration_schema.json", - "sortImports": {}, - "sortTailwindcss": { - "stylesheet": "apps/web/src/styles.css", - "functions": ["clsx", "cn", "cva", "tw"], - "preserveDuplicates": false, - "preserveWhitespace": false - }, - "sortPackageJson": true, - "ignorePatterns": [ - "**/node_modules/**", - "**/dist/**", - "**/.output/**", - "**/.turbo/**", - "**/.vercel/**", - "**/routeTree.gen.ts", - "**/coverage/**", - "apps/web/public/registry/**", - "registry/modules/*/logo*.svg", - "registry/modules/*/templates/**" - ] -} diff --git a/.oxlintrc.json b/.oxlintrc.json deleted file mode 100644 index ee96bec..0000000 --- a/.oxlintrc.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "$schema": "./node_modules/oxlint/configuration_schema.json", - "plugins": ["oxc", "eslint", "typescript", "unicorn", "import", "promise", "vitest"], - "categories": { - "correctness": "error", - "suspicious": "warn", - "perf": "warn" - }, - "rules": { - "no-console": "off", - "no-empty": ["error", { "allowEmptyCatch": true }], - "no-await-in-loop": "off", - "unicorn/no-null": "off", - "unicorn/filename-case": "off", - "unicorn/no-array-reduce": "off" - }, - "ignorePatterns": [ - "**/node_modules/**", - "**/dist/**", - "**/.output/**", - "**/.turbo/**", - "**/.vercel/**", - "**/*.gen.ts", - "**/coverage/**", - "registry/modules/*/templates/**" - ], - "overrides": [ - { - "files": ["**/*.test.ts", "**/*.test.tsx", "**/tests/**"], - "rules": { - "typescript/no-explicit-any": "off" - } - }, - { - "files": ["apps/web/**/*.tsx"], - "plugins": [ - "oxc", - "eslint", - "typescript", - "react", - "react-perf", - "promise", - "jsx-a11y", - "unicorn", - "import", - "vitest" - ], - "rules": { - "react/react-in-jsx-scope": "off" - } - } - ] -} diff --git a/.vite-hooks/pre-commit b/.vite-hooks/pre-commit new file mode 100755 index 0000000..85fb65b --- /dev/null +++ b/.vite-hooks/pre-commit @@ -0,0 +1 @@ +vp staged diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5266426..46cef3b 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,8 +1,3 @@ { - "recommendations": [ - "bradlc.vscode-tailwindcss", - "oxc.oxc-vscode", - "vercel.turbo-vsc", - "vitest.explorer" - ] + "recommendations": ["VoidZero.vite-plus-extension-pack"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index a5ac042..2eb24ce 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -35,5 +35,6 @@ }, "[css]": { "editor.defaultFormatter": "oxc.oxc-vscode" - } + }, + "oxc.fmt.configPath": "./vite.config.ts" } diff --git a/AGENTS.md b/AGENTS.md index a06daa9..d24c6c6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Stanza -Shadcn-style CLI for assembling modular full-stack TS monorepos. Currently ships `init`, `add`, `remove`, `list`, `search` against these **categories**: `framework`, `styling`, `db`, `orm`, `auth`, `tooling`, `testing`. `swap` + `update` verbs and more categories (api, ai, ui, payments, deploy, email, monorepo) are planned — the manifest already reserves the fields they'll need (`modules[category][].version`, `regions`). See [REGISTRY.md](REGISTRY.md) for the module roadmap and [TODO.md](TODO.md) for active work. +Shadcn-style CLI for assembling modular full-stack TS monorepos. Currently ships `init`, `add`, `remove`, `list`, `search` against these **categories**: `framework`, `styling`, `db`, `orm`, `auth`, `tooling`, `testing`. `swap` + `update` verbs and more categories (api, ai, ui, payments, deploy, email, monorepo) are planned — the manifest already reserves the fields they'll need (`modules[category][].version`, `regions`). See the [module registry](apps/web/content/docs/registry.mdx) for the module roadmap and [TODO.md](TODO.md) for active work. Three things differentiate stanza from other scaffolders: @@ -10,7 +10,7 @@ Three things differentiate stanza from other scaffolders: ## Layout -- `apps/cli/` — `stanza-cli`, node entrypoint at `src/bin.ts` (run via tsx in dev, tsdown-built to `dist/bin.mjs` for publish) +- `apps/cli/` — `stanza-cli`, node entrypoint at `src/bin.ts` (run via tsx in dev, built to `dist/bin.mjs` for publish via `vp pack`) - `apps/web/` — `@stanza/web`, TanStack Start visual builder (Vite-native, no Vinxi) - `packages/registry/` — shared schema, category/peer resolver, Zod manifest validator - `packages/codemods/` — ts-morph helpers (idempotent + reversible) @@ -20,19 +20,18 @@ Three things differentiate stanza from other scaffolders: In a **generated project**, a module's output lands per its category's `home` (in the canonical [`CATEGORIES`](packages/registry/src/module.ts) array): `auth`/`db`/`orm` (`home: package`) install into an internal workspace package at `packages/