Comparing version 10.0.0 to 10.1.0
@@ -89,2 +89,16 @@ 'use strict'; | ||
try { | ||
var darkMatcher = window.matchMedia('(prefers-color-scheme: dark)'); | ||
var isDarkMode = !!darkMatcher.matches; | ||
var lightColors = { | ||
outerCircle: '#9f9f9f', | ||
innerCircle: '#eee', | ||
text: '#000' | ||
}; | ||
var darkColors = { | ||
outerCircle: '#888', | ||
innerCircle: '#444', | ||
text: '#fff' | ||
}; | ||
var colors = isDarkMode ? darkColors : lightColors; | ||
var percent = Math.min(this.percent, 100); | ||
@@ -104,3 +118,3 @@ var size = this._size; | ||
// outer circle | ||
ctx.strokeStyle = '#9f9f9f'; | ||
ctx.strokeStyle = colors.outerCircle; | ||
ctx.beginPath(); | ||
@@ -111,3 +125,3 @@ ctx.arc(x, y, rad, 0, angle, false); | ||
// inner circle | ||
ctx.strokeStyle = '#eee'; | ||
ctx.strokeStyle = colors.innerCircle; | ||
ctx.beginPath(); | ||
@@ -121,2 +135,3 @@ ctx.arc(x, y, rad - 1, 0, angle, true); | ||
ctx.fillStyle = colors.text; | ||
ctx.fillText(text, x - w / 2 + 1, y + fontSize / 2 - 1); | ||
@@ -123,0 +138,0 @@ } catch (ignore) { |
@@ -43,5 +43,5 @@ 'use strict'; | ||
return common.suite.create({ | ||
title: title, | ||
file: file, | ||
fn: fn | ||
title, | ||
file, | ||
fn | ||
}); | ||
@@ -59,5 +59,5 @@ }; | ||
return common.suite.skip({ | ||
title: title, | ||
file: file, | ||
fn: fn | ||
title, | ||
file, | ||
fn | ||
}); | ||
@@ -72,5 +72,5 @@ }; | ||
return common.suite.only({ | ||
title: title, | ||
file: file, | ||
fn: fn | ||
title, | ||
file, | ||
fn | ||
}); | ||
@@ -77,0 +77,0 @@ }; |
@@ -52,4 +52,4 @@ 'use strict'; | ||
return common.suite.create({ | ||
title: title, | ||
file: file, | ||
title, | ||
file, | ||
fn: false | ||
@@ -68,4 +68,4 @@ }); | ||
return common.suite.only({ | ||
title: title, | ||
file: file, | ||
title, | ||
file, | ||
fn: false | ||
@@ -72,0 +72,0 @@ }); |
@@ -50,5 +50,5 @@ 'use strict'; | ||
return common.suite.create({ | ||
title: title, | ||
file: file, | ||
fn: fn | ||
title, | ||
file, | ||
fn | ||
}); | ||
@@ -62,5 +62,5 @@ }; | ||
return common.suite.skip({ | ||
title: title, | ||
file: file, | ||
fn: fn | ||
title, | ||
file, | ||
fn | ||
}); | ||
@@ -74,5 +74,5 @@ }; | ||
return common.suite.only({ | ||
title: title, | ||
file: file, | ||
fn: fn | ||
title, | ||
file, | ||
fn | ||
}); | ||
@@ -79,0 +79,0 @@ }; |
@@ -9,3 +9,2 @@ /** | ||
const allSettled = require('@ungap/promise-all-settled').bind(Promise); | ||
const Runner = require('../runner'); | ||
@@ -326,3 +325,3 @@ const {EVENT_RUN_BEGIN, EVENT_RUN_END} = Runner.constants; | ||
const results = await allSettled( | ||
const results = await Promise.allSettled( | ||
files.map(this._createFileRunner(pool, options)) | ||
@@ -329,0 +328,0 @@ ); |
@@ -39,3 +39,3 @@ 'use strict'; | ||
runner.once(EVENT_RUN_BEGIN, function () { | ||
writeEvent(['start', {total: total}]); | ||
writeEvent(['start', {total}]); | ||
}); | ||
@@ -42,0 +42,0 @@ |
@@ -53,3 +53,3 @@ 'use strict'; | ||
obj = obj[key] = obj[key] || {suite: suite}; | ||
obj = obj[key] = obj[key] || {suite}; | ||
suite.suites.forEach(function (suite) { | ||
@@ -56,0 +56,0 @@ mapTOC(suite, obj); |
@@ -79,3 +79,3 @@ 'use strict'; | ||
.replace( | ||
/^function(?:\s*|\s+[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\s*\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\s*\}|((?:.|\n)*))$/, | ||
/^function(?:\s*|\s[^(]*)\([^)]*\)\s*\{((?:.|\n)*?)\}$|^\([^)]*\)\s*=>\s*(?:\{((?:.|\n)*?)\}|((?:.|\n)*))$/, | ||
'$1$2$3' | ||
@@ -82,0 +82,0 @@ ); |
{ | ||
"name": "mocha", | ||
"version": "10.0.0", | ||
"version": "10.1.0", | ||
"type": "commonjs", | ||
@@ -57,3 +57,2 @@ "description": "simple, flexible, fun test framework", | ||
"dependencies": { | ||
"@ungap/promise-all-settled": "1.1.2", | ||
"ansi-colors": "4.1.1", | ||
@@ -84,3 +83,3 @@ "browser-stdout": "1.3.1", | ||
"@11ty/eleventy-plugin-inclusive-language": "^1.0.3", | ||
"@babel/eslint-parser": "^7.16.5", | ||
"@babel/eslint-parser": "^7.19.1", | ||
"@mocha/docdash": "^4.0.1", | ||
@@ -99,10 +98,10 @@ "@rollup/plugin-commonjs": "^21.0.2", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^7.32.0", | ||
"eslint": "^8.24.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-config-semistandard": "^16.0.0", | ||
"eslint-config-standard": "^16.0.3", | ||
"eslint-config-semistandard": "^17.0.0", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-plugin-import": "^2.24.2", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-promise": "^6.0.1", | ||
"fail-on-errors-webpack-plugin": "^3.0.0", | ||
@@ -109,0 +108,0 @@ "fs-extra": "^10.0.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2085866
21
30294
- Removed@ungap/promise-all-settled@1.1.2
- Removed@ungap/promise-all-settled@1.1.2(transitive)