Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/performance

Package Overview
Dependencies
Maintainers
19
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 2.0.0 to 2.0.1-address-mocks-minified-beta.0

2

build/ts/inflight.js

@@ -44,3 +44,3 @@ import { now } from './utilities';

: MATCHES_CHECK_MAP.get(event.type) || defaultEqualityCheck;
const existingIndex = this.events.findIndex(oldEvent => check(event, oldEvent));
const existingIndex = this.events.findIndex((oldEvent) => check(event, oldEvent));
if (existingIndex >= 0) {

@@ -47,0 +47,0 @@ this.events.splice(existingIndex, 1, normalizedEvent);

@@ -17,3 +17,3 @@ import { Event, NavigationDefinition, NavigationResult, NavigationMetadata, ScriptDownloadEvent, StyleDownloadEvent, EventMap } from './types';

get timeToUsable(): number;
get resourceEvents(): Array<ScriptDownloadEvent | StyleDownloadEvent>;
get resourceEvents(): (ScriptDownloadEvent | StyleDownloadEvent)[];
get totalDownloadSize(): number | undefined;

@@ -20,0 +20,0 @@ get cacheEffectiveness(): number | undefined;

@@ -57,3 +57,3 @@ import { InflightNavigation } from './inflight';

else {
withEntriesOfType('navigation', entry => {
withEntriesOfType('navigation', (entry) => {
this.lifecycleEvent({

@@ -81,3 +81,3 @@ type: EventType.TimeToFirstByte,

if (this.supportsResourceEntries) {
withEntriesOfType('resource', entry => {
withEntriesOfType('resource', (entry) => {
if (!WATCH_RESOURCE_TYPES.includes(entry.initiatorType)) {

@@ -100,3 +100,3 @@ return;

if (this.supportsLongtaskEntries) {
withEntriesOfType('longtask', entry => {
withEntriesOfType('longtask', (entry) => {
this.event({

@@ -110,3 +110,3 @@ type: EventType.LongTask,

if (this.supportsPaintEntries) {
withEntriesOfType('paint', entry => {
withEntriesOfType('paint', (entry) => {
const type = entry.name === 'first-paint'

@@ -119,3 +119,3 @@ ? EventType.TimeToFirstPaint

if (typeof window !== undefined && window.perfMetrics !== undefined) {
window.perfMetrics.onFirstInputDelay(delay => {
window.perfMetrics.onFirstInputDelay((delay) => {
this.lifecycleEvent({

@@ -122,0 +122,0 @@ type: EventType.FirstInputDelay,

@@ -18,10 +18,10 @@ export function referenceTime() {

const initialEntries = performance.getEntriesByType(type);
initialEntries.forEach(entry => handler(entry));
initialEntries.forEach((entry) => handler(entry));
if (!hasGlobal('PerformanceObserver')) {
return;
}
const observer = new PerformanceObserver(entries => {
const observer = new PerformanceObserver((entries) => {
entries
.getEntriesByType(type)
.forEach(entry => handler(entry));
.forEach((entry) => handler(entry));
});

@@ -86,4 +86,4 @@ observer.observe({

const uniqueRanges = new Set();
ranges.forEach(range => {
const overlappingRanges = [...uniqueRanges].filter(otherRange => rangesOverlap(range, otherRange));
ranges.forEach((range) => {
const overlappingRanges = [...uniqueRanges].filter((otherRange) => rangesOverlap(range, otherRange));
for (const overlappingRange of overlappingRanges) {

@@ -90,0 +90,0 @@ uniqueRanges.delete(overlappingRange);

{
"name": "@shopify/performance",
"version": "2.0.0",
"version": "2.0.1-address-mocks-minified-beta.0",
"license": "MIT",

@@ -44,3 +44,3 @@ "description": "Primitives for collecting browser performance metrics",

},
"gitHead": "40de4af181104f298cbab42d2d3d68e228a9a31a"
"gitHead": "1a19759d10db9ca65d346141b10e7b0654e023e6"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc