@atlaskit/react-ufo 2.0.3 → 2.0.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/ufo-interaction-ignore
2
2
 
3
+ ## 2.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#157826](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/157826)
8
+ [`cd0465f950cb6`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/cd0465f950cb6) -
9
+ Added count of network calls
10
+
3
11
  ## 2.0.3
4
12
 
5
13
  ### Patch Changes
@@ -126,7 +126,11 @@ var getResourceTimings = exports.getResourceTimings = function getResourceTiming
126
126
  return;
127
127
  }
128
128
  var url = resourceTypes.includes(initiatorType) ? sanitiseEndpoints(name) : mapResources(name);
129
- if (!url || resourceTiming[url]) {
129
+ if (!url) {
130
+ return;
131
+ }
132
+ if (resourceTiming[url]) {
133
+ resourceTiming[url].count = (resourceTiming[url].count || 1) + 1;
130
134
  return;
131
135
  }
132
136
  resourceTiming[url] = _objectSpread({
@@ -114,7 +114,11 @@ export const getResourceTimings = (interactionStart, interactionEnd) => {
114
114
  return;
115
115
  }
116
116
  const url = resourceTypes.includes(initiatorType) ? sanitiseEndpoints(name) : mapResources(name);
117
- if (!url || resourceTiming[url]) {
117
+ if (!url) {
118
+ return;
119
+ }
120
+ if (resourceTiming[url]) {
121
+ resourceTiming[url].count = (resourceTiming[url].count || 1) + 1;
118
122
  return;
119
123
  }
120
124
  resourceTiming[url] = {
@@ -119,7 +119,11 @@ export var getResourceTimings = function getResourceTimings(interactionStart, in
119
119
  return;
120
120
  }
121
121
  var url = resourceTypes.includes(initiatorType) ? sanitiseEndpoints(name) : mapResources(name);
122
- if (!url || resourceTiming[url]) {
122
+ if (!url) {
123
+ return;
124
+ }
125
+ if (resourceTiming[url]) {
126
+ resourceTiming[url].count = (resourceTiming[url].count || 1) + 1;
123
127
  return;
124
128
  }
125
129
  resourceTiming[url] = _objectSpread({
@@ -25,6 +25,7 @@ interface BasicResourceTiming {
25
25
  type: string;
26
26
  workerStart: number;
27
27
  fetchStart: number;
28
+ count?: number;
28
29
  }
29
30
  interface CacheableResourceTiming extends BasicResourceTiming {
30
31
  transferType: string;
@@ -25,6 +25,7 @@ interface BasicResourceTiming {
25
25
  type: string;
26
26
  workerStart: number;
27
27
  fetchStart: number;
28
+ count?: number;
28
29
  }
29
30
  interface CacheableResourceTiming extends BasicResourceTiming {
30
31
  transferType: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-ufo",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Parts of React UFO that are publicly available",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",