cypress 5.1.0 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
package/lib/util.js CHANGED
@@ -1,90 +1,57 @@
1
1
  "use strict";
2
2
 
3
- function _templateObject2() {
4
- var data = _taggedTemplateLiteral(["\n Platform: ", " (", ")\n Cypress Version: ", "\n "]);
3
+ const _ = require('lodash');
5
4
 
6
- _templateObject2 = function _templateObject2() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
14
-
15
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
16
-
17
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
18
-
19
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
20
-
21
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
22
-
23
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
24
-
25
- function _templateObject() {
26
- var data = _taggedTemplateLiteral(["\n\n ", " Warning: Cypress failed to start.\n\n This is likely due to a misconfigured DISPLAY environment variable.\n\n DISPLAY was set to: \"", "\"\n\n Cypress will attempt to fix the problem and rerun.\n "]);
27
-
28
- _templateObject = function _templateObject() {
29
- return data;
30
- };
31
-
32
- return data;
33
- }
5
+ const R = require('ramda');
34
6
 
35
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
7
+ const os = require('os');
36
8
 
37
- var _ = require('lodash');
9
+ const ospath = require('ospath');
38
10
 
39
- var R = require('ramda');
11
+ const crypto = require('crypto');
40
12
 
41
- var os = require('os');
13
+ const la = require('lazy-ass');
42
14
 
43
- var ospath = require('ospath');
15
+ const is = require('check-more-types');
44
16
 
45
- var crypto = require('crypto');
17
+ const tty = require('tty');
46
18
 
47
- var la = require('lazy-ass');
19
+ const path = require('path');
48
20
 
49
- var is = require('check-more-types');
21
+ const isCi = require('is-ci');
50
22
 
51
- var tty = require('tty');
23
+ const execa = require('execa');
52
24
 
53
- var path = require('path');
25
+ const getos = require('getos');
54
26
 
55
- var _isCi = require('is-ci');
27
+ const chalk = require('chalk');
56
28
 
57
- var execa = require('execa');
29
+ const Promise = require('bluebird');
58
30
 
59
- var getos = require('getos');
31
+ const cachedir = require('cachedir');
60
32
 
61
- var chalk = require('chalk');
33
+ const logSymbols = require('log-symbols');
62
34
 
63
- var Promise = require('bluebird');
35
+ const executable = require('executable');
64
36
 
65
- var cachedir = require('cachedir');
37
+ const {
38
+ stripIndent
39
+ } = require('common-tags');
66
40
 
67
- var logSymbols = require('log-symbols');
41
+ const supportsColor = require('supports-color');
68
42
 
69
- var executable = require('executable');
43
+ const isInstalledGlobally = require('is-installed-globally');
70
44
 
71
- var _require = require('common-tags'),
72
- stripIndent = _require.stripIndent;
45
+ const pkg = require(path.join(__dirname, '..', 'package.json'));
73
46
 
74
- var _supportsColor = require('supports-color');
47
+ const logger = require('./logger');
75
48
 
76
- var _isInstalledGlobally = require('is-installed-globally');
49
+ const debug = require('debug')('cypress:cli');
77
50
 
78
- var pkg = require(path.join(__dirname, '..', 'package.json'));
51
+ const fs = require('./fs');
79
52
 
80
- var logger = require('./logger');
81
-
82
- var debug = require('debug')('cypress:cli');
83
-
84
- var fs = require('./fs');
85
-
86
- var issuesUrl = 'https://github.com/cypress-io/cypress/issues';
87
- var getosAsync = Promise.promisify(getos);
53
+ const issuesUrl = 'https://github.com/cypress-io/cypress/issues';
54
+ const getosAsync = Promise.promisify(getos);
88
55
  /**
89
56
  * Returns SHA512 of a file
90
57
  *
@@ -92,36 +59,35 @@ var getosAsync = Promise.promisify(getos);
92
59
  * but without bringing that dependency (since hasha is Node v8+)
93
60
  */
94
61
 
95
- var getFileChecksum = function getFileChecksum(filename) {
62
+ const getFileChecksum = filename => {
96
63
  la(is.unemptyString(filename), 'expected filename', filename);
97
64
 
98
- var hashStream = function hashStream() {
99
- var s = crypto.createHash('sha512');
65
+ const hashStream = () => {
66
+ const s = crypto.createHash('sha512');
100
67
  s.setEncoding('hex');
101
68
  return s;
102
69
  };
103
70
 
104
- return new Promise(function (resolve, reject) {
105
- var stream = fs.createReadStream(filename);
71
+ return new Promise((resolve, reject) => {
72
+ const stream = fs.createReadStream(filename);
106
73
  stream.on('error', reject).pipe(hashStream()).on('error', reject).on('finish', function () {
107
74
  resolve(this.read());
108
75
  });
109
76
  });
110
77
  };
111
78
 
112
- var getFileSize = function getFileSize(filename) {
79
+ const getFileSize = filename => {
113
80
  la(is.unemptyString(filename), 'expected filename', filename);
114
81
  return fs.statAsync(filename).get('size');
115
82
  };
116
83
 
117
- var isBrokenGtkDisplayRe = /Gtk: cannot open display/;
84
+ const isBrokenGtkDisplayRe = /Gtk: cannot open display/;
118
85
 
119
- var stringify = function stringify(val) {
86
+ const stringify = val => {
120
87
  return _.isObject(val) ? JSON.stringify(val) : val;
121
88
  };
122
89
 
123
- function normalizeModuleOptions() {
124
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
90
+ function normalizeModuleOptions(options = {}) {
125
91
  return _.mapValues(options, stringify);
126
92
  }
127
93
  /**
@@ -130,7 +96,7 @@ function normalizeModuleOptions() {
130
96
  */
131
97
 
132
98
 
133
- var isLinux = function isLinux() {
99
+ const isLinux = () => {
134
100
  return os.platform() === 'linux';
135
101
  };
136
102
  /**
@@ -142,24 +108,33 @@ var isLinux = function isLinux() {
142
108
  */
143
109
 
144
110
 
145
- var isBrokenGtkDisplay = function isBrokenGtkDisplay(str) {
111
+ const isBrokenGtkDisplay = str => {
146
112
  return isBrokenGtkDisplayRe.test(str);
147
113
  };
148
114
 
149
- var isPossibleLinuxWithIncorrectDisplay = function isPossibleLinuxWithIncorrectDisplay() {
115
+ const isPossibleLinuxWithIncorrectDisplay = () => {
150
116
  return isLinux() && process.env.DISPLAY;
151
117
  };
152
118
 
153
- var logBrokenGtkDisplayWarning = function logBrokenGtkDisplayWarning() {
119
+ const logBrokenGtkDisplayWarning = () => {
154
120
  debug('Cypress exited due to a broken gtk display because of a potential invalid DISPLAY env... retrying after starting Xvfb'); // if we get this error, we are on Linux and DISPLAY is set
155
121
 
156
- logger.warn(stripIndent(_templateObject(), logSymbols.warning, process.env.DISPLAY));
122
+ logger.warn(stripIndent`
123
+
124
+ ${logSymbols.warning} Warning: Cypress failed to start.
125
+
126
+ This is likely due to a misconfigured DISPLAY environment variable.
127
+
128
+ DISPLAY was set to: "${process.env.DISPLAY}"
129
+
130
+ Cypress will attempt to fix the problem and rerun.
131
+ `);
157
132
  logger.warn();
158
133
  };
159
134
 
160
135
  function stdoutLineMatches(expectedLine, stdout) {
161
- var lines = stdout.split('\n').map(R.trim);
162
- var lineMatches = R.equals(expectedLine);
136
+ const lines = stdout.split('\n').map(R.trim);
137
+ const lineMatches = R.equals(expectedLine);
163
138
  return lines.some(lineMatches);
164
139
  }
165
140
  /**
@@ -178,7 +153,7 @@ function isValidCypressInternalEnvValue(value) {
178
153
  } // names of config environments, see "packages/server/config/app.yml"
179
154
 
180
155
 
181
- var names = ['development', 'test', 'staging', 'production'];
156
+ const names = ['development', 'test', 'staging', 'production'];
182
157
  return _.includes(names, value);
183
158
  }
184
159
  /**
@@ -199,9 +174,7 @@ function isNonProductionCypressInternalEnvValue(value) {
199
174
  */
200
175
 
201
176
 
202
- function printNodeOptions() {
203
- var log = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : debug;
204
-
177
+ function printNodeOptions(log = debug) {
205
178
  if (!log.enabled) {
206
179
  return;
207
180
  }
@@ -228,7 +201,7 @@ function printNodeOptions() {
228
201
  */
229
202
 
230
203
 
231
- var dequote = function dequote(str) {
204
+ const dequote = str => {
232
205
  la(is.string(str), 'expected a string to remove double quotes', str);
233
206
 
234
207
  if (str.length > 1 && str[0] === '"' && str[str.length - 1] === '"') {
@@ -238,8 +211,8 @@ var dequote = function dequote(str) {
238
211
  return str;
239
212
  };
240
213
 
241
- var parseOpts = function parseOpts(opts) {
242
- opts = _.pick(opts, 'browser', 'cachePath', 'cacheList', 'cacheClear', 'ciBuildId', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'exit', 'env', 'force', 'global', 'group', 'headed', 'headless', 'key', 'path', 'parallel', 'port', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'spec', 'tag');
214
+ const parseOpts = opts => {
215
+ opts = _.pick(opts, 'browser', 'cachePath', 'cacheList', 'cacheClear', 'cachePrune', 'ciBuildId', 'config', 'configFile', 'cypressVersion', 'destination', 'detached', 'dev', 'exit', 'env', 'force', 'global', 'group', 'headed', 'headless', 'key', 'path', 'parallel', 'port', 'project', 'quiet', 'reporter', 'reporterOptions', 'record', 'spec', 'tag');
243
216
 
244
217
  if (opts.exit) {
245
218
  opts = _.omit(opts, 'exit');
@@ -247,11 +220,11 @@ var parseOpts = function parseOpts(opts) {
247
220
  // remove double quotes from certain options
248
221
 
249
222
 
250
- var removeQuotes = {
223
+ const removeQuotes = {
251
224
  group: dequote,
252
225
  ciBuildId: dequote
253
226
  };
254
- var cleanOpts = R.evolve(removeQuotes, opts);
227
+ const cleanOpts = R.evolve(removeQuotes, opts);
255
228
  debug('parsed cli options %o', cleanOpts);
256
229
  return cleanOpts;
257
230
  };
@@ -261,41 +234,39 @@ var parseOpts = function parseOpts(opts) {
261
234
  */
262
235
 
263
236
 
264
- var getApplicationDataFolder = function getApplicationDataFolder() {
265
- var _process = process,
266
- env = _process.env; // allow overriding the app_data folder
267
-
268
- var folder = env.CYPRESS_KONFIG_ENV || env.CYPRESS_INTERNAL_ENV || 'development';
269
- var PRODUCT_NAME = pkg.productName || pkg.name;
270
- var OS_DATA_PATH = ospath.data();
271
- var ELECTRON_APP_DATA_PATH = path.join(OS_DATA_PATH, PRODUCT_NAME);
272
-
273
- for (var _len = arguments.length, paths = new Array(_len), _key = 0; _key < _len; _key++) {
274
- paths[_key] = arguments[_key];
275
- }
237
+ const getApplicationDataFolder = (...paths) => {
238
+ const {
239
+ env
240
+ } = process; // allow overriding the app_data folder
276
241
 
277
- var p = path.join.apply(path, [ELECTRON_APP_DATA_PATH, 'cy', folder].concat(paths));
242
+ const folder = env.CYPRESS_KONFIG_ENV || env.CYPRESS_INTERNAL_ENV || 'development';
243
+ const PRODUCT_NAME = pkg.productName || pkg.name;
244
+ const OS_DATA_PATH = ospath.data();
245
+ const ELECTRON_APP_DATA_PATH = path.join(OS_DATA_PATH, PRODUCT_NAME);
246
+ const p = path.join(ELECTRON_APP_DATA_PATH, 'cy', folder, ...paths);
278
247
  return p;
279
248
  };
280
249
 
281
- var util = {
282
- normalizeModuleOptions: normalizeModuleOptions,
283
- parseOpts: parseOpts,
284
- isValidCypressInternalEnvValue: isValidCypressInternalEnvValue,
285
- isNonProductionCypressInternalEnvValue: isNonProductionCypressInternalEnvValue,
286
- printNodeOptions: printNodeOptions,
287
- isCi: function isCi() {
288
- return _isCi;
250
+ const util = {
251
+ normalizeModuleOptions,
252
+ parseOpts,
253
+ isValidCypressInternalEnvValue,
254
+ isNonProductionCypressInternalEnvValue,
255
+ printNodeOptions,
256
+
257
+ isCi() {
258
+ return isCi;
289
259
  },
290
- getEnvOverrides: function getEnvOverrides() {
291
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
260
+
261
+ getEnvOverrides(options = {}) {
292
262
  return _.chain({}).extend(util.getEnvColors()).extend(util.getForceTty()).omitBy(_.isUndefined) // remove undefined values
293
- .mapValues(function (value) {
263
+ .mapValues(value => {
294
264
  // stringify to 1 or 0
295
265
  return value ? '1' : '0';
296
266
  }).extend(util.getNodeOptions(options)).value();
297
267
  },
298
- getNodeOptions: function getNodeOptions(options, nodeVersion) {
268
+
269
+ getNodeOptions(options, nodeVersion) {
299
270
  if (!nodeVersion) {
300
271
  nodeVersion = Number(process.versions.node.split('.')[0]);
301
272
  }
@@ -307,38 +278,42 @@ var util = {
307
278
  } // https://github.com/cypress-io/cypress/issues/5431
308
279
 
309
280
 
310
- var NODE_OPTIONS = "--max-http-header-size=".concat(Math.pow(1024, 2), " --http-parser=legacy");
281
+ const NODE_OPTIONS = `--max-http-header-size=${1024 ** 2}`;
311
282
 
312
283
  if (_.isString(process.env.NODE_OPTIONS)) {
313
284
  return {
314
- NODE_OPTIONS: "".concat(NODE_OPTIONS, " ").concat(process.env.NODE_OPTIONS),
285
+ NODE_OPTIONS: `${NODE_OPTIONS} ${process.env.NODE_OPTIONS}`,
315
286
  ORIGINAL_NODE_OPTIONS: process.env.NODE_OPTIONS || ''
316
287
  };
317
288
  }
318
289
 
319
290
  return {
320
- NODE_OPTIONS: NODE_OPTIONS
291
+ NODE_OPTIONS
321
292
  };
322
293
  },
323
- getForceTty: function getForceTty() {
294
+
295
+ getForceTty() {
324
296
  return {
325
297
  FORCE_STDIN_TTY: util.isTty(process.stdin.fd),
326
298
  FORCE_STDOUT_TTY: util.isTty(process.stdout.fd),
327
299
  FORCE_STDERR_TTY: util.isTty(process.stderr.fd)
328
300
  };
329
301
  },
330
- getEnvColors: function getEnvColors() {
331
- var sc = util.supportsColor();
302
+
303
+ getEnvColors() {
304
+ const sc = util.supportsColor();
332
305
  return {
333
306
  FORCE_COLOR: sc,
334
307
  DEBUG_COLORS: sc,
335
308
  MOCHA_COLORS: sc ? true : undefined
336
309
  };
337
310
  },
338
- isTty: function isTty(fd) {
311
+
312
+ isTty(fd) {
339
313
  return tty.isatty(fd);
340
314
  },
341
- supportsColor: function supportsColor() {
315
+
316
+ supportsColor() {
342
317
  // if we've been explictly told not to support
343
318
  // color then turn this off
344
319
  if (process.env.NO_COLOR) {
@@ -352,35 +327,38 @@ var util = {
352
327
  } // ensure that both stdout and stderr support color
353
328
 
354
329
 
355
- return Boolean(_supportsColor.stdout) && Boolean(_supportsColor.stderr);
330
+ return Boolean(supportsColor.stdout) && Boolean(supportsColor.stderr);
356
331
  },
357
- cwd: function cwd() {
332
+
333
+ cwd() {
358
334
  return process.cwd();
359
335
  },
360
- pkgVersion: function pkgVersion() {
336
+
337
+ pkgVersion() {
361
338
  return pkg.version;
362
339
  },
363
- exit: function exit(code) {
340
+
341
+ exit(code) {
364
342
  process.exit(code);
365
343
  },
366
- logErrorExit1: function logErrorExit1(err) {
344
+
345
+ logErrorExit1(err) {
367
346
  logger.error(err.message);
368
347
  process.exit(1);
369
348
  },
370
- dequote: dequote,
371
- titleize: function titleize() {
372
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
373
- args[_key2] = arguments[_key2];
374
- }
375
349
 
350
+ dequote,
351
+
352
+ titleize(...args) {
376
353
  // prepend first arg with space
377
354
  // and pad so that all messages line up
378
- args[0] = _.padEnd(" ".concat(args[0]), 24); // get rid of any falsy values
355
+ args[0] = _.padEnd(` ${args[0]}`, 24); // get rid of any falsy values
379
356
 
380
357
  args = _.compact(args);
381
- return chalk.blue.apply(chalk, _toConsumableArray(args));
358
+ return chalk.blue(...args);
382
359
  },
383
- calculateEta: function calculateEta(percent, elapsed) {
360
+
361
+ calculateEta(percent, elapsed) {
384
362
  // returns the number of seconds remaining
385
363
  // if we're at 100% already just return 0
386
364
  if (percent === 100) {
@@ -392,38 +370,46 @@ var util = {
392
370
 
393
371
  return elapsed * (1 / (percent / 100)) - elapsed;
394
372
  },
395
- convertPercentToPercentage: function convertPercentToPercentage(num) {
373
+
374
+ convertPercentToPercentage(num) {
396
375
  // convert a percent with values between 0 and 1
397
376
  // with decimals, so that it is between 0 and 100
398
377
  // and has no decimal places
399
378
  return Math.round(_.isFinite(num) ? num * 100 : 0);
400
379
  },
401
- secsRemaining: function secsRemaining(eta) {
380
+
381
+ secsRemaining(eta) {
402
382
  // calculate the seconds reminaing with no decimal places
403
383
  return (_.isFinite(eta) ? eta / 1000 : 0).toFixed(0);
404
384
  },
405
- setTaskTitle: function setTaskTitle(task, title, renderer) {
385
+
386
+ setTaskTitle(task, title, renderer) {
406
387
  // only update the renderer title when not running in CI
407
388
  if (renderer === 'default' && task.title !== title) {
408
389
  task.title = title;
409
390
  }
410
391
  },
411
- isInstalledGlobally: function isInstalledGlobally() {
412
- return _isInstalledGlobally;
392
+
393
+ isInstalledGlobally() {
394
+ return isInstalledGlobally;
413
395
  },
414
- isSemver: function isSemver(str) {
396
+
397
+ isSemver(str) {
415
398
  return /^(\d+\.)?(\d+\.)?(\*|\d+)$/.test(str);
416
399
  },
417
- isExecutableAsync: function isExecutableAsync(filePath) {
400
+
401
+ isExecutableAsync(filePath) {
418
402
  return Promise.resolve(executable(filePath));
419
403
  },
420
- isLinux: isLinux,
421
- getOsVersionAsync: function getOsVersionAsync() {
422
- return Promise["try"](function () {
404
+
405
+ isLinux,
406
+
407
+ getOsVersionAsync() {
408
+ return Promise.try(() => {
423
409
  if (isLinux()) {
424
- return getosAsync().then(function (osInfo) {
410
+ return getosAsync().then(osInfo => {
425
411
  return [osInfo.dist, osInfo.release].join(' - ');
426
- })["catch"](function () {
412
+ }).catch(() => {
427
413
  return os.release();
428
414
  });
429
415
  }
@@ -431,38 +417,43 @@ var util = {
431
417
  return os.release();
432
418
  });
433
419
  },
434
- getPlatformInfo: function getPlatformInfo() {
435
- return util.getOsVersionAsync().then(function (version) {
436
- return stripIndent(_templateObject2(), os.platform(), version, util.pkgVersion());
420
+
421
+ getPlatformInfo() {
422
+ return util.getOsVersionAsync().then(version => {
423
+ return stripIndent`
424
+ Platform: ${os.platform()} (${version})
425
+ Cypress Version: ${util.pkgVersion()}
426
+ `;
437
427
  });
438
428
  },
429
+
439
430
  // attention:
440
431
  // when passing relative path to NPM post install hook, the current working
441
432
  // directory is set to the `node_modules/cypress` folder
442
433
  // the user is probably passing relative path with respect to root package folder
443
- formAbsolutePath: function formAbsolutePath(filename) {
434
+ formAbsolutePath(filename) {
444
435
  if (path.isAbsolute(filename)) {
445
436
  return filename;
446
437
  }
447
438
 
448
439
  return path.join(process.cwd(), '..', '..', filename);
449
440
  },
450
- getEnv: function getEnv(varName, trim) {
441
+
442
+ getEnv(varName, trim) {
451
443
  la(is.unemptyString(varName), 'expected environment variable name, not', varName);
452
- var envVar = process.env[varName];
453
- var configVar = process.env["npm_config_".concat(varName)];
454
- var packageConfigVar = process.env["npm_package_config_".concat(varName)];
455
- var result;
456
-
457
- if (envVar) {
458
- debug("Using ".concat(varName, " from environment variable"));
459
- result = envVar;
460
- } else if (configVar) {
461
- debug("Using ".concat(varName, " from npm config"));
462
- result = configVar;
463
- } else if (packageConfigVar) {
464
- debug("Using ".concat(varName, " from package.json config"));
465
- result = packageConfigVar;
444
+ const configVarName = `npm_config_${varName}`;
445
+ const packageConfigVarName = `npm_package_config_${varName}`;
446
+ let result;
447
+
448
+ if (process.env.hasOwnProperty(varName)) {
449
+ debug(`Using ${varName} from environment variable`);
450
+ result = process.env[varName];
451
+ } else if (process.env.hasOwnProperty(configVarName)) {
452
+ debug(`Using ${varName} from npm config`);
453
+ result = process.env[configVarName];
454
+ } else if (process.env.hasOwnProperty(packageConfigVarName)) {
455
+ debug(`Using ${varName} from package.json config`);
456
+ result = process.env[packageConfigVarName];
466
457
  } // environment variables are often set double quotes to escape characters
467
458
  // and on Windows it can lead to weird things: for example
468
459
  // set FOO="C:\foo.txt" && node -e "console.log('>>>%s<<<', process.env.FOO)"
@@ -476,25 +467,30 @@ var util = {
476
467
 
477
468
  return trim ? dequote(_.trim(result)) : result;
478
469
  },
479
- getCacheDir: function getCacheDir() {
470
+
471
+ getCacheDir() {
480
472
  return cachedir('Cypress');
481
473
  },
482
- isPostInstall: function isPostInstall() {
474
+
475
+ isPostInstall() {
483
476
  return process.env.npm_lifecycle_event === 'postinstall';
484
477
  },
478
+
485
479
  exec: execa,
486
- stdoutLineMatches: stdoutLineMatches,
487
- issuesUrl: issuesUrl,
488
- isBrokenGtkDisplay: isBrokenGtkDisplay,
489
- logBrokenGtkDisplayWarning: logBrokenGtkDisplayWarning,
490
- isPossibleLinuxWithIncorrectDisplay: isPossibleLinuxWithIncorrectDisplay,
491
- getGitHubIssueUrl: function getGitHubIssueUrl(number) {
480
+ stdoutLineMatches,
481
+ issuesUrl,
482
+ isBrokenGtkDisplay,
483
+ logBrokenGtkDisplayWarning,
484
+ isPossibleLinuxWithIncorrectDisplay,
485
+
486
+ getGitHubIssueUrl(number) {
492
487
  la(is.positive(number), 'github issue should be a positive number', number);
493
488
  la(_.isInteger(number), 'github issue should be an integer', number);
494
- return "".concat(issuesUrl, "/").concat(number);
489
+ return `${issuesUrl}/${number}`;
495
490
  },
496
- getFileChecksum: getFileChecksum,
497
- getFileSize: getFileSize,
498
- getApplicationDataFolder: getApplicationDataFolder
491
+
492
+ getFileChecksum,
493
+ getFileSize,
494
+ getApplicationDataFolder
499
495
  };
500
496
  module.exports = util;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cypress",
3
- "version": "5.1.0",
3
+ "version": "5.5.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "postinstall": "node index.js --exec install",
@@ -37,10 +37,10 @@
37
37
  "minimist": "^1.2.5",
38
38
  "moment": "^2.27.0",
39
39
  "ospath": "^1.2.2",
40
- "pretty-bytes": "^5.3.0",
40
+ "pretty-bytes": "^5.4.1",
41
41
  "ramda": "~0.26.1",
42
42
  "request-progress": "^3.0.0",
43
- "supports-color": "^7.1.0",
43
+ "supports-color": "^7.2.0",
44
44
  "tmp": "~0.2.1",
45
45
  "untildify": "^4.0.0",
46
46
  "url": "^0.11.0",