From 22ed414e7874d317b34d003fb59ca9a91f3099dc Mon Sep 17 00:00:00 2001 From: jamie ontiveros Date: Thu, 2 Oct 2025 00:21:14 -0400 Subject: [PATCH 1/3] chore: security updates, TypeScript improvements, and test coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update VitePress to v2.0.0-alpha.12 to fix security vulnerabilities - Replace all TypeScript 'any' types with proper interfaces - Add comprehensive test suites for Alert, Badge, and Card components - Improve TypeScript strict typing across components - Add CLAUDE.md development documentation 🤖 Generated with [Claude Code](https://claude.ai/code) --- .claude/settings.local.json | 23 + CLAUDE.md | 83 ++ package-lock.json | 1140 ++--------------- package.json | 4 +- src/components/FwbAlert/FwbAlert.vue | 8 +- src/components/FwbAlert/tests/Alert.spec.ts | 133 ++ .../FwbAutocomplete/FwbAutocomplete.vue | 4 +- .../tests/Autocomplete.spec.ts | 8 +- src/components/FwbAutocomplete/types.ts | 6 +- src/components/FwbBadge/tests/Badge.spec.ts | 149 +++ src/components/FwbCard/tests/Card.spec.ts | 164 +++ src/components/FwbJumbotron/FwbJumbotron.vue | 2 +- .../FwbPagination/FwbPagination.vue | 22 +- .../utils/FwbSlotListener/FwbSlotListener.vue | 2 +- 14 files changed, 677 insertions(+), 1071 deletions(-) create mode 100644 .claude/settings.local.json create mode 100644 CLAUDE.md create mode 100644 src/components/FwbAlert/tests/Alert.spec.ts create mode 100644 src/components/FwbBadge/tests/Badge.spec.ts create mode 100644 src/components/FwbCard/tests/Card.spec.ts diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..66c5400e --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,23 @@ +{ + "permissions": { + "allow": [ + "Bash(npm run test:*)", + "Bash(npm install)", + "Bash(npm audit:*)", + "Bash(npm outdated)", + "Bash(npm run typecheck:*)", + "Bash(npm run lint)", + "Bash(npm run coverage:*)", + "Bash(npm run build:production:*)", + "Bash(npm update:*)", + "Bash(npm view:*)", + "Bash(npm install:*)", + "Bash(npm run build:*)", + "Bash(npm run lint:*)", + "Bash(git checkout:*)", + "Bash(git add:*)" + ], + "deny": [], + "ask": [] + } +} \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..9b57f26b --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,83 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Commands + +### Development +```bash +# Start development server (VitePress documentation site) +npm run dev + +# Build documentation site +npm run build + +# Build the Vue component library for production +npm run build:production +``` + +### Testing & Quality +```bash +# Run tests with Vitest +npm run test + +# Run tests with coverage +npm run coverage + +# Run linting +npm run lint + +# Fix linting issues +npm run lint-fix + +# Type checking +npm run typecheck +``` + +### Library Build +```bash +# Build the package for distribution +npm run build:package + +# Build type declarations only +npm run build:types + +# Full production build (package + types) +npm run build:production +``` + +## Architecture + +### Component Structure +The project is a Vue 3 component library implementing Flowbite design system. Each component follows this structure: +- `src/components/FwbComponentName/` - Component directory + - `FwbComponentName.vue` - Main component implementation + - `types.ts` - TypeScript type definitions for props and types + - `composables/` - Vue composables for component logic (classes, state management) + - `tests/` - Vitest test files (when present) + +### Key Patterns +- **Class Generation**: Components use composables (e.g., `useComponentClasses.ts`) to generate Tailwind CSS classes based on props +- **Type Safety**: All components have TypeScript definitions in separate `types.ts` files +- **Composition API**: All components use Vue 3 Composition API with `