@percy/sdk-utils 1.0.0-beta.76 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ This object contains information about the local Percy environment and is update
21
21
  [`isPercyEnabled`](#ispercyenabled) is called for the first time.
22
22
 
23
23
  ``` js
24
- const { percy } = require('@percy/sdk-utils')
24
+ import { percy } from '@percy/sdk-utils'
25
25
 
26
26
  // reflects/updates process.env.PERCY_SERVER_ADDRESS
27
27
  percy.address === 'http://localhost:5338'
@@ -47,7 +47,7 @@ log a message unless the CLI loglevel is `quiet` or `silent`. Upon a successful
47
47
  remote logging connection is also established.
48
48
 
49
49
  ``` js
50
- const { isPercyEnabled } = require('@percy/sdk-utils')
50
+ import { isPercyEnabled } from '@percy/sdk-utils'
51
51
 
52
52
  // CLI API not running
53
53
  await isPercyEnabled() === false
@@ -64,7 +64,7 @@ resulting string can be evaulated within a browser context to add the `PercyDOM.
64
64
  to the global scope. Subsequent calls return the first cached result.
65
65
 
66
66
  ``` js
67
- const { fetchPercyDOM } = require('@percy/sdk-utils')
67
+ import { fetchPercyDOM } from '@percy/sdk-utils'
68
68
 
69
69
  let script = await fetchPercyDOM()
70
70
 
@@ -84,7 +84,7 @@ browser.executeScript(script)
84
84
  Posts snapshot options to the local Percy API server.
85
85
 
86
86
  ``` js
87
- const { postSnapshot } = require('@percy/sdk-utils')
87
+ import { postSnapshot } from '@percy/sdk-utils'
88
88
 
89
89
  await postSnapshot({
90
90
  // required
@@ -106,7 +106,7 @@ await postSnapshot({
106
106
  Sends a request to the local Percy API server. Used internally by the other SDK utils.
107
107
 
108
108
  ``` js
109
- const { request } = require('@percy/sdk-utils')
109
+ import { request } from '@percy/sdk-utils'
110
110
 
111
111
  await request('/percy/idle')
112
112
  await request('/percy/stop')
@@ -122,7 +122,7 @@ The returned object must contain the following normalized properties from the re
122
122
  `status`, `statusText`, `headers`, `body`
123
123
 
124
124
  ``` js
125
- const { request } = require('@percy/sdk-utils')
125
+ import { request } from '@percy/sdk-utils'
126
126
 
127
127
  // Cypress SDK example
128
128
  request.fetch = async function fetch(url, options) {