@percy/cli-build 1.6.4 → 1.7.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.
Files changed (2) hide show
  1. package/dist/wait.js +8 -6
  2. package/package.json +3 -3
package/dist/wait.js CHANGED
@@ -10,7 +10,6 @@ export const wait = command('wait', {
10
10
  }, {
11
11
  name: 'project',
12
12
  description: 'Build project slug, requires \'--commit\'',
13
- requires: ['commit'],
14
13
  type: 'slug',
15
14
  short: 'p'
16
15
  }, {
@@ -74,9 +73,12 @@ function logProgress({
74
73
  'total-comparisons': total,
75
74
  'total-comparisons-diff': diffs,
76
75
  'total-comparisons-finished': finished
77
- }
78
- }, log) {
76
+ } = {}
77
+ } = {}, log) {
79
78
  switch (state) {
79
+ case undefined:
80
+ return log.progress('Waiting for build...');
81
+
80
82
  case 'pending':
81
83
  return log.progress('Recieving snapshots...');
82
84
 
@@ -125,12 +127,12 @@ function isFailing({
125
127
  attributes: {
126
128
  state,
127
129
  'total-comparisons-diff': diffs
128
- }
129
- }, {
130
+ } = {}
131
+ } = {}, {
130
132
  failOnChanges
131
133
  }) {
132
134
  // not pending and not processing
133
- return state !== 'pending' && state !== 'processing' && ( // not finished or finished with diffs
135
+ return state != null && state !== 'pending' && state !== 'processing' && ( // not finished or finished with diffs
134
136
  state !== 'finished' || failOnChanges && !!diffs);
135
137
  }
136
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/cli-build",
3
- "version": "1.6.4",
3
+ "version": "1.7.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.6.4"
35
+ "@percy/cli-command": "1.7.0"
36
36
  },
37
- "gitHead": "651c0fad62f128053723f9b8d565c69496dc51e4"
37
+ "gitHead": "f1418fb1effdaad2d32c65d1a358282ab1f9ec32"
38
38
  }