Skip to content

Commit 00c0c2b

Browse files
authored
Use esm syntax for replay defaults and related maintenance (#1176)
1 parent 774c836 commit 00c0c2b

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

src/browser/replay/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Default options for the rrweb recorder
33
* See https://github.com/rrweb-io/rrweb/blob/master/guide.md#options for details
44
*/
5-
module.exports = {
5+
export default {
66
enabled: false, // Whether recording is enabled
77
autoStart: true, // Start recording automatically when Rollbar initializes
88
debug: {

test/fixtures/replay/rrwebEvents.fixtures.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
* A collection of unique rrweb events for testing
1616
* Extracted from real recordings
1717
*/
18-
const rrwebEvents = {
18+
export const rrwebEvents = {
1919
fullSnapshot: {
2020
type: EventType.FullSnapshot,
2121
data: {
@@ -249,5 +249,3 @@ const rrwebEvents = {
249249
// Missing data and timestamp
250250
},
251251
};
252-
253-
export { rrwebEvents };

test/fixtures/replay/rrwebSyntheticEvents.fixtures.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ import {
99
IncrementalSource,
1010
MouseInteractions,
1111
MediaInteractions,
12-
NodeType,
1312
PointerTypes,
1413
} from './types.js';
1514

1615
/**
1716
* Synthetic events created from type definitions for testing
1817
* These cover sources and interactions not in the real recordings
1918
*/
20-
const syntheticEvents = {
19+
export const syntheticEvents = {
2120
domContentLoaded: {
2221
type: EventType.DomContentLoaded,
2322
data: {}, // Empty object confirmed in rrweb/src/record/index.ts
@@ -327,5 +326,3 @@ const syntheticEvents = {
327326
timestamp: 1744983335490,
328327
},
329328
};
330-
331-
export { syntheticEvents };

test/fixtures/replay/types.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,3 @@ export const PointerTypes = {
6969
Pen: 1,
7070
Touch: 2,
7171
};
72-
73-
module.exports = {
74-
EventType,
75-
IncrementalSource,
76-
MouseInteractions,
77-
MediaInteractions,
78-
NodeType,
79-
PointerTypes,
80-
};

0 commit comments

Comments
 (0)