@percy/client 1.30.11-beta.1 → 1.30.11
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/client.js +4 -2
- package/dist/utils.js +5 -0
- package/package.json +5 -5
package/dist/client.js
CHANGED
|
@@ -3,7 +3,7 @@ import PercyEnv from '@percy/env';
|
|
|
3
3
|
import { git } from '@percy/env/utils';
|
|
4
4
|
import logger from '@percy/logger';
|
|
5
5
|
import Pako from 'pako';
|
|
6
|
-
import { pool, request, formatBytes, sha256hash, base64encode, getPackageJSON, waitForTimeout, validateTiles, formatLogErrors, tagsList } from './utils.js';
|
|
6
|
+
import { pool, request, formatBytes, sha256hash, base64encode, getPackageJSON, waitForTimeout, validateTiles, formatLogErrors, tagsList, normalizeBrowsers } from './utils.js';
|
|
7
7
|
|
|
8
8
|
// Default client API URL can be set with an env var for API development
|
|
9
9
|
const {
|
|
@@ -428,6 +428,7 @@ export class PercyClient {
|
|
|
428
428
|
testCase,
|
|
429
429
|
labels,
|
|
430
430
|
thTestCaseExecutionId,
|
|
431
|
+
browsers,
|
|
431
432
|
regions,
|
|
432
433
|
algorithm,
|
|
433
434
|
algorithmConfiguration,
|
|
@@ -463,7 +464,8 @@ export class PercyClient {
|
|
|
463
464
|
'minimum-height': minHeight || null,
|
|
464
465
|
'enable-javascript': enableJavaScript || null,
|
|
465
466
|
'enable-layout': enableLayout || false,
|
|
466
|
-
'th-test-case-execution-id': thTestCaseExecutionId || null
|
|
467
|
+
'th-test-case-execution-id': thTestCaseExecutionId || null,
|
|
468
|
+
browsers: normalizeBrowsers(browsers) || null
|
|
467
469
|
},
|
|
468
470
|
relationships: {
|
|
469
471
|
resources: {
|
package/dist/utils.js
CHANGED
|
@@ -4,6 +4,7 @@ import url from 'url';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import crypto from 'crypto';
|
|
6
6
|
import logger from '@percy/logger';
|
|
7
|
+
import { snakecase } from '@percy/config/utils';
|
|
7
8
|
|
|
8
9
|
// Formats a raw byte integer as a string
|
|
9
10
|
export function formatBytes(int) {
|
|
@@ -280,4 +281,8 @@ export function tagsList(tags) {
|
|
|
280
281
|
}
|
|
281
282
|
return tagsArr;
|
|
282
283
|
}
|
|
284
|
+
export function normalizeBrowsers(browserValues) {
|
|
285
|
+
if (!browserValues) return null;
|
|
286
|
+
return browserValues.map(browser => snakecase(browser));
|
|
287
|
+
}
|
|
283
288
|
export { hostnameMatches, getProxy, ProxyHttpAgent, ProxyHttpsAgent, proxyAgentFor } from './proxy.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/client",
|
|
3
|
-
"version": "1.30.11
|
|
3
|
+
"version": "1.30.11",
|
|
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": "
|
|
12
|
+
"tag": "latest"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=14"
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"test:coverage": "yarn test --coverage"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@percy/env": "1.30.11
|
|
37
|
-
"@percy/logger": "1.30.11
|
|
36
|
+
"@percy/env": "1.30.11",
|
|
37
|
+
"@percy/logger": "1.30.11",
|
|
38
38
|
"pac-proxy-agent": "^7.0.2",
|
|
39
39
|
"pako": "^2.1.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "b2fe707b51d1fb1ad6d098070ce017864d6b2f11"
|
|
42
42
|
}
|