@shopify/performance
Advanced tools
Comparing version 2.0.14 to 3.0.0
@@ -5,3 +5,2 @@ 'use strict'; | ||
var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js'); | ||
var utilities = require('./utilities.js'); | ||
@@ -53,5 +52,5 @@ var types = require('./types.js'); | ||
replaceExisting = false) { | ||
const normalizedEvent = _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, event), {}, { | ||
const normalizedEvent = { ...event, | ||
start: this.normalize(event.start) | ||
}); | ||
}; | ||
@@ -58,0 +57,0 @@ if (replaceExisting) { |
@@ -5,7 +5,5 @@ 'use strict'; | ||
var _rollupPluginBabelHelpers = require('./_virtual/_rollupPluginBabelHelpers.js'); | ||
var types = require('./types.js'); | ||
var utilities = require('./utilities.js'); | ||
const _excluded = ["metadata"]; | ||
const LIFECYCLE_EVENTS = [types.EventType.TimeToFirstByte, types.EventType.TimeToFirstPaint, types.EventType.TimeToFirstContentfulPaint, types.EventType.DomContentLoaded, types.EventType.FirstInputDelay, types.EventType.Load]; | ||
@@ -112,7 +110,6 @@ class Navigation { | ||
}) => !LIFECYCLE_EVENTS.includes(type)) : this.events; | ||
const processedEvents = removeEventMetadata ? events.map(_ref => { | ||
let rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded); | ||
return rest; | ||
}) : events; | ||
const processedEvents = removeEventMetadata ? events.map(({ | ||
metadata, | ||
...rest | ||
}) => rest) : events; | ||
return { | ||
@@ -119,0 +116,0 @@ start: this.start, |
@@ -167,4 +167,4 @@ 'use strict'; | ||
if (event === 'lifecycleEvent') { | ||
for (const _event of this.lifecycleEvents) { | ||
handler(_event); | ||
for (const event of this.lifecycleEvents) { | ||
handler(event); | ||
} | ||
@@ -171,0 +171,0 @@ } |
{ | ||
"name": "@shopify/performance", | ||
"version": "2.0.14", | ||
"version": "3.0.0", | ||
"license": "MIT", | ||
@@ -24,3 +24,3 @@ "description": "Primitives for collecting browser performance metrics", | ||
"engines": { | ||
"node": ">=12.14.0" | ||
"node": "^14.17.0 || >=16.0.0" | ||
}, | ||
@@ -42,6 +42,5 @@ "files": [ | ||
"require": "./index.js" | ||
}, | ||
"./*": "./*" | ||
} | ||
}, | ||
"gitHead": "70feded397084daea784a8c5a523a61ac4fdb34c" | ||
"gitHead": "ef9afc562672dcda9d7800753dc6b777ecd2d751" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
82838
36
1361