🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@shopify/performance

Package Overview
Dependencies
Maintainers
25
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/performance - npm Package Compare versions

Comparing version

to
4.2.0

10

build/cjs/performance.js

@@ -13,3 +13,3 @@ 'use strict';

class Performance {
constructor() {
constructor(withCustomNavigation) {
this.supportsObserver = utilities.hasGlobal('PerformanceObserver');

@@ -32,7 +32,13 @@ this.supportsMarks = utilities.hasGlobal('PerformanceMark');

};
this.withCustomNavigation = withCustomNavigation;
this.start({
timeStamp: 0
});
utilities.withNavigation(this.start.bind(this));
if (this.withCustomNavigation) {
this.withCustomNavigation(this);
} else {
utilities.withNavigation(this.start.bind(this));
}
if (this.supportsTimingEntries && (!this.supportsDetailedTime || !this.supportsNavigationEntries)) {

@@ -39,0 +45,0 @@ utilities.withTiming(({

3

build/ts/performance.d.ts

@@ -9,2 +9,3 @@ import type { Navigation } from './navigation';

export declare class Performance {
private withCustomNavigation?;
readonly supportsObserver: boolean;

@@ -26,3 +27,3 @@ readonly supportsMarks: boolean;

private eventHandlers;
constructor();
constructor(withCustomNavigation?: ((perf: Performance) => void) | undefined);
mark(stage: string, id: string): void;

@@ -29,0 +30,0 @@ on<T extends keyof EventMap>(event: T, handler: EventMap[T]): () => boolean;

{
"name": "@shopify/performance",
"version": "4.1.0",
"version": "4.2.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Primitives for collecting browser performance metrics",

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