mocha 6.2.0 → 6.2.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # 6.2.1 / 2019-09-29
2
+
3
+ ## :bug: Fixes
4
+
5
+ - [#3955](https://github.com/mochajs/mocha/issues/3955): tty.getWindowSize is not a function inside a "worker_threads" worker ([**@1999**](https://github.com/1999))
6
+ - [#3970](https://github.com/mochajs/mocha/issues/3970): remove extraGlobals() ([**@juergba**](https://github.com/juergba))
7
+ - [#3984](https://github.com/mochajs/mocha/issues/3984): Update yargs-unparser to v1.6.0 ([**@juergba**](https://github.com/juergba))
8
+ - [#3983](https://github.com/mochajs/mocha/issues/3983): Package 'esm': spawn child-process for correct loading ([**@juergba**](https://github.com/juergba))
9
+ - [#3986](https://github.com/mochajs/mocha/issues/3986): Update yargs to v13.3.0 and yargs-parser to v13.1.1 ([**@juergba**](https://github.com/juergba))
10
+
11
+ ## :book: Documentation
12
+
13
+ - [#3886](https://github.com/mochajs/mocha/issues/3886): fix styles on mochajs.org ([**@outsideris**](https://github.com/outsideris))
14
+ - [#3966](https://github.com/mochajs/mocha/issues/3966): Remove jsdoc index.html placeholder from eleventy file structure and fix broken link in jsdoc tutorial ([**@Munter**](https://github.com/Munter))
15
+ - [#3765](https://github.com/mochajs/mocha/issues/3765): Add Matomo to website ([**@MarioDiaz98**](https://github.com/MarioDiaz98))
16
+ - [#3947](https://github.com/mochajs/mocha/issues/3947): Clarify effect of .skip() ([**@oliversalzburg**](https://github.com/oliversalzburg))
17
+
1
18
  # 6.2.0 / 2019-07-18
2
19
 
3
20
  ## :tada: Enhancements
package/bin/mocha CHANGED
@@ -117,6 +117,16 @@ if (nodeArgs.gc) {
117
117
  delete nodeArgs.gc;
118
118
  }
119
119
 
120
+ // --require/-r is treated as Mocha flag except when 'esm' is preloaded
121
+ if (mochaArgs.require && mochaArgs.require.includes('esm')) {
122
+ nodeArgs.require = ['esm'];
123
+ mochaArgs.require = mochaArgs.require.filter(mod => mod !== 'esm');
124
+ if (!mochaArgs.require.length) {
125
+ delete mochaArgs.require;
126
+ }
127
+ delete mochaArgs.r;
128
+ }
129
+
120
130
  if (Object.keys(nodeArgs).length) {
121
131
  const {spawn} = require('child_process');
122
132
  const mochaPath = require.resolve('../lib/cli/cli.js');
@@ -25,7 +25,7 @@ exports = module.exports = Base;
25
25
  * Check if both stdio streams are associated with a tty.
26
26
  */
27
27
 
28
- var isatty = tty.isatty(1) && tty.isatty(2);
28
+ var isatty = process.stdout.isTTY && process.stderr.isTTY;
29
29
 
30
30
  /**
31
31
  * Save log references to avoid tests interfering (see GH-3604).
package/lib/runner.js CHANGED
@@ -141,7 +141,7 @@ function Runner(suite, delay) {
141
141
  });
142
142
  this._defaultGrep = /.*/;
143
143
  this.grep(this._defaultGrep);
144
- this.globals(this.globalProps().concat(extraGlobals()));
144
+ this.globals(this.globalProps());
145
145
  }
146
146
 
147
147
  /**
@@ -1016,30 +1016,6 @@ function thrown2Error(err) {
1016
1016
  );
1017
1017
  }
1018
1018
 
1019
- /**
1020
- * Array of globals dependent on the environment.
1021
- *
1022
- * @return {Array}
1023
- * @deprecated
1024
- * @todo remove; long since unsupported
1025
- * @private
1026
- */
1027
- function extraGlobals() {
1028
- if (typeof process === 'object' && typeof process.version === 'string') {
1029
- var parts = process.version.split('.');
1030
- var nodeVersion = parts.reduce(function(a, v) {
1031
- return (a << 8) | v;
1032
- });
1033
-
1034
- // 'errno' was renamed to process._errno in v0.9.11.
1035
- if (nodeVersion < 0x00090b) {
1036
- return ['errno'];
1037
- }
1038
- }
1039
-
1040
- return [];
1041
- }
1042
-
1043
1019
  Runner.constants = constants;
1044
1020
 
1045
1021
  /**
package/mocha.js CHANGED
@@ -2299,7 +2299,7 @@ exports = module.exports = Base;
2299
2299
  * Check if both stdio streams are associated with a tty.
2300
2300
  */
2301
2301
 
2302
- var isatty = tty.isatty(1) && tty.isatty(2);
2302
+ var isatty = process.stdout.isTTY && process.stderr.isTTY;
2303
2303
 
2304
2304
  /**
2305
2305
  * Save log references to avoid tests interfering (see GH-3604).
@@ -5614,7 +5614,7 @@ function Runner(suite, delay) {
5614
5614
  });
5615
5615
  this._defaultGrep = /.*/;
5616
5616
  this.grep(this._defaultGrep);
5617
- this.globals(this.globalProps().concat(extraGlobals()));
5617
+ this.globals(this.globalProps());
5618
5618
  }
5619
5619
 
5620
5620
  /**
@@ -6489,30 +6489,6 @@ function thrown2Error(err) {
6489
6489
  );
6490
6490
  }
6491
6491
 
6492
- /**
6493
- * Array of globals dependent on the environment.
6494
- *
6495
- * @return {Array}
6496
- * @deprecated
6497
- * @todo remove; long since unsupported
6498
- * @private
6499
- */
6500
- function extraGlobals() {
6501
- if (typeof process === 'object' && typeof process.version === 'string') {
6502
- var parts = process.version.split('.');
6503
- var nodeVersion = parts.reduce(function(a, v) {
6504
- return (a << 8) | v;
6505
- });
6506
-
6507
- // 'errno' was renamed to process._errno in v0.9.11.
6508
- if (nodeVersion < 0x00090b) {
6509
- return ['errno'];
6510
- }
6511
- }
6512
-
6513
- return [];
6514
- }
6515
-
6516
6492
  Runner.constants = constants;
6517
6493
 
6518
6494
  /**
@@ -18097,7 +18073,7 @@ function hasOwnProperty(obj, prop) {
18097
18073
  },{"./support/isBuffer":88,"_process":69,"inherits":56}],90:[function(require,module,exports){
18098
18074
  module.exports={
18099
18075
  "name": "mocha",
18100
- "version": "6.2.0",
18076
+ "version": "6.2.1",
18101
18077
  "homepage": "https://mochajs.org/",
18102
18078
  "notifyLogo": "https://ibin.co/4QuRuGjXvl36.png"
18103
18079
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocha",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "simple, flexible, fun test framework",
5
5
  "keywords": [
6
6
  "mocha",
@@ -130,6 +130,7 @@
130
130
  "Di Wu <dwu@palantir.com>",
131
131
  "Dina Berry <dfberry@users.noreply.github.com>",
132
132
  "Diogo Monteiro <diogo.gmt@gmail.com>",
133
+ "Dmitrii Sorin <info@staypositive.ru>",
133
134
  "Dmitriy Simushev <simushevds@gmail.com>",
134
135
  "Dmitry Shirokov <deadrunk@gmail.com>",
135
136
  "Dmitry Sorin <info@staypositive.ru>",
@@ -294,6 +295,7 @@
294
295
  "Marc Kuo <kuomarc2@gmail.com>",
295
296
  "Marc Udoff <mlucool@gmail.com>",
296
297
  "Marcello Bastea-Forte <marcello@cellosoft.com>",
298
+ "Mario Díaz Ceñera <46492068+MarioDiaz98@users.noreply.github.com>",
297
299
  "Mark Banner <standard8@mozilla.com>",
298
300
  "Mark Owsiak <mark.owsiak@gmail.com>",
299
301
  "Markus Tacker <m@coderbyheart.com>",
@@ -338,6 +340,7 @@
338
340
  "Noshir Patel <nosh@blackpiano.com>",
339
341
  "not-an-aardvark <not-an-aardvark@users.noreply.github.com>",
340
342
  "OlegTsyba <oleg.tsyba.ua@gmail.com>",
343
+ "Oliver Salzburg <oliver.salzburg@gmail.com>",
341
344
  "olsonpm <olsonpm@users.noreply.github.com>",
342
345
  "omardelarosa <thedelarosa@gmail.com>",
343
346
  "Oscar Godson <oscargodson@outlook.com>",
@@ -532,9 +535,9 @@
532
535
  "supports-color": "6.0.0",
533
536
  "which": "1.3.1",
534
537
  "wide-align": "1.1.3",
535
- "yargs": "13.2.2",
536
- "yargs-parser": "13.0.0",
537
- "yargs-unparser": "1.5.0"
538
+ "yargs": "13.3.0",
539
+ "yargs-parser": "13.1.1",
540
+ "yargs-unparser": "1.6.0"
538
541
  },
539
542
  "devDependencies": {
540
543
  "@11ty/eleventy": "^0.8.3",