@percy/core 1.0.0-beta.73 → 1.0.0-beta.74
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/dist/utils.js +10 -8
- package/package.json +6 -6
package/dist/utils.js
CHANGED
|
@@ -155,14 +155,16 @@ function waitFor(predicate, options) {
|
|
|
155
155
|
timeout: options
|
|
156
156
|
} : options || {};
|
|
157
157
|
return generatePromise(async function* check(start, done) {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
while (true) {
|
|
159
|
+
if (timeout && Date.now() - start >= timeout) {
|
|
160
|
+
throw new Error(`Timeout of ${timeout}ms exceeded.`);
|
|
161
|
+
} else if (!predicate()) {
|
|
162
|
+
yield new Promise(r => setTimeout(r, poll, done = false));
|
|
163
|
+
} else if (idle && !done) {
|
|
164
|
+
yield new Promise(r => setTimeout(r, idle, done = true));
|
|
165
|
+
} else {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
166
168
|
}
|
|
167
169
|
}(Date.now()));
|
|
168
170
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.74",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"test:types": "tsd"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@percy/client": "1.0.0-beta.
|
|
34
|
-
"@percy/config": "1.0.0-beta.
|
|
35
|
-
"@percy/dom": "1.0.0-beta.
|
|
36
|
-
"@percy/logger": "1.0.0-beta.
|
|
33
|
+
"@percy/client": "1.0.0-beta.74",
|
|
34
|
+
"@percy/config": "1.0.0-beta.74",
|
|
35
|
+
"@percy/dom": "1.0.0-beta.74",
|
|
36
|
+
"@percy/logger": "1.0.0-beta.74",
|
|
37
37
|
"cross-spawn": "^7.0.3",
|
|
38
38
|
"extract-zip": "^2.0.1",
|
|
39
39
|
"rimraf": "^3.0.2",
|
|
40
40
|
"ws": "^8.0.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "f8d1e38e93e5d731b8519d3fa8637e8a478efcde"
|
|
43
43
|
}
|