@openreplay/tracker 9.0.12 → 10.0.2

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.
Files changed (110) hide show
  1. package/.nvmrc +1 -0
  2. package/CHANGELOG.md +15 -0
  3. package/README.md +4 -0
  4. package/bun.lockb +0 -0
  5. package/cjs/app/index.js +14 -11
  6. package/cjs/app/logger.d.ts +1 -1
  7. package/cjs/app/messages.gen.d.ts +2 -1
  8. package/cjs/app/messages.gen.js +20 -5
  9. package/cjs/app/nodes.js +4 -3
  10. package/cjs/app/observer/observer.js +2 -1
  11. package/cjs/common/messages.gen.d.ts +17 -4
  12. package/cjs/index.js +1 -1
  13. package/cjs/modules/Network/beaconProxy.d.ts +16 -0
  14. package/cjs/modules/Network/beaconProxy.js +82 -0
  15. package/cjs/modules/Network/fetchProxy.d.ts +0 -1
  16. package/cjs/modules/Network/fetchProxy.js +3 -1
  17. package/cjs/modules/Network/index.js +5 -0
  18. package/cjs/modules/Network/networkMessage.d.ts +1 -1
  19. package/cjs/modules/Network/networkMessage.js +7 -4
  20. package/cjs/modules/Network/xhrProxy.d.ts +0 -9
  21. package/cjs/modules/Network/xhrProxy.js +0 -1
  22. package/cjs/modules/axiosSpy.js +1 -1
  23. package/cjs/modules/constructedStyleSheets.js +25 -21
  24. package/cjs/modules/featureFlags.js +0 -1
  25. package/cjs/modules/img.js +2 -2
  26. package/cjs/modules/network.js +5 -4
  27. package/cjs/utils.d.ts +16 -0
  28. package/cjs/utils.js +53 -1
  29. package/coverage/clover.xml +829 -1064
  30. package/coverage/coverage-final.json +17 -21
  31. package/coverage/lcov-report/index.html +40 -55
  32. package/coverage/lcov-report/main/app/guards.ts.html +1 -1
  33. package/coverage/lcov-report/main/app/index.html +23 -23
  34. package/coverage/lcov-report/main/app/index.ts.html +212 -29
  35. package/coverage/lcov-report/main/app/logger.ts.html +2 -2
  36. package/coverage/lcov-report/main/app/messages.gen.ts.html +144 -144
  37. package/coverage/lcov-report/main/app/nodes.ts.html +13 -7
  38. package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
  39. package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
  40. package/coverage/lcov-report/main/app/observer/index.html +1 -1
  41. package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
  42. package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
  43. package/coverage/lcov-report/main/app/sanitizer.ts.html +12 -3
  44. package/coverage/lcov-report/main/app/session.ts.html +30 -9
  45. package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
  46. package/coverage/lcov-report/main/index.html +21 -21
  47. package/coverage/lcov-report/main/index.ts.html +26 -26
  48. package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +19 -19
  49. package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +102 -96
  50. package/coverage/lcov-report/main/modules/Network/index.html +65 -65
  51. package/coverage/lcov-report/main/modules/Network/index.ts.html +33 -33
  52. package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +71 -71
  53. package/coverage/lcov-report/main/modules/Network/utils.ts.html +34 -34
  54. package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +13 -13
  55. package/coverage/lcov-report/main/modules/attributeSender.ts.html +13 -4
  56. package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
  57. package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
  58. package/coverage/lcov-report/main/modules/console.ts.html +1 -1
  59. package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +42 -30
  60. package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
  61. package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
  62. package/coverage/lcov-report/main/modules/featureFlags.ts.html +1 -1
  63. package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
  64. package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
  65. package/coverage/lcov-report/main/modules/img.ts.html +23 -20
  66. package/coverage/lcov-report/main/modules/index.html +13 -13
  67. package/coverage/lcov-report/main/modules/input.ts.html +1 -1
  68. package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
  69. package/coverage/lcov-report/main/modules/network.ts.html +2 -2
  70. package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
  71. package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
  72. package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
  73. package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
  74. package/coverage/lcov-report/main/modules/timing.ts.html +42 -6
  75. package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
  76. package/coverage/lcov-report/main/utils.ts.html +255 -39
  77. package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
  78. package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +1 -1
  79. package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +1 -1
  80. package/coverage/lcov-report/webworker/QueueSender.ts.html +1 -1
  81. package/coverage/lcov-report/webworker/index.html +1 -1
  82. package/coverage/lcov-report/webworker/index.ts.html +1 -1
  83. package/coverage/lcov.info +1376 -1729
  84. package/lib/app/index.js +15 -12
  85. package/lib/app/logger.d.ts +1 -1
  86. package/lib/app/messages.gen.d.ts +2 -1
  87. package/lib/app/messages.gen.js +16 -2
  88. package/lib/app/nodes.js +4 -3
  89. package/lib/app/observer/observer.js +2 -1
  90. package/lib/common/messages.gen.d.ts +17 -4
  91. package/lib/common/tsconfig.tsbuildinfo +1 -1
  92. package/lib/index.js +1 -1
  93. package/lib/modules/Network/beaconProxy.d.ts +16 -0
  94. package/lib/modules/Network/beaconProxy.js +77 -0
  95. package/lib/modules/Network/fetchProxy.d.ts +0 -1
  96. package/lib/modules/Network/fetchProxy.js +3 -1
  97. package/lib/modules/Network/index.js +5 -0
  98. package/lib/modules/Network/networkMessage.d.ts +1 -1
  99. package/lib/modules/Network/networkMessage.js +7 -4
  100. package/lib/modules/Network/xhrProxy.d.ts +0 -9
  101. package/lib/modules/Network/xhrProxy.js +0 -1
  102. package/lib/modules/axiosSpy.js +1 -1
  103. package/lib/modules/constructedStyleSheets.js +25 -21
  104. package/lib/modules/featureFlags.js +0 -1
  105. package/lib/modules/img.js +3 -3
  106. package/lib/modules/network.js +5 -4
  107. package/lib/utils.d.ts +16 -0
  108. package/lib/utils.js +47 -0
  109. package/package.json +13 -13
  110. package/rollup.config.js +4 -4
@@ -113,6 +113,9 @@ export class FetchProxyHandler {
113
113
  apply(target, _, argsList) {
114
114
  const input = argsList[0];
115
115
  const init = argsList[1];
116
+ // @ts-ignore
117
+ if (!(input === null || input === void 0 ? void 0 : input.url) && !input)
118
+ return target.apply(window, argsList);
116
119
  const isORUrl = input instanceof URL || typeof input === 'string'
117
120
  ? this.isServiceUrl(String(input))
118
121
  : this.isServiceUrl(String(input.url));
@@ -261,4 +264,3 @@ export default class FetchProxy {
261
264
  return new Proxy(fetch, new FetchProxyHandler(ignoredHeaders, setSessionTokenHeader, sanitize, sendMessage, isServiceUrl, tokenUrlMatcher));
262
265
  }
263
266
  }
264
- FetchProxy.origFetch = fetch;
@@ -1,8 +1,10 @@
1
1
  import FetchProxy from './fetchProxy.js';
2
2
  import XHRProxy from './xhrProxy.js';
3
+ import BeaconProxy from './beaconProxy.js';
3
4
  const getWarning = (api) => console.warn(`Openreplay: Can't find ${api} in global context.
4
5
  If you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ${api} won't be tracked.`);
5
6
  export default function setProxy(context, ignoredHeaders, setSessionTokenHeader, sanitize, sendMessage, isServiceUrl, tokenUrlMatcher) {
7
+ var _a;
6
8
  if (context.XMLHttpRequest) {
7
9
  context.XMLHttpRequest = XHRProxy.create(ignoredHeaders, setSessionTokenHeader, sanitize, sendMessage, isServiceUrl, tokenUrlMatcher);
8
10
  }
@@ -15,4 +17,7 @@ export default function setProxy(context, ignoredHeaders, setSessionTokenHeader,
15
17
  else {
16
18
  getWarning('fetch');
17
19
  }
20
+ if ((_a = context === null || context === void 0 ? void 0 : context.navigator) === null || _a === void 0 ? void 0 : _a.sendBeacon) {
21
+ context.navigator.sendBeacon = BeaconProxy.create(ignoredHeaders, setSessionTokenHeader, sanitize, sendMessage, isServiceUrl);
22
+ }
18
23
  }
@@ -27,7 +27,7 @@ export default class NetworkMessage {
27
27
  [key: string]: string;
28
28
  };
29
29
  responseType: XMLHttpRequest['responseType'];
30
- requestType: 'xhr' | 'fetch' | 'ping' | 'custom';
30
+ requestType: 'xhr' | 'fetch' | 'ping' | 'custom' | 'beacon';
31
31
  requestHeader: HeadersInit;
32
32
  response: any;
33
33
  responseSize: number;
@@ -50,7 +50,7 @@ export default class NetworkMessage {
50
50
  request,
51
51
  response,
52
52
  });
53
- return NetworkRequest(this.requestType, messageInfo.method, messageInfo.url, JSON.stringify(messageInfo.request), JSON.stringify(messageInfo.response), messageInfo.status, this.startTime + getTimeOrigin(), this.duration);
53
+ return NetworkRequest(this.requestType, messageInfo.method, messageInfo.url, JSON.stringify(messageInfo.request), JSON.stringify(messageInfo.response), messageInfo.status, this.startTime + getTimeOrigin(), this.duration, this.responseSize);
54
54
  }
55
55
  writeHeaders() {
56
56
  const reqHs = {};
@@ -71,8 +71,11 @@ export default class NetworkMessage {
71
71
  return { reqHs, resHs };
72
72
  }
73
73
  isHeaderIgnored(key) {
74
- if (Array.isArray(this.ignoredHeaders))
75
- return this.ignoredHeaders.includes(key);
76
- return this.ignoredHeaders;
74
+ if (Array.isArray(this.ignoredHeaders)) {
75
+ return this.ignoredHeaders.map((k) => k.toLowerCase()).includes(key.toLowerCase());
76
+ }
77
+ else {
78
+ return this.ignoredHeaders;
79
+ }
77
80
  }
78
81
  }
@@ -35,14 +35,5 @@ export declare class XHRProxyHandler<T extends XMLHttpRequest> implements ProxyH
35
35
  protected updateItemByReadyState(): void;
36
36
  }
37
37
  export default class XHRProxy {
38
- static origXMLHttpRequest: {
39
- new (): XMLHttpRequest;
40
- prototype: XMLHttpRequest;
41
- readonly DONE: number;
42
- readonly HEADERS_RECEIVED: number;
43
- readonly LOADING: number;
44
- readonly OPENED: number;
45
- readonly UNSENT: number;
46
- };
47
38
  static create(ignoredHeaders: boolean | string[], setSessionTokenHeader: (cb: (name: string, value: string) => void) => void, sanitize: (data: RequestResponseData) => RequestResponseData, sendMessage: (data: NetworkRequest) => void, isServiceUrl: (url: string) => boolean, tokenUrlMatcher?: (url: string) => boolean): any;
48
39
  }
@@ -210,4 +210,3 @@ export default class XHRProxy {
210
210
  });
211
211
  }
212
212
  }
213
- XHRProxy.origXMLHttpRequest = XMLHttpRequest;
@@ -65,7 +65,7 @@ export default function (app, instance, opts, sanitize, stringify) {
65
65
  const requestStart = axiosResponseObj.config.__openreplay_timing;
66
66
  const duration = performance.now() - requestStart;
67
67
  app.debug.log('Openreplay: final req object', reqResInfo);
68
- app.send(NetworkRequest('xhr', String(method), String(reqResInfo.url), stringify(reqResInfo.request), stringify(reqResInfo.response), reqResInfo.status, requestStart + getTimeOrigin(), duration));
68
+ app.send(NetworkRequest('xhr', String(method), String(reqResInfo.url), stringify(reqResInfo.request), stringify(reqResInfo.response), reqResInfo.status, requestStart + getTimeOrigin(), duration, 0));
69
69
  }
70
70
  function getStartTime(config) {
71
71
  app.debug.log('Openreplay: capturing API request', config);
@@ -5,7 +5,7 @@ function hasAdoptedSS(node) {
5
5
  // @ts-ignore
6
6
  !!node.adoptedStyleSheets);
7
7
  }
8
- // TODO: incapsulate to be init-ed on-start and join with cssrules.ts under one folder
8
+ // TODO: encapsulate to be init-ed on-start and join with cssrules.ts under one folder
9
9
  let _id = 0xf;
10
10
  export function nextID() {
11
11
  return _id++;
@@ -34,35 +34,39 @@ export default function (app) {
34
34
  }
35
35
  const nowOwning = [];
36
36
  const styleSheets = root.adoptedStyleSheets;
37
- for (const s of styleSheets) {
38
- let sheetID = styleSheetIDMap.get(s);
39
- const init = !sheetID;
40
- if (!sheetID) {
41
- sheetID = nextID();
42
- styleSheetIDMap.set(s, sheetID);
43
- }
44
- if (!pastOwning.includes(sheetID)) {
45
- app.send(AdoptedSSAddOwner(sheetID, nodeID));
46
- }
47
- if (init) {
48
- const rules = s.cssRules;
49
- for (let i = 0; i < rules.length; i++) {
50
- app.send(AdoptedSSInsertRuleURLBased(sheetID, rules[i].cssText, i, app.getBaseHref()));
37
+ if (Symbol.iterator in styleSheets) {
38
+ for (const s of styleSheets) {
39
+ let sheetID = styleSheetIDMap.get(s);
40
+ const init = !sheetID;
41
+ if (!sheetID) {
42
+ sheetID = nextID();
43
+ styleSheetIDMap.set(s, sheetID);
44
+ }
45
+ if (!pastOwning.includes(sheetID)) {
46
+ app.send(AdoptedSSAddOwner(sheetID, nodeID));
51
47
  }
48
+ if (init) {
49
+ const rules = s.cssRules;
50
+ for (let i = 0; i < rules.length; i++) {
51
+ app.send(AdoptedSSInsertRuleURLBased(sheetID, rules[i].cssText, i, app.getBaseHref()));
52
+ }
53
+ }
54
+ nowOwning.push(sheetID);
52
55
  }
53
- nowOwning.push(sheetID);
54
56
  }
55
- for (const sheetID of pastOwning) {
56
- if (!nowOwning.includes(sheetID)) {
57
- app.send(AdoptedSSRemoveOwner(sheetID, nodeID));
57
+ if (Symbol.iterator in pastOwning) {
58
+ for (const sheetID of pastOwning) {
59
+ if (!nowOwning.includes(sheetID)) {
60
+ app.send(AdoptedSSRemoveOwner(sheetID, nodeID));
61
+ }
58
62
  }
59
63
  }
60
64
  adoptedStyleSheetsOwnings.set(nodeID, nowOwning);
61
- }, 20); // Misterious bug:
65
+ }, 20); // Mysterious bug:
62
66
  /* On the page https://explore.fast.design/components/fast-accordion
63
67
  the only rule inside the only adoptedStyleSheet of the iframe-s document
64
68
  gets changed during first milliseconds after the load.
65
- Howerer, none of the documented methods (replace, insertRule) is triggered.
69
+ However, none of the documented methods (replace, insertRule) is triggered.
66
70
  The rule is not substituted (remains the same object), however the text gets changed.
67
71
  */
68
72
  function patchAdoptedStyleSheets(prototype) {
@@ -45,7 +45,6 @@ export default class FeatureFlags {
45
45
  userID: sessionInfo.userID,
46
46
  metadata: sessionInfo.metadata,
47
47
  referrer: document.referrer,
48
- // todo: get from backend
49
48
  os: userInfo.userOS,
50
49
  device: userInfo.userDevice,
51
50
  country: userInfo.userCountry,
@@ -1,4 +1,4 @@
1
- import { isURL, IS_FIREFOX, MAX_STR_LEN } from '../utils.js';
1
+ import { isURL, IS_FIREFOX, MAX_STR_LEN, createMutationObserver } from '../utils.js';
2
2
  import { ResourceTiming, SetNodeAttributeURLBased } from '../app/messages.gen.js';
3
3
  import { hasTag } from '../app/guards.js';
4
4
  function resolveURL(url, location = document.location) {
@@ -75,7 +75,7 @@ export default function (app) {
75
75
  sendSrcset(id, img);
76
76
  }
77
77
  });
78
- const observer = new MutationObserver((mutations) => {
78
+ const observer = createMutationObserver(app.safe((mutations) => {
79
79
  for (const mutation of mutations) {
80
80
  if (mutation.type === 'attributes') {
81
81
  const target = mutation.target;
@@ -91,7 +91,7 @@ export default function (app) {
91
91
  }
92
92
  }
93
93
  }
94
- });
94
+ }));
95
95
  app.attachStopCallback(() => {
96
96
  observer.disconnect();
97
97
  });
@@ -17,12 +17,12 @@ function strMethod(method) {
17
17
  export default function (app, opts = {}) {
18
18
  const options = Object.assign({
19
19
  failuresOnly: false,
20
- ignoreHeaders: ['Cookie', 'Set-Cookie', 'Authorization'],
20
+ ignoreHeaders: ['cookie', 'set-cookie', 'authorization'],
21
21
  capturePayload: false,
22
22
  sessionTokenHeader: false,
23
23
  captureInIframes: true,
24
24
  axiosInstances: undefined,
25
- useProxy: false,
25
+ useProxy: true,
26
26
  }, opts);
27
27
  if (options.useProxy === false) {
28
28
  app.debug.warn('Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true');
@@ -147,12 +147,13 @@ export default function (app, opts = {}) {
147
147
  if (!reqResInfo) {
148
148
  return;
149
149
  }
150
- app.send(NetworkRequest('fetch', method, String(reqResInfo.url), stringify(reqResInfo.request), stringify(reqResInfo.response), r.status, startTime + getTimeOrigin(), duration));
150
+ app.send(NetworkRequest('fetch', method, String(reqResInfo.url), stringify(reqResInfo.request), stringify(reqResInfo.response), r.status, startTime + getTimeOrigin(), duration, 0));
151
151
  })
152
152
  .catch((e) => app.debug.error('Could not process Fetch response:', e));
153
153
  return response;
154
154
  });
155
155
  };
156
+ // @ts-ignore
156
157
  context.fetch = trackFetch;
157
158
  /* ====== <> ====== */
158
159
  /* ====== XHR ====== */
@@ -197,7 +198,7 @@ export default function (app, opts = {}) {
197
198
  if (!reqResInfo) {
198
199
  return;
199
200
  }
200
- app.send(NetworkRequest('xhr', method, String(reqResInfo.url), stringify(reqResInfo.request), stringify(reqResInfo.response), xhr.status, startTime + getTimeOrigin(), duration));
201
+ app.send(NetworkRequest('xhr', method, String(reqResInfo.url), stringify(reqResInfo.request), stringify(reqResInfo.response), xhr.status, startTime + getTimeOrigin(), duration, 0));
201
202
  }));
202
203
  //TODO: handle error (though it has no Error API nor any useful information)
203
204
  //xhr.addEventListener('error', (e) => {})
package/lib/utils.d.ts CHANGED
@@ -17,3 +17,19 @@ export declare function hasOpenreplayAttribute(e: Element, attr: string): boolea
17
17
  export declare function canAccessIframe(iframe: HTMLIFrameElement): boolean;
18
18
  export declare function generateRandomId(len?: number): string;
19
19
  export declare function inIframe(): boolean;
20
+ /**
21
+ * Because angular devs decided that its a good idea to override a browser apis
22
+ * we need to use this to achieve safe behavior
23
+ * */
24
+ export declare function ngSafeBrowserMethod(method: string): string;
25
+ export declare function createMutationObserver(cb: MutationCallback): MutationObserver;
26
+ export declare function createEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean): void;
27
+ export declare function deleteEventListener(target: EventTarget, event: string, cb: EventListenerOrEventListenerObject, capture?: boolean): void;
28
+ /**
29
+ * This is a brief polyfill that suits our needs
30
+ * I took inspiration from Microsoft Clarity polyfill on this one
31
+ * then adapted it a little bit
32
+ *
33
+ * I'm very grateful for their bright idea
34
+ * */
35
+ export declare function requestIdleCb(callback: () => void): number | undefined;
package/lib/utils.js CHANGED
@@ -89,3 +89,50 @@ export function inIframe() {
89
89
  return true;
90
90
  }
91
91
  }
92
+ /**
93
+ * Because angular devs decided that its a good idea to override a browser apis
94
+ * we need to use this to achieve safe behavior
95
+ * */
96
+ export function ngSafeBrowserMethod(method) {
97
+ // @ts-ignore
98
+ return window.Zone && '__symbol__' in window.Zone
99
+ ? // @ts-ignore
100
+ window['Zone']['__symbol__'](method)
101
+ : method;
102
+ }
103
+ export function createMutationObserver(cb) {
104
+ const mObserver = ngSafeBrowserMethod('MutationObserver');
105
+ return new window[mObserver](cb);
106
+ }
107
+ export function createEventListener(target, event, cb, capture) {
108
+ const safeAddEventListener = ngSafeBrowserMethod('addEventListener');
109
+ target[safeAddEventListener](event, cb, capture);
110
+ }
111
+ export function deleteEventListener(target, event, cb, capture) {
112
+ const safeRemoveEventListener = ngSafeBrowserMethod('removeEventListener');
113
+ target[safeRemoveEventListener](event, cb, capture);
114
+ }
115
+ /**
116
+ * This is a brief polyfill that suits our needs
117
+ * I took inspiration from Microsoft Clarity polyfill on this one
118
+ * then adapted it a little bit
119
+ *
120
+ * I'm very grateful for their bright idea
121
+ * */
122
+ export function requestIdleCb(callback) {
123
+ const taskTimeout = 3000;
124
+ if (window.requestIdleCallback) {
125
+ return window.requestIdleCallback(callback, { timeout: taskTimeout });
126
+ }
127
+ else {
128
+ const channel = new MessageChannel();
129
+ const incoming = channel.port1;
130
+ const outgoing = channel.port2;
131
+ incoming.onmessage = () => {
132
+ callback();
133
+ };
134
+ requestAnimationFrame(() => {
135
+ outgoing.postMessage(1);
136
+ });
137
+ }
138
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@openreplay/tracker",
3
3
  "description": "The OpenReplay tracker main package",
4
- "version": "9.0.12",
4
+ "version": "10.0.2",
5
5
  "keywords": [
6
6
  "logging",
7
7
  "replay"
@@ -19,40 +19,40 @@
19
19
  "tscRun": "tsc -b src/main && tsc -b src/webworker && tsc --project src/main/tsconfig-cjs.json",
20
20
  "rollup": "rollup --config rollup.config.js",
21
21
  "compile": "node --experimental-modules --experimental-json-modules scripts/compile.cjs",
22
- "build": "npm run clean && npm run tscRun && npm run rollup && npm run compile",
22
+ "build": "bun run clean && bun run tscRun && bun run rollup && bun run compile",
23
23
  "prepare": "cd ../../ && husky install tracker/.husky/",
24
24
  "lint-front": "lint-staged",
25
25
  "test": "jest --coverage=false",
26
26
  "test:ci": "jest --coverage=true",
27
- "postversion": "npm run build",
28
- "prepublishOnly": "npm run build"
27
+ "postversion": "bun run build",
28
+ "prepublishOnly": "bun run build"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/core": "^7.10.2",
32
32
  "@jest/globals": "^29.3.1",
33
- "@rollup/plugin-babel": "^5.0.3",
34
- "@rollup/plugin-node-resolve": "^10.0.0",
33
+ "@rollup/plugin-babel": "^6.0.4",
34
+ "@rollup/plugin-node-resolve": "^15.2.3",
35
35
  "@typescript-eslint/eslint-plugin": "^5.30.0",
36
36
  "@typescript-eslint/parser": "^5.30.0",
37
37
  "eslint": "^7.8.0",
38
- "eslint-config-prettier": "^8.5.0",
39
- "eslint-plugin-prettier": "^4.2.1",
38
+ "eslint-config-prettier": "^9.0.0",
39
+ "eslint-plugin-prettier": "^5.0.1",
40
40
  "husky": "^8.0.1",
41
41
  "jest": "^29.3.1",
42
42
  "jest-environment-jsdom": "^29.3.1",
43
43
  "lint-staged": "^13.0.3",
44
- "prettier": "^2.7.1",
44
+ "prettier": "^3.0.3",
45
45
  "replace-in-files": "^2.0.3",
46
- "rollup": "^2.59.0",
47
- "rollup-plugin-terser": "^6.1.0",
46
+ "rollup": "^4.1.4",
47
+ "rollup-plugin-terser": "^7.0.2",
48
48
  "semver": "^6.3.0",
49
49
  "ts-jest": "^29.0.3",
50
50
  "typescript": "^4.9.4"
51
51
  },
52
52
  "dependencies": {
53
- "@medv/finder": "^3.0.0",
53
+ "@medv/finder": "^3.1.0",
54
54
  "error-stack-parser": "^2.0.6",
55
- "fflate": "^0.7.4"
55
+ "fflate": "^0.8.1"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=14.0"
package/rollup.config.js CHANGED
@@ -1,6 +1,6 @@
1
- import resolve from '@rollup/plugin-node-resolve';
2
- import babel from '@rollup/plugin-babel';
3
- import { terser } from 'rollup-plugin-terser';
1
+ import resolve from '@rollup/plugin-node-resolve'
2
+ import { babel } from '@rollup/plugin-babel'
3
+ import { terser } from 'rollup-plugin-terser'
4
4
 
5
5
  export default {
6
6
  input: 'build/webworker/index.js',
@@ -9,4 +9,4 @@ export default {
9
9
  format: 'cjs',
10
10
  },
11
11
  plugins: [resolve(), babel({ babelHelpers: 'bundled' }), terser({ mangle: { reserved: ['$'] } })],
12
- };
12
+ }