@shopify/performance
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -9,2 +9,3 @@ 'use strict'; | ||
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,3 +113,3 @@ class Navigation { | ||
const processedEvents = removeEventMetadata ? events.map(_ref => { | ||
let rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, ["metadata"]); | ||
let rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded); | ||
@@ -115,0 +116,0 @@ return rest; |
@@ -39,3 +39,3 @@ import { now } from './utilities'; | ||
replaceExisting = false) { | ||
const normalizedEvent = Object.assign(Object.assign({}, event), { start: this.normalize(event.start) }); | ||
const normalizedEvent = { ...event, start: this.normalize(event.start) }; | ||
if (replaceExisting) { | ||
@@ -42,0 +42,0 @@ const check = typeof replaceExisting === 'function' |
@@ -68,6 +68,3 @@ import { EventType, } from './types'; | ||
const processedEvents = removeEventMetadata | ||
? events.map((_a) => { | ||
var { metadata } = _a, rest = __rest(_a, ["metadata"]); | ||
return rest; | ||
}) | ||
? events.map(({ metadata, ...rest }) => rest) | ||
: events; | ||
@@ -74,0 +71,0 @@ return { |
@@ -1,1 +0,4 @@ | ||
module.exports = require("./build/cjs/index.js"); | ||
function interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : {default: obj}; | ||
} | ||
module.exports = interopRequireDefault(require("./build/cjs/index.js")); |
{ | ||
"name": "@shopify/performance", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"license": "MIT", | ||
"description": "Primitives for collecting browser performance metrics", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"types": "./build/ts/index.d.ts", | ||
"sideEffects": false, | ||
@@ -31,4 +31,3 @@ "publishConfig": { | ||
"index.mjs", | ||
"index.esnext", | ||
"index.d.ts" | ||
"index.esnext" | ||
], | ||
@@ -45,3 +44,3 @@ "module": "index.mjs", | ||
}, | ||
"gitHead": "0edc9e3b7df7b6a4805cc3ff1443641cdb8e8a72" | ||
"gitHead": "c7d64cb78303f2752c172f6df52b78bc56bebd40" | ||
} |
@@ -34,3 +34,3 @@ # `@shopify/performance` | ||
// "navigation", your handler will immediately be invoked with that object. | ||
performance.on('navigation', navigation => {}); | ||
performance.on('navigation', (navigation) => {}); | ||
@@ -46,3 +46,3 @@ // Listen for the start of new navigations. | ||
// previously-triggered event. | ||
performance.on('lifecycleEvent', event => {}); | ||
performance.on('lifecycleEvent', (event) => {}); | ||
``` | ||
@@ -55,3 +55,3 @@ | ||
'navigation', | ||
navigation => {}, | ||
(navigation) => {}, | ||
); | ||
@@ -58,0 +58,0 @@ |
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
366875
2035
45