mocha 10.3.0 → 10.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocha",
3
- "version": "10.3.0",
3
+ "version": "10.5.0",
4
4
  "type": "commonjs",
5
5
  "description": "simple, flexible, fun test framework",
6
6
  "keywords": [
@@ -43,6 +43,7 @@
43
43
  "node": ">= 14.0.0"
44
44
  },
45
45
  "scripts": {
46
+ "lint": "npx eslint . --max-warnings 0",
46
47
  "prepublishOnly": "nps test clean build",
47
48
  "start": "nps",
48
49
  "test": "nps test",
@@ -52,7 +53,7 @@
52
53
  "dependencies": {
53
54
  "ansi-colors": "4.1.1",
54
55
  "browser-stdout": "1.3.1",
55
- "chokidar": "3.5.3",
56
+ "chokidar": "^3.5.3",
56
57
  "debug": "4.3.4",
57
58
  "diff": "5.0.0",
58
59
  "escape-string-regexp": "4.0.0",
@@ -74,28 +75,23 @@
74
75
  "devDependencies": {
75
76
  "@11ty/eleventy": "^1.0.0",
76
77
  "@11ty/eleventy-plugin-inclusive-language": "^1.0.3",
77
- "@babel/eslint-parser": "^7.19.1",
78
+ "@eslint/js": "^8.56.0",
78
79
  "@mocha/docdash": "^4.0.1",
79
80
  "@rollup/plugin-commonjs": "^21.0.2",
80
81
  "@rollup/plugin-json": "^4.1.0",
81
82
  "@rollup/plugin-multi-entry": "^4.0.1",
82
83
  "@rollup/plugin-node-resolve": "^13.1.3",
84
+ "assetgraph-builder": "^9.0.0",
83
85
  "autoprefixer": "^9.8.6",
86
+ "canvas": "^2.11.2",
84
87
  "chai": "^4.3.4",
85
88
  "coffeescript": "^2.6.1",
86
89
  "coveralls": "^3.1.1",
87
90
  "cross-env": "^7.0.2",
88
- "eslint": "^8.24.0",
89
- "eslint-config-prettier": "^8.3.0",
90
- "eslint-config-semistandard": "^17.0.0",
91
- "eslint-config-standard": "^17.0.0",
92
- "eslint-plugin-import": "^2.24.2",
93
- "eslint-plugin-node": "^11.1.0",
94
- "eslint-plugin-prettier": "^4.2.1",
95
- "eslint-plugin-promise": "^6.0.1",
91
+ "eslint": "^8.56.0",
96
92
  "fail-on-errors-webpack-plugin": "^3.0.0",
97
93
  "fs-extra": "^10.0.0",
98
- "husky": "^4.2.5",
94
+ "globals": "^13.24.0",
99
95
  "hyperlink": "^5.0.4",
100
96
  "jsdoc": "^3.6.7",
101
97
  "jsdoc-ts-utils": "^2.0.1",
@@ -171,10 +167,5 @@
171
167
  },
172
168
  "overrides": {
173
169
  "webdriverio": "^7.33.0"
174
- },
175
- "husky": {
176
- "hooks": {
177
- "pre-commit": "lint-staged"
178
- }
179
170
  }
180
171
  }
@@ -1,138 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- @module browser/Progress
5
- */
6
-
7
- /**
8
- * Expose `Progress`.
9
- */
10
-
11
- module.exports = Progress;
12
-
13
- /**
14
- * Initialize a new `Progress` indicator.
15
- */
16
- function Progress() {
17
- this.percent = 0;
18
- this.size(0);
19
- this.fontSize(11);
20
- this.font('helvetica, arial, sans-serif');
21
- }
22
-
23
- /**
24
- * Set progress size to `size`.
25
- *
26
- * @public
27
- * @param {number} size
28
- * @return {Progress} Progress instance.
29
- */
30
- Progress.prototype.size = function (size) {
31
- this._size = size;
32
- return this;
33
- };
34
-
35
- /**
36
- * Set text to `text`.
37
- *
38
- * @public
39
- * @param {string} text
40
- * @return {Progress} Progress instance.
41
- */
42
- Progress.prototype.text = function (text) {
43
- this._text = text;
44
- return this;
45
- };
46
-
47
- /**
48
- * Set font size to `size`.
49
- *
50
- * @public
51
- * @param {number} size
52
- * @return {Progress} Progress instance.
53
- */
54
- Progress.prototype.fontSize = function (size) {
55
- this._fontSize = size;
56
- return this;
57
- };
58
-
59
- /**
60
- * Set font to `family`.
61
- *
62
- * @param {string} family
63
- * @return {Progress} Progress instance.
64
- */
65
- Progress.prototype.font = function (family) {
66
- this._font = family;
67
- return this;
68
- };
69
-
70
- /**
71
- * Update percentage to `n`.
72
- *
73
- * @param {number} n
74
- * @return {Progress} Progress instance.
75
- */
76
- Progress.prototype.update = function (n) {
77
- this.percent = n;
78
- return this;
79
- };
80
-
81
- /**
82
- * Draw on `ctx`.
83
- *
84
- * @param {CanvasRenderingContext2d} ctx
85
- * @return {Progress} Progress instance.
86
- */
87
- Progress.prototype.draw = function (ctx) {
88
- try {
89
- var darkMatcher = window.matchMedia('(prefers-color-scheme: dark)');
90
- var isDarkMode = !!darkMatcher.matches;
91
- var lightColors = {
92
- outerCircle: '#9f9f9f',
93
- innerCircle: '#eee',
94
- text: '#000'
95
- };
96
- var darkColors = {
97
- outerCircle: '#888',
98
- innerCircle: '#444',
99
- text: '#fff'
100
- };
101
- var colors = isDarkMode ? darkColors : lightColors;
102
-
103
- var percent = Math.min(this.percent, 100);
104
- var size = this._size;
105
- var half = size / 2;
106
- var x = half;
107
- var y = half;
108
- var rad = half - 1;
109
- var fontSize = this._fontSize;
110
-
111
- ctx.font = fontSize + 'px ' + this._font;
112
-
113
- var angle = Math.PI * 2 * (percent / 100);
114
- ctx.clearRect(0, 0, size, size);
115
-
116
- // outer circle
117
- ctx.strokeStyle = colors.outerCircle;
118
- ctx.beginPath();
119
- ctx.arc(x, y, rad, 0, angle, false);
120
- ctx.stroke();
121
-
122
- // inner circle
123
- ctx.strokeStyle = colors.innerCircle;
124
- ctx.beginPath();
125
- ctx.arc(x, y, rad - 1, 0, angle, true);
126
- ctx.stroke();
127
-
128
- // text
129
- var text = this._text || (percent | 0) + '%';
130
- var w = ctx.measureText(text).width;
131
-
132
- ctx.fillStyle = colors.text;
133
- ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1);
134
- } catch (ignore) {
135
- // don't fail if we can't render progress
136
- }
137
- return this;
138
- };