From d84c57216497de68046af50ccf76d9c863876a24 Mon Sep 17 00:00:00 2001 From: Andrew Hyndman Date: Fri, 6 May 2022 19:09:02 -0700 Subject: [PATCH 1/2] Migrate package to @dropbox scope! --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec09afd..73ee13d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@dropbox-performance/ttvc", + "name": "@dropbox/ttvc", "version": "0.1.0", "description": "Measure Visually Complete metrics in real time", "repository": "git@github.com:dropbox/ttvc.git", From a41fdb78c53fd1c340bc7d9c73ab88e039efb989 Mon Sep 17 00:00:00 2001 From: Andrew Hyndman Date: Tue, 10 May 2022 14:12:24 -0700 Subject: [PATCH 2/2] Replace README references @dropbox-performance -> @dropbox --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 748ba3f..b4f4677 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # `ttvc`

- - - - + + + +

- [Overview](#overview) @@ -35,11 +35,11 @@ Visually Complete measures the moment in time when users perceive that all the v This library is available from npm. Add it to your project using the `npm` or `yarn` package managers. ``` -$ npm install @dropbox-performance/ttvc +$ npm install @dropbox/ttvc ``` ``` -$ yarn add @dropbox-performance/ttvc +$ yarn add @dropbox/ttvc ``` ## Usage @@ -47,7 +47,7 @@ $ yarn add @dropbox-performance/ttvc ### Basic usage ```js -import {init, getTTVC} from '@dropbox-performance/ttvc'; +import {init, getTTVC} from '@dropbox/ttvc'; // Call this as early in pageload as possible to setup instrumentation. init({ @@ -66,7 +66,7 @@ const unsubscribe = getTTVC((measurement) => { ### Report metrics to a collection endpoint ```js -import {init, getTTVC} from '@dropbox-performance/ttvc'; +import {init, getTTVC} from '@dropbox/ttvc'; init(); @@ -93,7 +93,7 @@ Capture a span using the [Performance Timeline](https://developer.mozilla.org/en NOTE: Setting arbitrary start and end times with `performance.measure` relies on the [User Timing Level 3](https://w3c.github.io/user-timing/) specification. This is not yet adopted by all major browsers. ```js -import {init, getTTVC} from '@dropbox-performance/ttvc'; +import {init, getTTVC} from '@dropbox/ttvc'; init(); @@ -109,7 +109,7 @@ getTTVC(({start, end, duration, detail}: Metric) => { ### Client-side navigation with React Router -@dropbox-performance/ttvc supports measuring client-side navigations! +@dropbox/ttvc supports measuring client-side navigations! What counts as navigation may be different in each application, but as long as you signal that a navigation has begun, this library can figure out the rest. @@ -117,7 +117,7 @@ To trigger a new navigation measurement, simply dispatch a "locationchange" even ```js // analytics.js -import {init, getTTVC} from '@dropbox-performance/ttvc'; +import {init, getTTVC} from '@dropbox/ttvc'; init(); @@ -248,7 +248,7 @@ window.fetch = (...args) => { ## Browser Support -`@dropbox-performance/ttvc` relies on the following browser features. +`@dropbox/ttvc` relies on the following browser features. - [ES6 syntax](https://262.ecma-international.org/6.0/) - [async/await syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)