@percy/cli-snapshot 1.31.13-beta.0 → 1.31.14-beta.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/snapshot.js +12 -2
  2. package/package.json +3 -3
package/dist/snapshot.js CHANGED
@@ -51,7 +51,8 @@ export const snapshot = command('snapshot', {
51
51
  args,
52
52
  flags,
53
53
  log,
54
- exit
54
+ exit,
55
+ shutdown
55
56
  }) {
56
57
  let {
57
58
  include,
@@ -112,7 +113,16 @@ export const snapshot = command('snapshot', {
112
113
  yield* percy.yield.stop();
113
114
  } catch (error) {
114
115
  log.error(error);
115
- await percy.stop(true);
116
+ // See start.js comment — graceful on first signal, force on second;
117
+ // non-signal errors force-stop as before.
118
+ /* istanbul ignore next: the signal-driven branch (error.signal
119
+ truthy → use shutdown.forced) is exercised at the integration
120
+ level by the SIGINT/SIGTERM tests in
121
+ cli-command/test/shutdown.test.js and cli-exec/test/exec.test.js;
122
+ the cli-snapshot suite does not currently emit signals during a
123
+ snapshot run, so this branch is not reached here. */
124
+ let force = error.signal ? !!(shutdown !== null && shutdown !== void 0 && shutdown.forced) : true;
125
+ await percy.stop(force);
116
126
  throw error;
117
127
  }
118
128
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percy/cli-snapshot",
3
- "version": "1.31.13-beta.0",
3
+ "version": "1.31.14-beta.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,8 +33,8 @@
33
33
  ]
34
34
  },
35
35
  "dependencies": {
36
- "@percy/cli-command": "1.31.13-beta.0",
36
+ "@percy/cli-command": "1.31.14-beta.0",
37
37
  "yaml": "^2.0.0"
38
38
  },
39
- "gitHead": "69c6ad10d5724455cebf57f2043adc30559c3b31"
39
+ "gitHead": "a87281473a9f5cb69a3030845cc4d6b4b81509b0"
40
40
  }