@percy/core 1.30.2 → 1.30.3-alpha.0

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.
@@ -0,0 +1,37 @@
1
+ #!/bin/bash
2
+
3
+ function download_url {
4
+ if [[ "$OS" == "Linux" ]]; then
5
+ echo "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${1}%2Fchrome-linux.zip?alt=media"
6
+ elif [[ "$OS" == "Mac" ]] || [[ "$OS" == "Mac_Arm" ]]; then
7
+ echo "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/$OS%2F${1}%2Fchrome-mac.zip?alt=media"
8
+ elif [[ "$OS" == "Win" ]] || [[ "$OS" == "Win_x64" ]]; then
9
+ echo "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/$OS%2F${1}%2Fchrome-win.zip?alt=media"
10
+ fi
11
+ }
12
+
13
+ function get_closest_rev {
14
+ while true; do
15
+ curl -I 2>/dev/null `download_url $REVISION` | head -1 | grep 404 >/dev/null
16
+ if (($? == 1)); then
17
+ break
18
+ fi
19
+ REVISION=$(($REVISION-1))
20
+ done
21
+ echo $REVISION
22
+ }
23
+
24
+
25
+ if (($# < 1)); then
26
+ printf "usage: \n"
27
+ printf " ./get_chromuim [-r] rev - will get chromium by revision\n"
28
+ exit 1
29
+ fi
30
+
31
+ export REVISION=$1
32
+
33
+ for os in "Linux" "Mac" "Mac_Arm" "Win" "Win_x64";
34
+ do
35
+ export OS=$os
36
+ echo "$OS" `get_closest_rev`
37
+ done
package/dist/timing.js ADDED
@@ -0,0 +1,21 @@
1
+ import logger from '@percy/logger';
2
+ export default class TimeIt {
3
+ log = logger('timer');
4
+ // returns a singleton instance
5
+ constructor() {
6
+ let {
7
+ instance = this
8
+ } = this.constructor;
9
+ this.constructor.instance = instance;
10
+ return instance;
11
+ }
12
+ async measure(name, identifier, callback) {
13
+ const startTime = Date.now();
14
+ try {
15
+ return await callback();
16
+ } finally {
17
+ const duration = Date.now() - startTime;
18
+ this.log.debug(`${name} - ${identifier} - ${duration / 1000}s`);
19
+ }
20
+ }
21
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/core",
3
- "version": "1.30.2",
3
+ "version": "1.30.3-alpha.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "publishConfig": {
11
11
  "access": "public",
12
- "tag": "latest"
12
+ "tag": "alpha"
13
13
  },
14
14
  "engines": {
15
15
  "node": ">=14"
@@ -43,11 +43,11 @@
43
43
  "test:types": "tsd"
44
44
  },
45
45
  "dependencies": {
46
- "@percy/client": "1.30.2",
47
- "@percy/config": "1.30.2",
48
- "@percy/dom": "1.30.2",
49
- "@percy/logger": "1.30.2",
50
- "@percy/webdriver-utils": "1.30.2",
46
+ "@percy/client": "1.30.3-alpha.0",
47
+ "@percy/config": "1.30.3-alpha.0",
48
+ "@percy/dom": "1.30.3-alpha.0",
49
+ "@percy/logger": "1.30.3-alpha.0",
50
+ "@percy/webdriver-utils": "1.30.3-alpha.0",
51
51
  "content-disposition": "^0.5.4",
52
52
  "cross-spawn": "^7.0.3",
53
53
  "extract-zip": "^2.0.1",
@@ -60,5 +60,5 @@
60
60
  "ws": "^8.17.1",
61
61
  "yaml": "^2.4.1"
62
62
  },
63
- "gitHead": "160670ddfcea48d1bf5ad122bf13fe09b75460e1"
63
+ "gitHead": "3d149589bee147703e4e884d4cac689eaaad805d"
64
64
  }