Skip to content

Conversation

@le-vlad
Copy link
Contributor

@le-vlad le-vlad commented Nov 21, 2025

No description provided.

…velte

Created separate library implementations for popular frontend frameworks:

- React: Hooks-based library with ZoriProvider, useZori, usePageView, useTrackEvent, useIdentify, and TrackClick component
- Next.js (client): App Router and Pages Router support with automatic route tracking using usePathname/useSearchParams
- Next.js (server): Server-side tracking for Server Components, API Routes, Server Actions, and Middleware with cookie management
- Vue.js: Vue 3 plugin with composables (useZori, usePageView, useTrackEvent, useIdentify) and Vue Router integration
- Svelte: Svelte stores pattern with global store, trackClick action, and SvelteKit integration helpers

Each library includes:
- Full TypeScript support with type definitions
- Comprehensive README with usage examples
- Package.json configured for npm publishing
- Framework-specific patterns and best practices
- GDPR consent management
- Auto page view tracking
- User identification
- Custom event tracking
Added comprehensive npm publishing infrastructure:

Workflow Features:
- Unified GitHub Actions workflow for publishing all framework packages
- Support for publishing individual packages or all at once
- Semantic versioning with patch/minor/major options
- Dry-run mode for safe testing before actual publish
- Matrix strategy for parallel publishing when selecting 'all'
- Automatic version bumping and git tagging
- GitHub Release creation with installation instructions

Package Updates:
- Added tsconfig.json to all packages (React, Next.js, Next.js Server, Vue, Svelte)
- Updated package.json with proper exports field and files list
- Publishing source files directly (TypeScript/TSX) for user build systems
- Simplified build process with tsc support

Documentation:
- Comprehensive PUBLISHING.md guide with:
  - Step-by-step publishing instructions
  - NPM token setup guide
  - Manual and automated publishing methods
  - Version bump guidelines (semantic versioning)
  - Troubleshooting section
  - Best practices

Security:
- Uses NPM_TOKEN secret for authentication
- Requires proper GitHub permissions (contents:write, packages:write)
- Supports dry-run testing before actual publish

Usage:
Run via GitHub Actions → Publish Framework Packages workflow
Select package (or 'all'), version bump type, and dry-run option
@le-vlad le-vlad requested a review from isntaname November 21, 2025 12:37
@le-vlad le-vlad self-assigned this Nov 21, 2025
@le-vlad le-vlad marked this pull request as ready for review November 21, 2025 19:15
@le-vlad le-vlad merged commit a4d6f5c into main Nov 21, 2025
1 check passed
@le-vlad
Copy link
Contributor Author

le-vlad commented Nov 21, 2025

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants