UNPKG

wingman-monitor

Version:

Runtime error monitoring package with React provider that automatically reports errors to webhook endpoints

56 lines (38 loc) 2.01 kB
# Changelog ## [1.1.0] - 2025-01-08 ### 🎉 Major Features Added - **React Provider**: Added `WingmanProvider` component for easy React/Next.js integration - **Auto Token Loading**: Provider automatically loads access token from `.wingman.json` (no more passing API keys in code!) - **Global Error Handling**: Automatic capture of global JavaScript errors and unhandled promise rejections - **Smart Error Filtering**: Environment-aware error filtering (development vs production) ### ✨ New Components & Hooks - `WingmanProvider` - React provider component for layout-level integration - `useWingman()` - Hook to access monitor instance and status - `useWingmanReporting()` - Hook for manual error/info reporting - `useWingmanConfig()` - Hook to access environment configuration ### 🛡️ Enhanced Error Handling - Automatic filtering of browser extension errors - Network error filtering for user-related issues - Ad blocker script error filtering - Environment-based error reporting (production only by default) ### 🔧 Developer Experience - Better configuration error messages in development - Automatic token resolution from `.wingman.json` - Clean integration with Next.js App Router and Pages Router - TypeScript improvements with better type exports ### 📝 Documentation - Added comprehensive usage guide (`UPDATED_USAGE.md`) - Examples for Next.js App Router and Pages Router - Clear setup instructions and best practices ### 🔄 Breaking Changes - `WingmanProvider` no longer requires `apiKey` prop (uses stored token) - Enhanced provider props with environment detection ### 📦 New Exports - `shouldReportError` - Error filtering utility - `getEnvironmentConfig` - Environment detection - `getStoredAccessToken` - Token retrieval utility - `requireAccessToken` - Token validation utility ## [1.0.1] - Previous Release - Initial release with basic monitoring capabilities - CLI initialization - Webhook error reporting