File tree 7 files changed +170
-40
lines changed
dev-packages/browser-integration-tests
7 files changed +170
-40
lines changed Original file line number Diff line number Diff line change 41
41
"dependencies" : {
42
42
"@babel/preset-typescript" : " ^7.16.7" ,
43
43
"@playwright/test" : " ~1.50.0" ,
44
- "@sentry-internal/rrweb" : " 2.33 .0" ,
44
+ "@sentry-internal/rrweb" : " 2.34 .0" ,
45
45
"@sentry/browser" : " 9.3.0" ,
46
46
"axios" : " 1.7.7" ,
47
47
"babel-loader" : " ^8.2.2" ,
Original file line number Diff line number Diff line change @@ -211,9 +211,9 @@ function _getEventFilterUrl(event: Event): string | null {
211
211
try {
212
212
// If there are linked exceptions or exception aggregates we only want to match against the top frame of the "root" (the main exception)
213
213
// The root always comes last in linked exceptions
214
- const rootException = [ ...( event . exception ?. values ?? [ ] ) . reverse ( ) ] ?. find (
215
- value => value . mechanism ?. parent_id === undefined && value . stacktrace ?. frames ?. length ,
216
- ) ;
214
+ const rootException = [ ...( event . exception ?. values ?? [ ] ) ]
215
+ . reverse ( )
216
+ . find ( value => value . mechanism ?. parent_id === undefined && value . stacktrace ?. frames ?. length ) ;
217
217
const frames = rootException ?. stacktrace ?. frames ;
218
218
return frames ? _getLastValidUrl ( frames ) : null ;
219
219
} catch ( oO ) {
Original file line number Diff line number Diff line change 88
88
"@sentry/webpack-plugin" : " 3.2.1" ,
89
89
"chalk" : " 3.0.0" ,
90
90
"resolve" : " 1.22.8" ,
91
- "rollup" : " 3.29.5 " ,
91
+ "rollup" : " 4.34.9 " ,
92
92
"stacktrace-parser" : " ^0.1.10"
93
93
},
94
94
"devDependencies" : {
Original file line number Diff line number Diff line change 65
65
},
66
66
"homepage" : " https://docs.sentry.io/platforms/javascript/session-replay/" ,
67
67
"devDependencies" : {
68
- "@sentry-internal/rrweb" : " 2.33 .0"
68
+ "@sentry-internal/rrweb" : " 2.34 .0"
69
69
},
70
70
"dependencies" : {
71
71
"@sentry-internal/replay" : " 9.3.0" ,
Original file line number Diff line number Diff line change 71
71
"devDependencies" : {
72
72
"@babel/core" : " ^7.17.5" ,
73
73
"@sentry-internal/replay-worker" : " 9.3.0" ,
74
- "@sentry-internal/rrweb" : " 2.33 .0" ,
75
- "@sentry-internal/rrweb-snapshot" : " 2.33 .0" ,
74
+ "@sentry-internal/rrweb" : " 2.34 .0" ,
75
+ "@sentry-internal/rrweb-snapshot" : " 2.34 .0" ,
76
76
"fflate" : " 0.8.2" ,
77
77
"jest-matcher-utils" : " ^29.0.0" ,
78
78
"jsdom-worker" : " ^0.2.1"
Original file line number Diff line number Diff line change @@ -45,13 +45,20 @@ export const createSentryPiniaPlugin: (options?: SentryPiniaPluginOptions) => Pi
45
45
const timestamp = new Date ( ) . toTimeString ( ) . split ( ' ' ) [ 0 ] ;
46
46
const filename = `pinia_state_all_stores_${ timestamp } .json` ;
47
47
48
- hint . attachments = [
49
- ...( hint . attachments || [ ] ) ,
50
- {
51
- filename,
52
- data : JSON . stringify ( getAllStoreStates ( ) ) ,
53
- } ,
54
- ] ;
48
+ // event processor runs for each pinia store - attachment should only be added once per event
49
+ const hasExistingPiniaStateAttachment = hint . attachments ?. some ( attachment =>
50
+ attachment . filename . startsWith ( 'pinia_state_all_stores_' ) ,
51
+ ) ;
52
+
53
+ if ( ! hasExistingPiniaStateAttachment ) {
54
+ hint . attachments = [
55
+ ...( hint . attachments || [ ] ) ,
56
+ {
57
+ filename,
58
+ data : JSON . stringify ( getAllStoreStates ( ) ) ,
59
+ } ,
60
+ ] ;
61
+ }
55
62
} catch ( _ ) {
56
63
// empty
57
64
}
Load Diff Large diffs are not rendered by default.
You can’t perform that action at this time.
0 commit comments