@percy/cli-build 1.20.3 → 1.21.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.
- package/dist/wait.js +8 -2
- package/package.json +3 -3
package/dist/wait.js
CHANGED
|
@@ -34,6 +34,10 @@ export const wait = command('wait', {
|
|
|
34
34
|
name: 'fail-on-changes',
|
|
35
35
|
description: 'Exit with an error when diffs are found',
|
|
36
36
|
short: 'f'
|
|
37
|
+
}, {
|
|
38
|
+
name: 'pass-if-approved',
|
|
39
|
+
description: "Doesn't exit with an error if the build is approved, regardless of if diffs are found.",
|
|
40
|
+
inclusive: ['fail-on-changes']
|
|
37
41
|
}],
|
|
38
42
|
examples: ['$0 --build 2222222', '$0 --project org/project --commit HEAD'],
|
|
39
43
|
percy: true
|
|
@@ -118,14 +122,16 @@ function failureMessage(type, {
|
|
|
118
122
|
function isFailing({
|
|
119
123
|
attributes: {
|
|
120
124
|
state,
|
|
125
|
+
'review-state': reviewState,
|
|
121
126
|
'total-comparisons-diff': diffs
|
|
122
127
|
} = {}
|
|
123
128
|
} = {}, {
|
|
124
|
-
failOnChanges
|
|
129
|
+
failOnChanges,
|
|
130
|
+
passIfApproved
|
|
125
131
|
}) {
|
|
126
132
|
// not pending and not processing
|
|
127
133
|
return state != null && state !== 'pending' && state !== 'processing' && (
|
|
128
134
|
// not finished or finished with diffs
|
|
129
|
-
state !== 'finished' || failOnChanges && !!diffs);
|
|
135
|
+
state !== 'finished' || failOnChanges && !!diffs && !(passIfApproved && reviewState === 'approved'));
|
|
130
136
|
}
|
|
131
137
|
export default wait;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@percy/cli-build",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
]
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@percy/cli-command": "1.
|
|
35
|
+
"@percy/cli-command": "1.21.0"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "44c63a3214f1fbfb0b1adcb6fcfe284a9f54d0cb"
|
|
38
38
|
}
|