@atlaskit/react-ufo 3.1.3 → 3.1.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
|
+
## 3.1.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#121016](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/121016)
|
|
8
|
+
[`1e57491bd2e34`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1e57491bd2e34) -
|
|
9
|
+
Allowing 'other' type of requests with .js to have information of cache calculated
|
|
10
|
+
|
|
3
11
|
## 3.1.3
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -13,13 +13,13 @@ var _config2 = require("./common/utils/config");
|
|
|
13
13
|
var _resourceTimingBuffer = require("./common/utils/resource-timing-buffer");
|
|
14
14
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
15
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
|
-
var
|
|
16
|
+
var alwaysCacheableTypes = ['script', 'link'];
|
|
17
17
|
var resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
18
18
|
var CACHE_NETWORK = 'network';
|
|
19
19
|
var CACHE_MEMORY = 'memory';
|
|
20
20
|
var CACHE_DISK = 'disk';
|
|
21
21
|
var isCacheableType = function isCacheableType(url, type) {
|
|
22
|
-
if (
|
|
22
|
+
if (alwaysCacheableTypes.includes(type)) {
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
25
|
if (type === 'other' && url.includes('.js') && (0, _platformFeatureFlags.fg)('ufo_support_other_resource_type_js')) {
|
|
@@ -93,7 +93,7 @@ var getNetworkData = function getNetworkData(item, eventStart) {
|
|
|
93
93
|
if (!hasAccessToResourceSize(name, initiatorType, item, hasTimingHeaders)) {
|
|
94
94
|
return {};
|
|
95
95
|
}
|
|
96
|
-
if (
|
|
96
|
+
if (isCacheableType(name, initiatorType)) {
|
|
97
97
|
var transferType = calculateTransferType(name, initiatorType, duration, transferSize);
|
|
98
98
|
return _objectSpread({
|
|
99
99
|
ttfb: ttfb,
|
|
@@ -3,13 +3,13 @@ import { getConfig as getConfigUFO } from '../config';
|
|
|
3
3
|
import { roundEpsilon } from '../round-number';
|
|
4
4
|
import { getConfig } from './common/utils/config';
|
|
5
5
|
import { filterResourceTimings } from './common/utils/resource-timing-buffer';
|
|
6
|
-
const
|
|
6
|
+
const alwaysCacheableTypes = ['script', 'link'];
|
|
7
7
|
const resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
8
8
|
const CACHE_NETWORK = 'network';
|
|
9
9
|
const CACHE_MEMORY = 'memory';
|
|
10
10
|
const CACHE_DISK = 'disk';
|
|
11
11
|
const isCacheableType = (url, type) => {
|
|
12
|
-
if (
|
|
12
|
+
if (alwaysCacheableTypes.includes(type)) {
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
15
15
|
if (type === 'other' && url.includes('.js') && fg('ufo_support_other_resource_type_js')) {
|
|
@@ -76,7 +76,7 @@ const getNetworkData = (item, eventStart, hasTimingHeaders = evaluateAccessToRes
|
|
|
76
76
|
if (!hasAccessToResourceSize(name, initiatorType, item, hasTimingHeaders)) {
|
|
77
77
|
return {};
|
|
78
78
|
}
|
|
79
|
-
if (
|
|
79
|
+
if (isCacheableType(name, initiatorType)) {
|
|
80
80
|
const transferType = calculateTransferType(name, initiatorType, duration, transferSize);
|
|
81
81
|
return {
|
|
82
82
|
ttfb,
|
|
@@ -6,13 +6,13 @@ import { getConfig as getConfigUFO } from '../config';
|
|
|
6
6
|
import { roundEpsilon } from '../round-number';
|
|
7
7
|
import { getConfig } from './common/utils/config';
|
|
8
8
|
import { filterResourceTimings } from './common/utils/resource-timing-buffer';
|
|
9
|
-
var
|
|
9
|
+
var alwaysCacheableTypes = ['script', 'link'];
|
|
10
10
|
var resourceTypes = ['fetch', 'xmlhttprequest'];
|
|
11
11
|
var CACHE_NETWORK = 'network';
|
|
12
12
|
var CACHE_MEMORY = 'memory';
|
|
13
13
|
var CACHE_DISK = 'disk';
|
|
14
14
|
var isCacheableType = function isCacheableType(url, type) {
|
|
15
|
-
if (
|
|
15
|
+
if (alwaysCacheableTypes.includes(type)) {
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
if (type === 'other' && url.includes('.js') && fg('ufo_support_other_resource_type_js')) {
|
|
@@ -86,7 +86,7 @@ var getNetworkData = function getNetworkData(item, eventStart) {
|
|
|
86
86
|
if (!hasAccessToResourceSize(name, initiatorType, item, hasTimingHeaders)) {
|
|
87
87
|
return {};
|
|
88
88
|
}
|
|
89
|
-
if (
|
|
89
|
+
if (isCacheableType(name, initiatorType)) {
|
|
90
90
|
var transferType = calculateTransferType(name, initiatorType, duration, transferSize);
|
|
91
91
|
return _objectSpread({
|
|
92
92
|
ttfb: ttfb,
|