@bugspotter/sdk 0.2.5-alpha.5 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.prettierrc ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "es5",
4
+ "singleQuote": true,
5
+ "printWidth": 80,
6
+ "tabWidth": 2,
7
+ "useTabs": false,
8
+ "bracketSpacing": true,
9
+ "arrowParens": "always",
10
+ "endOfLine": "lf"
11
+ }
package/CHANGELOG.md CHANGED
@@ -5,176 +5,108 @@ All notable changes to the BugSpotter SDK will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [0.2.5-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.4-alpha.5...sdk-v0.2.5-alpha.5) (2026-01-08)
8
+ ## [0.3.1] - 2026-01-13
9
9
 
10
+ ### Added
10
11
 
11
- ### Features
12
-
13
- * **sdk:** filter SDK internal logs and API calls from bug reports ([#584](https://github.com/apexbridge-tech/bugspotter/issues/584)) ([ab25673](https://github.com/apexbridge-tech/bugspotter/commit/ab25673abe1ac4f71caaffbd74119eedbefaa208))
14
-
15
- ## [0.2.4-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.3-alpha.5...sdk-v0.2.4-alpha.5) (2026-01-06)
16
-
17
-
18
- ### Features
19
-
20
- * add upload progress feedback and screenshot proxy endpoint ([#565](https://github.com/apexbridge-tech/bugspotter/issues/565)) ([d0dd05f](https://github.com/apexbridge-tech/bugspotter/commit/d0dd05f96b6006af8f98ae9aab25ad82758bd80f))
21
-
22
- ## [0.2.3-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.2-alpha.5...sdk-v0.2.3-alpha.5) (2026-01-03)
23
-
24
-
25
- ### Features
26
-
27
- * release SDK 0.3.0 with duplicate prevention system ([#532](https://github.com/apexbridge-tech/bugspotter/issues/532)) ([c61b8c8](https://github.com/apexbridge-tech/bugspotter/commit/c61b8c8e9ed99d0ef9b95e7422ed82b41a93a561))
28
-
29
- ## [0.2.2-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.1-alpha.5...sdk-v0.2.2-alpha.5) (2025-11-24)
30
-
31
-
32
- ### Features
33
-
34
- * **sdk:** Add mouse event sampling settings support ([#313](https://github.com/apexbridge-tech/bugspotter/issues/313)) ([dd49bd0](https://github.com/apexbridge-tech/bugspotter/commit/dd49bd0fba99be1b3c6043669c9df8c4ae04f8c9))
35
-
36
-
37
- ### Bug Fixes
38
-
39
- * **ci:** auto-format CHANGELOG in release-please PRs ([#300](https://github.com/apexbridge-tech/bugspotter/issues/300)) ([35a5541](https://github.com/apexbridge-tech/bugspotter/commit/35a5541450d75029964d060587784682f2ac3613))
40
-
41
- ## [0.2.1-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.2.0-alpha.5...sdk-v0.2.1-alpha.5) (2025-11-21)
42
-
43
- ### Bug Fixes
44
-
45
- - **test:** load rrweb from CDN for replay verification ([#297](https://github.com/apexbridge-tech/bugspotter/issues/297)) ([cbd575f](https://github.com/apexbridge-tech/bugspotter/commit/cbd575f4ab50da7b81df5be13d8a48fd48f391e6))
46
-
47
- ### Documentation
48
-
49
- - **sdk:** update README to mention session replay feature ([#298](https://github.com/apexbridge-tech/bugspotter/issues/298)) ([28535c2](https://github.com/apexbridge-tech/bugspotter/commit/28535c2cf9df4deaebb96a92a4503a7371813142))
50
-
51
- ## [0.2.0-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.1.3-alpha.5...sdk-v0.2.0-alpha.5) (2025-11-21)
52
-
53
- ### ⚠ BREAKING CHANGES
54
-
55
- - **sdk:** BugSpotter.init() is now async and returns Promise<BugSpotter>. All callers must use `await BugSpotter.init(config)` instead of `BugSpotter.init(config)`. This change enables fetching replay quality settings from the backend before SDK initialization.
56
-
57
- ### Features
58
-
59
- - **sdk:** add backend-controlled replay settings support ([#290](https://github.com/apexbridge-tech/bugspotter/issues/290)) ([0ea7c3b](https://github.com/apexbridge-tech/bugspotter/commit/0ea7c3b1ab456def3fd37c26bca6cf70da0f3ff9))
60
-
61
- ## [0.1.3-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.1.2-alpha.5...sdk-v0.1.3-alpha.5) (2025-11-13)
62
-
63
- ### Tests
12
+ - Node.js 22 LTS support for long-term stability
13
+ - pnpm 9.15.0 integration with improved dependency resolution
14
+ - Cross-browser E2E test suite (Chromium, Firefox, WebKit)
15
+ - Enhanced CI/CD pipeline with better error handling
16
+ - CDN deployment support in release workflow
64
17
 
65
- - **e2e:** migrate E2E tests from local storage to MinIO ([#229](https://github.com/apexbridge-tech/bugspotter/issues/229)) ([df5247d](https://github.com/apexbridge-tech/bugspotter/commit/df5247dee3a58d49dafe0c60f7f0bf6962c3cfb3))
18
+ ### Changed
66
19
 
67
- ## [0.1.2-alpha.6](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.1.2-alpha.5...sdk-v0.1.2-alpha.6) (2025-11-13)
20
+ - Updated Firefox large DOM test timeout from 35s to 45s for better compatibility
21
+ - Improved ESLint configuration for test environments
22
+ - Better handling of runtime-injected globals in type checking
68
23
 
69
- ### Bug Fixes
24
+ ### Fixed
70
25
 
71
- - **sdk:** remove Content-Type header from presigned URL uploads to fix 403 errors - Presigned URLs from S3/B2 are signed with specific headers, and adding additional headers causes signature mismatch and 403 Forbidden errors. This critical fix removes the Content-Type header from both fetch() and XMLHttpRequest uploads to storage.
26
+ - Resolved pnpm version conflict between CI config and package.json
27
+ - Fixed E2E test timeouts for slower browser environments
28
+ - Corrected TypeScript type definitions for test mocks
72
29
 
73
- ## [0.1.2-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.1.1-alpha.5...sdk-v0.1.2-alpha.5) (2025-11-12)
30
+ ## [0.3.0] - 2025-12-20
74
31
 
75
- ### Bug Fixes
32
+ ### Added
76
33
 
77
- - **ci:** update SDK publish workflow to support prerelease tags ([#221](https://github.com/apexbridge-tech/bugspotter/issues/221)) ([dc4d7f2](https://github.com/apexbridge-tech/bugspotter/commit/dc4d7f2ef519afcf232704f05295729c6402008c))
34
+ - **Duplicate Prevention System**: Automatic detection and prevention of duplicate bug reports
35
+ - **Backend-Controlled Replay Settings**: Dynamic replay configuration from server
36
+ - **Upload Progress Feedback**: Real-time progress indication for file uploads
37
+ - **Screenshot Proxy Endpoint**: Server-side screenshot proxy support
38
+ - **SDK Internal Log Filtering**: Automatic exclusion of SDK's own logs from reports
78
39
 
79
- ## [0.1.1-alpha.5](https://github.com/apexbridge-tech/bugspotter/compare/sdk-v0.1.0-alpha.5...sdk-v0.1.1-alpha.5) (2025-11-12)
40
+ ### Changed
80
41
 
81
- ### Features
42
+ - BugSpotter.init() is now async (returns Promise<BugSpotter>)
43
+ - Improved transport layer architecture
44
+ - Enhanced offline queue management
82
45
 
83
- - add exponential backoff retry and offline queue support ([c3c2106](https://github.com/apexbridge-tech/bugspotter/commit/c3c21063b777da37011449b89431a63f987ea777))
84
- - add FloatingButton widget and fix UMD exports ([b7e170e](https://github.com/apexbridge-tech/bugspotter/commit/b7e170eea47c7883722e59038a0d16b911c59588))
85
- - add FloatingButton widget with refactored architecture ([87a3d0e](https://github.com/apexbridge-tech/bugspotter/commit/87a3d0e69cea86db01e2847323440f296f045b16))
86
- - add gzip compression reducing payloads by 70-90% ([489e182](https://github.com/apexbridge-tech/bugspotter/commit/489e182ea072e3ffc43b58700b60288f6a255c22))
87
- - add gzip compression reducing payloads by 70-90% ([c545acf](https://github.com/apexbridge-tech/bugspotter/commit/c545acf6fe9a973c74a54f63a560b4fd96465e83))
88
- - add screenshot capture with html-to-image ([fae3eb7](https://github.com/apexbridge-tech/bugspotter/commit/fae3eb70fbf52d5b7c217f4d6d001735b661159d))
89
- - add session replay with rrweb ([175bd74](https://github.com/apexbridge-tech/bugspotter/commit/175bd74765d7f49b4be681c02eae0d7bbe8b1bc4))
90
- - add type safety system with shared types, Zod validation, and contract tests ([a3e436a](https://github.com/apexbridge-tech/bugspotter/commit/a3e436a931abda2cf30c85b32e5af2e011b7b3d9))
91
- - complete BugSpotter v0.1.0 with full documentation ([651153b](https://github.com/apexbridge-tech/bugspotter/commit/651153b2d4c86b9653df6164539991ea92c41942))
92
- - complete core SDK with all capture modules ([54fe97a](https://github.com/apexbridge-tech/bugspotter/commit/54fe97af32b2ee1aa09f5657b28b89e40454cb0a))
93
- - fixed bug in NetworkCapture + eslint + prettier ([75e2d92](https://github.com/apexbridge-tech/bugspotter/commit/75e2d9290d82ea3f9b377e3b189ce933f7e3e336))
94
- - initial project structure ([7109dc2](https://github.com/apexbridge-tech/bugspotter/commit/7109dc2e284ea8692081965e4b5a9cce4dc1b1e0))
95
- - **sdk:** bump to 0.1.0-alpha.5 with improved release workflow ([#219](https://github.com/apexbridge-tech/bugspotter/issues/219)) ([a191b7b](https://github.com/apexbridge-tech/bugspotter/commit/a191b7b998863f00df4bd24f529057e4c4160a73))
96
- - vitest configured + unit tests for capture ([381d11e](https://github.com/apexbridge-tech/bugspotter/commit/381d11e8ea45376c56ded0d62c2c37a726002acf))
46
+ ## [0.2.0] - 2025-11-21
97
47
 
98
- ### Bug Fixes
48
+ ### Added
99
49
 
100
- - increase browser test timeout and add GitHub release permissions ([#142](https://github.com/apexbridge-tech/bugspotter/issues/142)) ([301600e](https://github.com/apexbridge-tech/bugspotter/commit/301600e5fa6c01e0a6ef0e3281a0c27206cc00e2))
101
- - remove await from background queue processing ([174889d](https://github.com/apexbridge-tech/bugspotter/commit/174889d9df5541d0494b736d9b8c44bbcbdfbb7e))
102
- - **sdk:** remove unused @bugspotter/types workspace dependency ([#146](https://github.com/apexbridge-tech/bugspotter/issues/146)) ([7fed00b](https://github.com/apexbridge-tech/bugspotter/commit/7fed00bafab22f1854b78f861a90069b96a665c1))
50
+ - **Session Replay**: Recording with rrweb (configurable buffer duration up to 30s)
51
+ - **Mouse Event Sampling**: Configurable intervals for mouse tracking
52
+ - **Comprehensive E2E Tests**: Full test suite with Playwright (Chromium, Firefox, WebKit)
53
+ - **Shadow DOM Support**: Complete replay capture for Shadow DOM content
54
+ - **Type Safety Enhancements**: Improved Zod validation and type definitions
103
55
 
104
- ### Code Refactoring
56
+ ### Changed
105
57
 
106
- - Addressed comments on PR; ([fcb4888](https://github.com/apexbridge-tech/bugspotter/commit/fcb488813cd36147f6292c36f4540b23b7759e20))
107
- - improve capture classes with options, types, and performance ([616bd35](https://github.com/apexbridge-tech/bugspotter/commit/616bd3502c7620f65494ae813ea39e87781b5a2f))
108
- - improve transport and offline queue architecture ([01a27f3](https://github.com/apexbridge-tech/bugspotter/commit/01a27f3cc24d1211c65e4f0992fc969f40294e70))
109
- - optimize demo & documentation structure ([22c2171](https://github.com/apexbridge-tech/bugspotter/commit/22c21712229f19b1280d1406c2fac60655d41c4a))
110
- - Phase 2 - Extract shared capture architecture ([48d007c](https://github.com/apexbridge-tech/bugspotter/commit/48d007cecfc4651ded10a8c7fd4651fcec499fbd))
111
- - Phase 2 - Extract shared capture architecture ([ea88dda](https://github.com/apexbridge-tech/bugspotter/commit/ea88dda3cdbb07d72f96d707a3ebb97edf93379c))
112
- - Phase 2 - Extract shared capture architecture ([72f2425](https://github.com/apexbridge-tech/bugspotter/commit/72f242575c46c3c813bf15234ca95d5624b7d7d4))
113
- - remove deprecated code and unused variables ([392bbb9](https://github.com/apexbridge-tech/bugspotter/commit/392bbb9c91e3d57a49b9650782b778aea9607d50))
58
+ - Refactored capture classes with better options and performance
59
+ - Improved transport and offline queue architecture
60
+ - Enhanced error handling in retry logic
114
61
 
115
- ### Tests
62
+ ### Fixed
116
63
 
117
- - Add comprehensive edge case tests for DOM collector ([24b56b3](https://github.com/apexbridge-tech/bugspotter/commit/24b56b3317edd6df656f551c7d22db3cc03df7ac))
64
+ - Content-Type header removal from presigned URL uploads (fixed 403 errors)
65
+ - rrweb CDN loading for reliable replay verification
66
+ - Release workflow prerelease tag support
118
67
 
119
68
  ## [0.1.0] - 2025-11-01
120
69
 
121
70
  ### Added
122
71
 
123
- - Initial public release of BugSpotter SDK
124
- - Screenshot capture with CSP-safe implementation using html-to-image
125
- - Session replay recording with rrweb (configurable buffer duration)
126
- - Console log capture (all levels with stack traces)
127
- - Network request capture (fetch/XHR with timing)
128
- - Browser metadata capture (browser, OS, viewport detection)
129
- - Automatic PII detection and sanitization
72
+ #### Core Capture Features
73
+ - **Screenshot Capture**: Full-page screenshots with CSP-safe html-to-image library
74
+ - **Console Logging**: Capture all console messages with stack traces
75
+ - **Network Tracking**: Monitor all HTTP requests (fetch/XHR) with timing
76
+ - **Browser Metadata**: Automatic detection of browser, OS, viewport
77
+ - **DOM Capture**: Complete DOM structure preservation
78
+
79
+ #### Data Protection & Privacy
80
+ - **PII Sanitization**: Automatic detection and redaction of sensitive data
130
81
  - Built-in patterns: email, phone, credit card, SSN, IIN, IP address
131
- - Custom pattern support
132
- - Configurable exclusion selectors
133
- - Direct file uploads using presigned URLs (97% memory reduction)
134
- - Compression utilities for replay data (gzip)
135
- - Floating widget button with customizable position and styling
136
- - Bug report modal with form validation
137
- - Authentication support (API key, Bearer token, Custom headers)
138
- - Retry logic for failed requests
139
- - Offline queue for network resilience
140
- - TypeScript support with full type definitions
141
- - Multiple module formats: ESM, CommonJS, UMD
142
- - Framework integration examples for React, Vue, Angular, Next.js, Nuxt, Svelte
143
-
144
- ### Features
145
-
146
- - **Bundle size**: ~99 KB minified (with session replay)
147
- - **Performance**: Screenshot capture ~500ms, PII sanitization <10ms
148
- - **Browser support**: Chrome 55+, Firefox 55+, Safari 11+, Edge 79+ (ES2017+)
149
- - **Memory efficient**: <15 MB for 30s replay buffer
150
- - **CSP compliant**: No eval, no inline scripts
151
-
152
- ### Documentation
153
-
154
- - Complete API reference
155
- - Framework integration guide (React, Vue, Angular, Next.js, Nuxt, Svelte)
156
- - Session replay configuration guide
157
- - PII sanitization guide
158
- - Direct upload guide with examples
159
-
160
- ### Testing
161
-
162
- - 345 tests (unit + E2E + Playwright)
163
- - Full test coverage for core functionality
164
-
165
- ## [Unreleased]
166
-
167
- ### Planned Features
168
-
169
- - Real-time error tracking
170
- - Performance monitoring
171
- - User session tracking
172
- - Custom event tracking
173
- - Source map support
174
- - Analytics dashboard integration
175
- - Webhooks support
176
- - Additional integrations (Slack, Discord, Email)
177
-
178
- ---
179
-
180
- [0.1.0]: https://github.com/apexbridge-tech/bugspotter/releases/tag/sdk-v0.1.0
82
+ - Custom regex pattern support
83
+ - Per-element CSS selector-based exclusion
84
+ - **Content Security Policy (CSP) Compliant**: No eval, no inline scripts
85
+
86
+ #### Reliability & Performance
87
+ - **Compression**: gzip compression reduces payloads by 70-90%
88
+ - **Direct Upload**: Presigned URL uploads with 97% memory reduction vs base64
89
+ - **Offline Queue**: Store and sync bug reports when network unavailable
90
+ - **Exponential Backoff**: Intelligent retry strategy with configurable delays
91
+ - **Circular Buffering**: Efficient memory usage for long-running sessions
92
+
93
+ #### User Interface
94
+ - **Floating Widget Button**: Customizable position (corner/edge), styling, and icon
95
+ - **Bug Report Modal**: User-friendly form with validation for manual submission
96
+ - **Responsive Design**: Optimized for both desktop and mobile viewports
97
+
98
+ #### Authentication & Integration
99
+ - **Multiple Auth Types**: API Key, Bearer token, custom headers
100
+ - **Framework Agnostic**: Works with vanilla JavaScript and all major frameworks
101
+
102
+ #### Module Formats & TypeScript
103
+ - **ESM, CommonJS, UMD**: Support for all modern module systems
104
+ - **TypeScript Support**: Full type definitions with proper generic types
105
+ - **Source Maps**: Included for debugging and production support
106
+
107
+ #### Documentation
108
+ - Complete API reference with examples
109
+ - Framework integration guides (React, Vue, Angular, Next.js, Nuxt, Svelte)
110
+ - Session replay configuration and best practices
111
+ - PII sanitization customization guide
112
+ - Direct upload implementation guide