epuber-stylus-source 0.54.8 → 0.56.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/vendor/{History.md → Changelog.md} +50 -0
- data/vendor/Readme.md +37 -23
- data/vendor/bin/stylus +1 -2
- data/vendor/lib/convert/css.js +1 -1
- data/vendor/lib/functions/acos.js +20 -0
- data/vendor/lib/functions/asin.js +21 -0
- data/vendor/lib/functions/atan.js +21 -0
- data/vendor/lib/functions/convert-angle.js +19 -0
- data/vendor/lib/functions/index.js +3 -0
- data/vendor/lib/functions/url.js +5 -5
- data/vendor/lib/lexer.js +1 -1
- data/vendor/lib/middleware.js +1 -2
- data/vendor/lib/visitor/compiler.js +2 -2
- data/vendor/lib/visitor/deps-resolver.js +3 -0
- data/vendor/node_modules/{cliui/node_modules/ansi-regex → ansi-regex}/index.d.ts +0 -0
- data/vendor/node_modules/ansi-regex/index.js +4 -4
- data/vendor/node_modules/ansi-regex/package.json +53 -51
- data/vendor/node_modules/ansi-regex/readme.md +35 -3
- data/vendor/node_modules/assertion-error/History.md +24 -0
- data/vendor/node_modules/{mkdirp/LICENSE → assertion-error/README.md} +22 -2
- data/vendor/node_modules/assertion-error/index.d.ts +11 -0
- data/vendor/node_modules/assertion-error/index.js +116 -0
- data/vendor/node_modules/assertion-error/package.json +29 -0
- data/vendor/node_modules/camelcase/index.d.ts +5 -3
- data/vendor/node_modules/camelcase/index.js +40 -18
- data/vendor/node_modules/camelcase/package.json +1 -1
- data/vendor/node_modules/camelcase/readme.md +21 -5
- data/vendor/node_modules/chai/CODEOWNERS +1 -0
- data/vendor/node_modules/chai/CODE_OF_CONDUCT.md +58 -0
- data/vendor/node_modules/chai/CONTRIBUTING.md +218 -0
- data/vendor/node_modules/chai/History.md +1059 -0
- data/vendor/node_modules/{should-type-adaptors → chai}/LICENSE +1 -1
- data/vendor/node_modules/chai/README.md +212 -0
- data/vendor/node_modules/chai/ReleaseNotes.md +737 -0
- data/vendor/node_modules/chai/bower.json +26 -0
- data/vendor/node_modules/chai/chai.js +11464 -0
- data/vendor/node_modules/chai/index.js +1 -0
- data/vendor/node_modules/chai/index.mjs +14 -0
- data/vendor/node_modules/chai/karma.conf.js +34 -0
- data/vendor/node_modules/chai/karma.sauce.js +41 -0
- data/vendor/node_modules/chai/lib/chai/assertion.js +175 -0
- data/vendor/node_modules/chai/lib/chai/config.js +94 -0
- data/vendor/node_modules/chai/lib/chai/core/assertions.js +3853 -0
- data/vendor/node_modules/chai/lib/chai/interface/assert.js +3113 -0
- data/vendor/node_modules/chai/lib/chai/interface/expect.js +47 -0
- data/vendor/node_modules/chai/lib/chai/interface/should.js +219 -0
- data/vendor/node_modules/chai/lib/chai/utils/addChainableMethod.js +152 -0
- data/vendor/node_modules/chai/lib/chai/utils/addLengthGuard.js +60 -0
- data/vendor/node_modules/chai/lib/chai/utils/addMethod.js +68 -0
- data/vendor/node_modules/chai/lib/chai/utils/addProperty.js +72 -0
- data/vendor/node_modules/chai/lib/chai/utils/compareByInspect.js +31 -0
- data/vendor/node_modules/chai/lib/chai/utils/expectTypes.js +51 -0
- data/vendor/node_modules/chai/lib/chai/utils/flag.js +33 -0
- data/vendor/node_modules/chai/lib/chai/utils/getActual.js +20 -0
- data/vendor/node_modules/chai/lib/chai/utils/getEnumerableProperties.js +26 -0
- data/vendor/node_modules/chai/lib/chai/utils/getMessage.js +50 -0
- data/vendor/node_modules/chai/lib/chai/utils/getOperator.js +55 -0
- data/vendor/node_modules/chai/lib/chai/utils/getOwnEnumerableProperties.js +29 -0
- data/vendor/node_modules/chai/lib/chai/utils/getOwnEnumerablePropertySymbols.js +27 -0
- data/vendor/node_modules/chai/lib/chai/utils/getProperties.js +36 -0
- data/vendor/node_modules/chai/lib/chai/utils/index.js +178 -0
- data/vendor/node_modules/chai/lib/chai/utils/inspect.js +33 -0
- data/vendor/node_modules/chai/lib/chai/utils/isNaN.js +26 -0
- data/vendor/node_modules/chai/lib/chai/utils/isProxyEnabled.js +24 -0
- data/vendor/node_modules/chai/lib/chai/utils/objDisplay.js +50 -0
- data/vendor/node_modules/chai/lib/chai/utils/overwriteChainableMethod.js +69 -0
- data/vendor/node_modules/chai/lib/chai/utils/overwriteMethod.js +92 -0
- data/vendor/node_modules/chai/lib/chai/utils/overwriteProperty.js +92 -0
- data/vendor/node_modules/chai/lib/chai/utils/proxify.js +147 -0
- data/vendor/node_modules/chai/lib/chai/utils/test.js +28 -0
- data/vendor/node_modules/chai/lib/chai/utils/transferFlags.js +45 -0
- data/vendor/node_modules/chai/lib/chai.js +92 -0
- data/vendor/node_modules/chai/package.json +63 -0
- data/vendor/node_modules/chai/register-assert.js +1 -0
- data/vendor/node_modules/chai/register-expect.js +1 -0
- data/vendor/node_modules/chai/register-should.js +1 -0
- data/vendor/node_modules/chai/sauce.browsers.js +106 -0
- data/vendor/node_modules/chalk/package.json +1 -1
- data/vendor/node_modules/chalk/readme.md +7 -1
- data/vendor/node_modules/{source-map-url → check-error}/LICENSE +1 -3
- data/vendor/node_modules/check-error/README.md +207 -0
- data/vendor/node_modules/check-error/check-error.js +176 -0
- data/vendor/node_modules/check-error/index.js +172 -0
- data/vendor/node_modules/check-error/package.json +85 -0
- data/vendor/node_modules/chokidar/README.md +5 -4
- data/vendor/node_modules/chokidar/index.js +7 -1
- data/vendor/node_modules/chokidar/lib/constants.js +2 -0
- data/vendor/node_modules/chokidar/lib/fsevents-handler.js +2 -1
- data/vendor/node_modules/chokidar/lib/nodefs-handler.js +9 -1
- data/vendor/node_modules/chokidar/package.json +15 -8
- data/vendor/node_modules/chokidar/types/index.d.ts +4 -3
- data/vendor/node_modules/css/lib/stringify/source-map-support.js +10 -3
- data/vendor/node_modules/css/package.json +8 -9
- data/vendor/node_modules/debug/LICENSE +10 -9
- data/vendor/node_modules/debug/README.md +116 -3
- data/vendor/node_modules/debug/package.json +35 -19
- data/vendor/node_modules/debug/src/browser.js +194 -120
- data/vendor/node_modules/debug/src/common.js +274 -0
- data/vendor/node_modules/debug/src/index.js +4 -4
- data/vendor/node_modules/debug/src/node.js +174 -97
- data/vendor/node_modules/{resolve-url → deep-eql}/LICENSE +1 -3
- data/vendor/node_modules/deep-eql/README.md +116 -0
- data/vendor/node_modules/deep-eql/deep-eql.js +833 -0
- data/vendor/node_modules/deep-eql/index.js +455 -0
- data/vendor/node_modules/deep-eql/package.json +90 -0
- data/vendor/node_modules/{urix → get-func-name}/LICENSE +1 -3
- data/vendor/node_modules/get-func-name/README.md +123 -0
- data/vendor/node_modules/get-func-name/get-func-name.js +48 -0
- data/vendor/node_modules/get-func-name/index.js +44 -0
- data/vendor/node_modules/get-func-name/package.json +85 -0
- data/vendor/node_modules/glob/README.md +3 -0
- data/vendor/node_modules/glob/common.js +2 -0
- data/vendor/node_modules/glob/glob.js +4 -5
- data/vendor/node_modules/glob/package.json +2 -1
- data/vendor/node_modules/glob/sync.js +4 -5
- data/vendor/node_modules/{cliui/node_modules/is-fullwidth-code-point → is-fullwidth-code-point}/index.d.ts +0 -0
- data/vendor/node_modules/is-fullwidth-code-point/index.js +25 -21
- data/vendor/node_modules/is-fullwidth-code-point/license +4 -16
- data/vendor/node_modules/is-fullwidth-code-point/package.json +40 -43
- data/vendor/node_modules/is-fullwidth-code-point/readme.md +6 -6
- data/vendor/node_modules/is-glob/README.md +1 -1
- data/vendor/node_modules/is-glob/index.js +126 -24
- data/vendor/node_modules/is-glob/package.json +2 -2
- data/vendor/node_modules/is-unicode-supported/index.d.ts +14 -0
- data/vendor/node_modules/is-unicode-supported/index.js +13 -0
- data/vendor/node_modules/{cliui/node_modules/string-width → is-unicode-supported}/license +1 -1
- data/vendor/node_modules/is-unicode-supported/package.json +41 -0
- data/vendor/node_modules/is-unicode-supported/readme.md +35 -0
- data/vendor/node_modules/js-yaml/CHANGELOG.md +13 -0
- data/vendor/node_modules/js-yaml/README.md +1 -1
- data/vendor/node_modules/js-yaml/dist/js-yaml.js +90 -70
- data/vendor/node_modules/js-yaml/dist/js-yaml.min.js +2 -2
- data/vendor/node_modules/js-yaml/dist/js-yaml.mjs +84 -65
- data/vendor/node_modules/js-yaml/index.js +17 -0
- data/vendor/node_modules/js-yaml/lib/schema.js +9 -9
- data/vendor/node_modules/js-yaml/lib/type.js +1 -0
- data/vendor/node_modules/js-yaml/package.json +1 -1
- data/vendor/node_modules/jscoverage/node_modules/ms/index.js +152 -0
- data/vendor/node_modules/{should-format/LICENSE → jscoverage/node_modules/ms/license.md} +1 -2
- data/vendor/node_modules/jscoverage/node_modules/ms/package.json +37 -0
- data/vendor/node_modules/jscoverage/node_modules/ms/readme.md +51 -0
- data/vendor/node_modules/log-symbols/index.d.ts +2 -2
- data/vendor/node_modules/log-symbols/index.js +3 -4
- data/vendor/node_modules/log-symbols/package.json +7 -5
- data/vendor/node_modules/log-symbols/readme.md +3 -3
- data/vendor/node_modules/loupe/CHANGELOG.md +5 -0
- data/vendor/node_modules/{cliui/node_modules/strip-ansi/license → loupe/LICENSE} +2 -2
- data/vendor/node_modules/loupe/README.md +63 -0
- data/vendor/node_modules/loupe/index.js +195 -0
- data/vendor/node_modules/loupe/lib/arguments.js +7 -0
- data/vendor/node_modules/loupe/lib/array.js +20 -0
- data/vendor/node_modules/loupe/lib/bigint.js +7 -0
- data/vendor/node_modules/loupe/lib/class.js +18 -0
- data/vendor/node_modules/loupe/lib/date.js +8 -0
- data/vendor/node_modules/loupe/lib/error.js +34 -0
- data/vendor/node_modules/loupe/lib/function.js +10 -0
- data/vendor/node_modules/loupe/lib/helpers.js +177 -0
- data/vendor/node_modules/loupe/lib/html.js +40 -0
- data/vendor/node_modules/loupe/lib/map.js +27 -0
- data/vendor/node_modules/loupe/lib/number.js +18 -0
- data/vendor/node_modules/loupe/lib/object.js +31 -0
- data/vendor/node_modules/loupe/lib/promise.js +16 -0
- data/vendor/node_modules/loupe/lib/regexp.js +8 -0
- data/vendor/node_modules/loupe/lib/set.js +16 -0
- data/vendor/node_modules/loupe/lib/string.js +29 -0
- data/vendor/node_modules/loupe/lib/symbol.js +6 -0
- data/vendor/node_modules/loupe/lib/typedarray.js +45 -0
- data/vendor/node_modules/loupe/loupe.js +852 -0
- data/vendor/node_modules/loupe/package.json +141 -0
- data/vendor/node_modules/minimatch/README.md +22 -1
- data/vendor/node_modules/minimatch/minimatch.js +93 -69
- data/vendor/node_modules/minimatch/package.json +6 -3
- data/vendor/node_modules/mocha/LICENSE +1 -1
- data/vendor/node_modules/mocha/README.md +1 -1
- data/vendor/node_modules/mocha/bin/mocha +18 -27
- data/vendor/node_modules/mocha/browser-entry.js +27 -20
- data/vendor/node_modules/mocha/lib/browser/growl.js +5 -5
- data/vendor/node_modules/mocha/lib/browser/parse-query.js +1 -1
- data/vendor/node_modules/mocha/lib/browser/progress.js +6 -6
- data/vendor/node_modules/mocha/lib/cli/cli.js +3 -2
- data/vendor/node_modules/mocha/lib/cli/config.js +7 -12
- data/vendor/node_modules/mocha/lib/cli/lookup-files.js +2 -8
- data/vendor/node_modules/mocha/lib/cli/node-flags.js +2 -5
- data/vendor/node_modules/mocha/lib/cli/one-and-dones.js +1 -2
- data/vendor/node_modules/mocha/lib/cli/run-helpers.js +15 -15
- data/vendor/node_modules/mocha/lib/cli/run-option-metadata.js +4 -0
- data/vendor/node_modules/mocha/lib/cli/run.js +13 -1
- data/vendor/node_modules/mocha/lib/cli/watch-run.js +3 -6
- data/vendor/node_modules/mocha/lib/context.js +5 -5
- data/vendor/node_modules/mocha/lib/errors.js +3 -3
- data/vendor/node_modules/mocha/lib/hook.js +9 -3
- data/vendor/node_modules/mocha/lib/interfaces/bdd.js +23 -20
- data/vendor/node_modules/mocha/lib/interfaces/common.js +7 -7
- data/vendor/node_modules/mocha/lib/interfaces/exports.js +1 -1
- data/vendor/node_modules/mocha/lib/interfaces/qunit.js +7 -7
- data/vendor/node_modules/mocha/lib/interfaces/tdd.js +9 -9
- data/vendor/node_modules/mocha/lib/mocha.js +105 -99
- data/vendor/node_modules/mocha/lib/nodejs/buffered-worker-pool.js +17 -1
- data/vendor/node_modules/mocha/lib/nodejs/esm-utils.js +124 -0
- data/vendor/node_modules/mocha/lib/reporters/base.js +49 -35
- data/vendor/node_modules/mocha/lib/reporters/doc.js +4 -4
- data/vendor/node_modules/mocha/lib/reporters/dot.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/html.js +12 -12
- data/vendor/node_modules/mocha/lib/reporters/json-stream.js +4 -4
- data/vendor/node_modules/mocha/lib/reporters/json.js +35 -10
- data/vendor/node_modules/mocha/lib/reporters/landing.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/list.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/markdown.js +5 -5
- data/vendor/node_modules/mocha/lib/reporters/min.js +1 -1
- data/vendor/node_modules/mocha/lib/reporters/nyan.js +16 -16
- data/vendor/node_modules/mocha/lib/reporters/progress.js +3 -3
- data/vendor/node_modules/mocha/lib/reporters/spec.js +6 -6
- data/vendor/node_modules/mocha/lib/reporters/tap.js +17 -17
- data/vendor/node_modules/mocha/lib/reporters/xunit.js +9 -9
- data/vendor/node_modules/mocha/lib/runnable.js +21 -21
- data/vendor/node_modules/mocha/lib/runner.js +63 -61
- data/vendor/node_modules/mocha/lib/stats-collector.js +7 -7
- data/vendor/node_modules/mocha/lib/suite.js +46 -75
- data/vendor/node_modules/mocha/lib/test.js +5 -5
- data/vendor/node_modules/mocha/lib/utils.js +19 -114
- data/vendor/node_modules/mocha/mocha-es2018.js +19794 -0
- data/vendor/node_modules/mocha/mocha.js +8059 -6920
- data/vendor/node_modules/mocha/mocha.js.map +1 -1
- data/vendor/node_modules/mocha/node_modules/debug/LICENSE +10 -9
- data/vendor/node_modules/mocha/node_modules/debug/README.md +24 -1
- data/vendor/node_modules/mocha/node_modules/debug/package.json +6 -6
- data/vendor/node_modules/mocha/node_modules/debug/src/common.js +15 -2
- data/vendor/node_modules/{semver → mocha/node_modules/minimatch}/LICENSE +1 -1
- data/vendor/node_modules/mocha/node_modules/minimatch/README.md +230 -0
- data/vendor/node_modules/mocha/node_modules/minimatch/minimatch.js +908 -0
- data/vendor/node_modules/mocha/node_modules/minimatch/package.json +31 -0
- data/vendor/node_modules/mocha/package.json +66 -65
- data/vendor/node_modules/ms/index.js +29 -19
- data/vendor/node_modules/ms/package.json +6 -6
- data/vendor/node_modules/ms/readme.md +18 -9
- data/vendor/node_modules/nanoid/README.md +9 -473
- data/vendor/node_modules/nanoid/async/index.browser.cjs +34 -0
- data/vendor/node_modules/nanoid/async/index.browser.js +7 -43
- data/vendor/node_modules/nanoid/async/index.cjs +5 -41
- data/vendor/node_modules/nanoid/async/index.d.ts +7 -7
- data/vendor/node_modules/nanoid/async/index.js +5 -41
- data/vendor/node_modules/nanoid/async/index.native.js +5 -36
- data/vendor/node_modules/nanoid/async/package.json +2 -1
- data/vendor/node_modules/nanoid/bin/nanoid.cjs +52 -2
- data/vendor/node_modules/nanoid/index.browser.cjs +37 -0
- data/vendor/node_modules/nanoid/index.browser.js +5 -73
- data/vendor/node_modules/nanoid/index.cjs +14 -49
- data/vendor/node_modules/nanoid/index.d.ts +9 -6
- data/vendor/node_modules/nanoid/index.js +14 -49
- data/vendor/node_modules/nanoid/non-secure/index.cjs +3 -12
- data/vendor/node_modules/nanoid/non-secure/index.d.ts +8 -5
- data/vendor/node_modules/nanoid/non-secure/index.js +3 -12
- data/vendor/node_modules/nanoid/package.json +14 -10
- data/vendor/node_modules/nanoid/url-alphabet/index.cjs +1 -4
- data/vendor/node_modules/nanoid/url-alphabet/index.js +1 -4
- data/vendor/node_modules/pathval/CHANGELOG.md +18 -0
- data/vendor/node_modules/pathval/LICENSE +16 -0
- data/vendor/node_modules/pathval/README.md +147 -0
- data/vendor/node_modules/pathval/index.js +301 -0
- data/vendor/node_modules/pathval/package.json +80 -0
- data/vendor/node_modules/pathval/pathval.js +1 -0
- data/vendor/node_modules/picomatch/CHANGELOG.md +16 -0
- data/vendor/node_modules/picomatch/README.md +34 -17
- data/vendor/node_modules/picomatch/lib/parse.js +19 -6
- data/vendor/node_modules/picomatch/lib/picomatch.js +34 -31
- data/vendor/node_modules/picomatch/lib/scan.js +8 -2
- data/vendor/node_modules/picomatch/package.json +1 -1
- data/vendor/node_modules/readdirp/index.js +11 -6
- data/vendor/node_modules/readdirp/package.json +1 -1
- data/vendor/node_modules/serialize-javascript/README.md +2 -4
- data/vendor/node_modules/serialize-javascript/index.js +11 -2
- data/vendor/node_modules/serialize-javascript/package.json +2 -2
- data/vendor/node_modules/source-map-resolve/LICENSE +1 -1
- data/vendor/node_modules/source-map-resolve/changelog.md +6 -0
- data/vendor/node_modules/source-map-resolve/{lib/source-map-resolve-node.js → index.js} +48 -13
- data/vendor/node_modules/source-map-resolve/package.json +7 -14
- data/vendor/node_modules/source-map-resolve/readme.md +1 -39
- data/vendor/node_modules/{cliui/node_modules/string-width → string-width}/index.d.ts +0 -0
- data/vendor/node_modules/string-width/index.js +16 -5
- data/vendor/node_modules/string-width/package.json +11 -10
- data/vendor/node_modules/string-width/readme.md +15 -7
- data/vendor/node_modules/{cliui/node_modules/strip-ansi → strip-ansi}/index.d.ts +0 -0
- data/vendor/node_modules/strip-ansi/index.js +1 -1
- data/vendor/node_modules/strip-ansi/package.json +52 -50
- data/vendor/node_modules/strip-ansi/readme.md +12 -5
- data/vendor/node_modules/{fsevents → type-detect}/LICENSE +1 -4
- data/vendor/node_modules/type-detect/README.md +228 -0
- data/vendor/node_modules/type-detect/index.js +378 -0
- data/vendor/node_modules/type-detect/package.json +1 -0
- data/vendor/node_modules/type-detect/type-detect.js +388 -0
- data/vendor/node_modules/workerpool/HISTORY.md +42 -0
- data/vendor/node_modules/workerpool/README.md +11 -1
- data/vendor/node_modules/workerpool/dist/worker.js +9 -42
- data/vendor/node_modules/workerpool/dist/worker.js.map +1 -1
- data/vendor/node_modules/workerpool/dist/workerpool.js +117 -74
- data/vendor/node_modules/workerpool/dist/workerpool.js.map +1 -1
- data/vendor/node_modules/workerpool/dist/workerpool.min.js +1 -1
- data/vendor/node_modules/workerpool/dist/workerpool.min.js.LICENSE.txt +3 -3
- data/vendor/node_modules/workerpool/dist/workerpool.min.js.map +1 -1
- data/vendor/node_modules/workerpool/package.json +11 -11
- data/vendor/node_modules/workerpool/src/Pool.js +29 -4
- data/vendor/node_modules/workerpool/src/WorkerHandler.js +17 -4
- data/vendor/node_modules/workerpool/src/generated/embeddedWorker.js +1 -1
- data/vendor/node_modules/workerpool/src/header.js +1 -1
- data/vendor/node_modules/workerpool/src/types.js +2 -1
- data/vendor/package-lock.json +401 -664
- data/vendor/package.json +7 -9
- metadata +139 -175
- data/vendor/node_modules/cliui/node_modules/ansi-regex/index.js +0 -10
- data/vendor/node_modules/cliui/node_modules/ansi-regex/license +0 -9
- data/vendor/node_modules/cliui/node_modules/ansi-regex/package.json +0 -55
- data/vendor/node_modules/cliui/node_modules/ansi-regex/readme.md +0 -78
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/index.js +0 -50
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/license +0 -9
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/package.json +0 -42
- data/vendor/node_modules/cliui/node_modules/is-fullwidth-code-point/readme.md +0 -39
- data/vendor/node_modules/cliui/node_modules/string-width/index.js +0 -47
- data/vendor/node_modules/cliui/node_modules/string-width/package.json +0 -56
- data/vendor/node_modules/cliui/node_modules/string-width/readme.md +0 -50
- data/vendor/node_modules/cliui/node_modules/strip-ansi/index.js +0 -4
- data/vendor/node_modules/cliui/node_modules/strip-ansi/package.json +0 -54
- data/vendor/node_modules/cliui/node_modules/strip-ansi/readme.md +0 -46
- data/vendor/node_modules/css-parse/Readme.md +0 -15
- data/vendor/node_modules/css-parse/index.js +0 -1
- data/vendor/node_modules/css-parse/package.json +0 -23
- data/vendor/node_modules/debug/CHANGELOG.md +0 -395
- data/vendor/node_modules/debug/Makefile +0 -58
- data/vendor/node_modules/debug/karma.conf.js +0 -70
- data/vendor/node_modules/debug/node.js +0 -1
- data/vendor/node_modules/debug/src/debug.js +0 -225
- data/vendor/node_modules/fsevents/README.md +0 -83
- data/vendor/node_modules/fsevents/fsevents.d.ts +0 -46
- data/vendor/node_modules/fsevents/fsevents.js +0 -82
- data/vendor/node_modules/fsevents/fsevents.node +0 -0
- data/vendor/node_modules/fsevents/package.json +0 -62
- data/vendor/node_modules/glob/changelog.md +0 -67
- data/vendor/node_modules/mkdirp/CHANGELOG.md +0 -15
- data/vendor/node_modules/mkdirp/bin/cmd.js +0 -68
- data/vendor/node_modules/mkdirp/index.js +0 -31
- data/vendor/node_modules/mkdirp/lib/find-made.js +0 -29
- data/vendor/node_modules/mkdirp/lib/mkdirp-manual.js +0 -64
- data/vendor/node_modules/mkdirp/lib/mkdirp-native.js +0 -39
- data/vendor/node_modules/mkdirp/lib/opts-arg.js +0 -23
- data/vendor/node_modules/mkdirp/lib/path-arg.js +0 -29
- data/vendor/node_modules/mkdirp/lib/use-native.js +0 -10
- data/vendor/node_modules/mkdirp/package.json +0 -44
- data/vendor/node_modules/mkdirp/readme.markdown +0 -266
- data/vendor/node_modules/mocha/CHANGELOG.md +0 -931
- data/vendor/node_modules/mocha/lib/esm-utils.js +0 -58
- data/vendor/node_modules/mocha/node_modules/glob/LICENSE +0 -21
- data/vendor/node_modules/mocha/node_modules/glob/README.md +0 -375
- data/vendor/node_modules/mocha/node_modules/glob/changelog.md +0 -67
- data/vendor/node_modules/mocha/node_modules/glob/common.js +0 -240
- data/vendor/node_modules/mocha/node_modules/glob/glob.js +0 -790
- data/vendor/node_modules/mocha/node_modules/glob/package.json +0 -46
- data/vendor/node_modules/mocha/node_modules/glob/sync.js +0 -486
- data/vendor/node_modules/nanoid/CHANGELOG.md +0 -241
- data/vendor/node_modules/nanoid/index.dev.js +0 -105
- data/vendor/node_modules/nanoid/index.prod.js +0 -105
- data/vendor/node_modules/resolve-url/bower.json +0 -15
- data/vendor/node_modules/resolve-url/changelog.md +0 -15
- data/vendor/node_modules/resolve-url/component.json +0 -15
- data/vendor/node_modules/resolve-url/package.json +0 -34
- data/vendor/node_modules/resolve-url/readme.md +0 -83
- data/vendor/node_modules/resolve-url/resolve-url.js +0 -47
- data/vendor/node_modules/resolve-url/test/resolve-url.js +0 -70
- data/vendor/node_modules/semver/CHANGELOG.md +0 -70
- data/vendor/node_modules/semver/README.md +0 -443
- data/vendor/node_modules/semver/bin/semver.js +0 -174
- data/vendor/node_modules/semver/package.json +0 -28
- data/vendor/node_modules/semver/range.bnf +0 -16
- data/vendor/node_modules/semver/semver.js +0 -1596
- data/vendor/node_modules/should/CONTRIBUTING.md +0 -14
- data/vendor/node_modules/should/History.md +0 -554
- data/vendor/node_modules/should/LICENSE +0 -20
- data/vendor/node_modules/should/Readme.md +0 -223
- data/vendor/node_modules/should/as-function.js +0 -2935
- data/vendor/node_modules/should/cjs/should.js +0 -2962
- data/vendor/node_modules/should/es6/should.js +0 -2958
- data/vendor/node_modules/should/package.json +0 -51
- data/vendor/node_modules/should/should.d.ts +0 -243
- data/vendor/node_modules/should/should.js +0 -4371
- data/vendor/node_modules/should-equal/LICENSE +0 -21
- data/vendor/node_modules/should-equal/README.md +0 -24
- data/vendor/node_modules/should-equal/cjs/should-equal.js +0 -333
- data/vendor/node_modules/should-equal/es6/should-equal.js +0 -329
- data/vendor/node_modules/should-equal/package.json +0 -38
- data/vendor/node_modules/should-format/README.md +0 -6
- data/vendor/node_modules/should-format/cjs/should-format.js +0 -532
- data/vendor/node_modules/should-format/es6/should-format.js +0 -528
- data/vendor/node_modules/should-format/package.json +0 -44
- data/vendor/node_modules/should-type/LICENSE +0 -22
- data/vendor/node_modules/should-type/README.md +0 -4
- data/vendor/node_modules/should-type/cjs/should-type.js +0 -263
- data/vendor/node_modules/should-type/es6/should-type.js +0 -261
- data/vendor/node_modules/should-type/package.json +0 -38
- data/vendor/node_modules/should-type-adaptors/README.md +0 -1
- data/vendor/node_modules/should-type-adaptors/cjs/should-type-adaptors.js +0 -288
- data/vendor/node_modules/should-type-adaptors/es6/should-type-adaptors.js +0 -272
- data/vendor/node_modules/should-type-adaptors/package.json +0 -43
- data/vendor/node_modules/should-util/LICENSE +0 -21
- data/vendor/node_modules/should-util/README.md +0 -2
- data/vendor/node_modules/should-util/cjs/should-util.js +0 -50
- data/vendor/node_modules/should-util/es6/should-util.js +0 -42
- data/vendor/node_modules/should-util/package.json +0 -40
- data/vendor/node_modules/source-map-resolve/lib/decode-uri-component.js +0 -8
- data/vendor/node_modules/source-map-resolve/lib/resolve-url.js +0 -9
- data/vendor/node_modules/source-map-resolve/source-map-resolve.js +0 -348
- data/vendor/node_modules/source-map-url/changelog.md +0 -57
- data/vendor/node_modules/source-map-url/package.json +0 -39
- data/vendor/node_modules/source-map-url/readme.md +0 -97
- data/vendor/node_modules/source-map-url/source-map-url.js +0 -57
- data/vendor/node_modules/urix/index.js +0 -17
- data/vendor/node_modules/urix/package.json +0 -25
- data/vendor/node_modules/urix/readme.md +0 -46
- data/vendor/node_modules/urix/test/index.js +0 -43
- data/vendor/node_modules/wide-align/LICENSE +0 -14
- data/vendor/node_modules/wide-align/README.md +0 -47
- data/vendor/node_modules/wide-align/align.js +0 -65
- data/vendor/node_modules/wide-align/package.json +0 -33
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/index.d.ts +0 -37
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +0 -10
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +0 -55
- data/vendor/node_modules/wrap-ansi/node_modules/ansi-regex/readme.md +0 -78
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/index.js +0 -50
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/package.json +0 -42
- data/vendor/node_modules/wrap-ansi/node_modules/is-fullwidth-code-point/readme.md +0 -39
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/index.d.ts +0 -29
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/index.js +0 -47
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/package.json +0 -56
- data/vendor/node_modules/wrap-ansi/node_modules/string-width/readme.md +0 -50
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/index.d.ts +0 -17
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +0 -4
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/license +0 -9
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +0 -54
- data/vendor/node_modules/wrap-ansi/node_modules/strip-ansi/readme.md +0 -46
- data/vendor/node_modules/yargs/node_modules/ansi-regex/index.d.ts +0 -37
- data/vendor/node_modules/yargs/node_modules/ansi-regex/index.js +0 -10
- data/vendor/node_modules/yargs/node_modules/ansi-regex/license +0 -9
- data/vendor/node_modules/yargs/node_modules/ansi-regex/package.json +0 -55
- data/vendor/node_modules/yargs/node_modules/ansi-regex/readme.md +0 -78
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/index.js +0 -50
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/license +0 -9
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/package.json +0 -42
- data/vendor/node_modules/yargs/node_modules/is-fullwidth-code-point/readme.md +0 -39
- data/vendor/node_modules/yargs/node_modules/string-width/index.d.ts +0 -29
- data/vendor/node_modules/yargs/node_modules/string-width/index.js +0 -47
- data/vendor/node_modules/yargs/node_modules/string-width/license +0 -9
- data/vendor/node_modules/yargs/node_modules/string-width/package.json +0 -56
- data/vendor/node_modules/yargs/node_modules/string-width/readme.md +0 -50
- data/vendor/node_modules/yargs/node_modules/strip-ansi/index.d.ts +0 -17
- data/vendor/node_modules/yargs/node_modules/strip-ansi/index.js +0 -4
- data/vendor/node_modules/yargs/node_modules/strip-ansi/license +0 -9
- data/vendor/node_modules/yargs/node_modules/strip-ansi/package.json +0 -54
- data/vendor/node_modules/yargs/node_modules/strip-ansi/readme.md +0 -46
- data/vendor/test.js +0 -31
@@ -40,12 +40,12 @@ var originalOnerrorHandler = global.onerror;
|
|
40
40
|
* Revert to original onerror handler if previously defined.
|
41
41
|
*/
|
42
42
|
|
43
|
-
process.removeListener = function(e, fn) {
|
43
|
+
process.removeListener = function (e, fn) {
|
44
44
|
if (e === 'uncaughtException') {
|
45
45
|
if (originalOnerrorHandler) {
|
46
46
|
global.onerror = originalOnerrorHandler;
|
47
47
|
} else {
|
48
|
-
global.onerror = function() {};
|
48
|
+
global.onerror = function () {};
|
49
49
|
}
|
50
50
|
var i = uncaughtExceptionHandlers.indexOf(fn);
|
51
51
|
if (i !== -1) {
|
@@ -58,7 +58,7 @@ process.removeListener = function(e, fn) {
|
|
58
58
|
* Implements listenerCount for 'uncaughtException'.
|
59
59
|
*/
|
60
60
|
|
61
|
-
process.listenerCount = function(name) {
|
61
|
+
process.listenerCount = function (name) {
|
62
62
|
if (name === 'uncaughtException') {
|
63
63
|
return uncaughtExceptionHandlers.length;
|
64
64
|
}
|
@@ -69,9 +69,9 @@ process.listenerCount = function(name) {
|
|
69
69
|
* Implements uncaughtException listener.
|
70
70
|
*/
|
71
71
|
|
72
|
-
process.on = function(e, fn) {
|
72
|
+
process.on = function (e, fn) {
|
73
73
|
if (e === 'uncaughtException') {
|
74
|
-
global.onerror = function(err, url, line) {
|
74
|
+
global.onerror = function (err, url, line) {
|
75
75
|
fn(new Error(err + ' (' + url + ':' + line + ')'));
|
76
76
|
return !mocha.options.allowUncaught;
|
77
77
|
};
|
@@ -79,7 +79,7 @@ process.on = function(e, fn) {
|
|
79
79
|
}
|
80
80
|
};
|
81
81
|
|
82
|
-
process.listeners = function(e) {
|
82
|
+
process.listeners = function (e) {
|
83
83
|
if (e === 'uncaughtException') {
|
84
84
|
return uncaughtExceptionHandlers;
|
85
85
|
}
|
@@ -110,7 +110,7 @@ function timeslice() {
|
|
110
110
|
* High-performance override of Runner.immediately.
|
111
111
|
*/
|
112
112
|
|
113
|
-
Mocha.Runner.immediately = function(callback) {
|
113
|
+
Mocha.Runner.immediately = function (callback) {
|
114
114
|
immediateQueue.push(callback);
|
115
115
|
if (!immediateTimeout) {
|
116
116
|
immediateTimeout = setTimeout(timeslice, 0);
|
@@ -122,8 +122,8 @@ Mocha.Runner.immediately = function(callback) {
|
|
122
122
|
* This is useful when running tests in a browser because window.onerror will
|
123
123
|
* only receive the 'message' attribute of the Error.
|
124
124
|
*/
|
125
|
-
mocha.throwError = function(err) {
|
126
|
-
uncaughtExceptionHandlers.forEach(function(fn) {
|
125
|
+
mocha.throwError = function (err) {
|
126
|
+
uncaughtExceptionHandlers.forEach(function (fn) {
|
127
127
|
fn(err);
|
128
128
|
});
|
129
129
|
throw err;
|
@@ -134,7 +134,7 @@ mocha.throwError = function(err) {
|
|
134
134
|
* Normally this would happen in Mocha.prototype.loadFiles.
|
135
135
|
*/
|
136
136
|
|
137
|
-
mocha.ui = function(ui) {
|
137
|
+
mocha.ui = function (ui) {
|
138
138
|
Mocha.prototype.ui.call(this, ui);
|
139
139
|
this.suite.emit('pre-require', global, null, this);
|
140
140
|
return this;
|
@@ -144,7 +144,7 @@ mocha.ui = function(ui) {
|
|
144
144
|
* Setup mocha with the given setting options.
|
145
145
|
*/
|
146
146
|
|
147
|
-
mocha.setup = function(opts) {
|
147
|
+
mocha.setup = function (opts) {
|
148
148
|
if (typeof opts === 'string') {
|
149
149
|
opts = {ui: opts};
|
150
150
|
}
|
@@ -153,10 +153,10 @@ mocha.setup = function(opts) {
|
|
153
153
|
}
|
154
154
|
var self = this;
|
155
155
|
Object.keys(opts)
|
156
|
-
.filter(function(opt) {
|
156
|
+
.filter(function (opt) {
|
157
157
|
return opt !== 'delay';
|
158
158
|
})
|
159
|
-
.forEach(function(opt) {
|
159
|
+
.forEach(function (opt) {
|
160
160
|
if (Object.prototype.hasOwnProperty.call(opts, opt)) {
|
161
161
|
self[opt](opts[opt]);
|
162
162
|
}
|
@@ -168,7 +168,7 @@ mocha.setup = function(opts) {
|
|
168
168
|
* Run mocha, returning the Runner.
|
169
169
|
*/
|
170
170
|
|
171
|
-
mocha.run = function(fn) {
|
171
|
+
mocha.run = function (fn) {
|
172
172
|
var options = mocha.options;
|
173
173
|
mocha.globals('location');
|
174
174
|
|
@@ -183,7 +183,7 @@ mocha.run = function(fn) {
|
|
183
183
|
mocha.invert();
|
184
184
|
}
|
185
185
|
|
186
|
-
return Mocha.prototype.run.call(mocha, function(err) {
|
186
|
+
return Mocha.prototype.run.call(mocha, function (err) {
|
187
187
|
// The DOM Document is not available in Web Workers.
|
188
188
|
var document = global.document;
|
189
189
|
if (
|
@@ -209,11 +209,18 @@ Mocha.process = process;
|
|
209
209
|
/**
|
210
210
|
* Expose mocha.
|
211
211
|
*/
|
212
|
-
|
213
212
|
global.Mocha = Mocha;
|
214
213
|
global.mocha = mocha;
|
215
214
|
|
216
|
-
//
|
217
|
-
//
|
218
|
-
//
|
219
|
-
|
215
|
+
// for bundlers: enable `import {describe, it} from 'mocha'`
|
216
|
+
// `bdd` interface only
|
217
|
+
// prettier-ignore
|
218
|
+
[
|
219
|
+
'describe', 'context', 'it', 'specify',
|
220
|
+
'xdescribe', 'xcontext', 'xit', 'xspecify',
|
221
|
+
'before', 'beforeEach', 'afterEach', 'after'
|
222
|
+
].forEach(function(key) {
|
223
|
+
mocha[key] = global[key];
|
224
|
+
});
|
225
|
+
|
226
|
+
module.exports = mocha;
|
@@ -23,7 +23,7 @@ var isBrowser = require('../utils').isBrowser;
|
|
23
23
|
* @see {@link Mocha#isGrowlCapable}
|
24
24
|
* @return {boolean} whether browser notification support exists
|
25
25
|
*/
|
26
|
-
exports.isCapable = function() {
|
26
|
+
exports.isCapable = function () {
|
27
27
|
var hasNotificationSupport = 'Notification' in window;
|
28
28
|
var hasPromiseSupport = typeof Promise === 'function';
|
29
29
|
return isBrowser() && hasNotificationSupport && hasPromiseSupport;
|
@@ -39,17 +39,17 @@ exports.isCapable = function() {
|
|
39
39
|
* @see {@link Mocha#_growl}
|
40
40
|
* @param {Runner} runner - Runner instance.
|
41
41
|
*/
|
42
|
-
exports.notify = function(runner) {
|
42
|
+
exports.notify = function (runner) {
|
43
43
|
var promise = isPermitted();
|
44
44
|
|
45
45
|
/**
|
46
46
|
* Attempt notification.
|
47
47
|
*/
|
48
|
-
var sendNotification = function() {
|
48
|
+
var sendNotification = function () {
|
49
49
|
// If user hasn't responded yet... "No notification for you!" (Seinfeld)
|
50
50
|
Promise.race([promise, Promise.resolve(undefined)])
|
51
51
|
.then(canNotify)
|
52
|
-
.then(function() {
|
52
|
+
.then(function () {
|
53
53
|
display(runner);
|
54
54
|
})
|
55
55
|
.catch(notPermitted);
|
@@ -77,7 +77,7 @@ function isPermitted() {
|
|
77
77
|
return Promise.resolve(false);
|
78
78
|
},
|
79
79
|
default: function ask() {
|
80
|
-
return Notification.requestPermission().then(function(permission) {
|
80
|
+
return Notification.requestPermission().then(function (permission) {
|
81
81
|
return permission === 'granted';
|
82
82
|
});
|
83
83
|
}
|
@@ -27,7 +27,7 @@ function Progress() {
|
|
27
27
|
* @param {number} size
|
28
28
|
* @return {Progress} Progress instance.
|
29
29
|
*/
|
30
|
-
Progress.prototype.size = function(size) {
|
30
|
+
Progress.prototype.size = function (size) {
|
31
31
|
this._size = size;
|
32
32
|
return this;
|
33
33
|
};
|
@@ -39,7 +39,7 @@ Progress.prototype.size = function(size) {
|
|
39
39
|
* @param {string} text
|
40
40
|
* @return {Progress} Progress instance.
|
41
41
|
*/
|
42
|
-
Progress.prototype.text = function(text) {
|
42
|
+
Progress.prototype.text = function (text) {
|
43
43
|
this._text = text;
|
44
44
|
return this;
|
45
45
|
};
|
@@ -51,7 +51,7 @@ Progress.prototype.text = function(text) {
|
|
51
51
|
* @param {number} size
|
52
52
|
* @return {Progress} Progress instance.
|
53
53
|
*/
|
54
|
-
Progress.prototype.fontSize = function(size) {
|
54
|
+
Progress.prototype.fontSize = function (size) {
|
55
55
|
this._fontSize = size;
|
56
56
|
return this;
|
57
57
|
};
|
@@ -62,7 +62,7 @@ Progress.prototype.fontSize = function(size) {
|
|
62
62
|
* @param {string} family
|
63
63
|
* @return {Progress} Progress instance.
|
64
64
|
*/
|
65
|
-
Progress.prototype.font = function(family) {
|
65
|
+
Progress.prototype.font = function (family) {
|
66
66
|
this._font = family;
|
67
67
|
return this;
|
68
68
|
};
|
@@ -73,7 +73,7 @@ Progress.prototype.font = function(family) {
|
|
73
73
|
* @param {number} n
|
74
74
|
* @return {Progress} Progress instance.
|
75
75
|
*/
|
76
|
-
Progress.prototype.update = function(n) {
|
76
|
+
Progress.prototype.update = function (n) {
|
77
77
|
this.percent = n;
|
78
78
|
return this;
|
79
79
|
};
|
@@ -84,7 +84,7 @@ Progress.prototype.update = function(n) {
|
|
84
84
|
* @param {CanvasRenderingContext2d} ctx
|
85
85
|
* @return {Progress} Progress instance.
|
86
86
|
*/
|
87
|
-
Progress.prototype.draw = function(ctx) {
|
87
|
+
Progress.prototype.draw = function (ctx) {
|
88
88
|
try {
|
89
89
|
var percent = Math.min(this.percent, 100);
|
90
90
|
var size = this._size;
|
@@ -33,8 +33,9 @@ const {cwd} = require('../utils');
|
|
33
33
|
* @public
|
34
34
|
* @summary Mocha's main command-line entry-point.
|
35
35
|
* @param {string[]} argv - Array of arguments to parse, or by default the lovely `process.argv.slice(2)`
|
36
|
+
* @param {object} [mochaArgs] - Object of already parsed Mocha arguments (by bin/mocha)
|
36
37
|
*/
|
37
|
-
exports.main = (argv = process.argv.slice(2)) => {
|
38
|
+
exports.main = (argv = process.argv.slice(2), mochaArgs) => {
|
38
39
|
debug('entered main with raw args', argv);
|
39
40
|
// ensure we can require() from current working directory
|
40
41
|
if (typeof module.paths !== 'undefined') {
|
@@ -43,7 +44,7 @@ exports.main = (argv = process.argv.slice(2)) => {
|
|
43
44
|
|
44
45
|
Error.stackTraceLimit = Infinity; // configurable via --stack-trace-limit?
|
45
46
|
|
46
|
-
var args = loadOptions(argv);
|
47
|
+
var args = mochaArgs || loadOptions(argv);
|
47
48
|
|
48
49
|
yargs()
|
49
50
|
.scriptName('mocha')
|
@@ -30,10 +30,6 @@ exports.CONFIG_FILES = [
|
|
30
30
|
'.mocharc.json'
|
31
31
|
];
|
32
32
|
|
33
|
-
const isModuleNotFoundError = err =>
|
34
|
-
err.code !== 'MODULE_NOT_FOUND' ||
|
35
|
-
err.message.indexOf('Cannot find module') !== -1;
|
36
|
-
|
37
33
|
/**
|
38
34
|
* Parsers for various config filetypes. Each accepts a filepath and
|
39
35
|
* returns an object (but could throw)
|
@@ -41,17 +37,16 @@ const isModuleNotFoundError = err =>
|
|
41
37
|
const parsers = (exports.parsers = {
|
42
38
|
yaml: filepath => require('js-yaml').load(fs.readFileSync(filepath, 'utf8')),
|
43
39
|
js: filepath => {
|
44
|
-
|
40
|
+
let cwdFilepath;
|
45
41
|
try {
|
46
|
-
debug('parsers: load
|
42
|
+
debug('parsers: load cwd-relative path: "%s"', path.resolve(filepath));
|
43
|
+
cwdFilepath = require.resolve(path.resolve(filepath)); // evtl. throws
|
47
44
|
return require(cwdFilepath);
|
48
45
|
} catch (err) {
|
49
|
-
if (
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
throw err; // rethrow
|
54
|
-
}
|
46
|
+
if (cwdFilepath) throw err;
|
47
|
+
|
48
|
+
debug('parsers: retry load as module-relative path: "%s"', filepath);
|
49
|
+
return require(filepath);
|
55
50
|
}
|
56
51
|
},
|
57
52
|
json: filepath =>
|
@@ -8,11 +8,9 @@
|
|
8
8
|
var fs = require('fs');
|
9
9
|
var path = require('path');
|
10
10
|
var glob = require('glob');
|
11
|
-
var {format} = require('util');
|
12
11
|
var errors = require('../errors');
|
13
12
|
var createNoFilesMatchPatternError = errors.createNoFilesMatchPatternError;
|
14
13
|
var createMissingArgumentError = errors.createMissingArgumentError;
|
15
|
-
var {sQuote, dQuote} = require('../utils');
|
16
14
|
const debug = require('debug')('mocha:cli:lookup-files');
|
17
15
|
|
18
16
|
/**
|
@@ -91,7 +89,7 @@ module.exports = function lookupFiles(
|
|
91
89
|
files.push(...glob.sync(pattern, {nodir: true}));
|
92
90
|
if (!files.length) {
|
93
91
|
throw createNoFilesMatchPatternError(
|
94
|
-
|
92
|
+
`Cannot find any files matching pattern "${filepath}"`,
|
95
93
|
filepath
|
96
94
|
);
|
97
95
|
}
|
@@ -127,11 +125,7 @@ module.exports = function lookupFiles(
|
|
127
125
|
}
|
128
126
|
if (!extensions.length) {
|
129
127
|
throw createMissingArgumentError(
|
130
|
-
|
131
|
-
'Argument %s required when argument %s is a directory',
|
132
|
-
sQuote('extensions'),
|
133
|
-
sQuote('filepath')
|
134
|
-
),
|
128
|
+
`Argument '${extensions}' required when argument '${filepath}' is a directory`,
|
135
129
|
'extensions',
|
136
130
|
'array'
|
137
131
|
);
|
@@ -49,7 +49,7 @@ exports.isNodeFlag = (flag, bareword = true) => {
|
|
49
49
|
// and also any V8 flags with `--v8-` prefix
|
50
50
|
(!isMochaFlag(flag) && nodeFlags && nodeFlags.has(flag)) ||
|
51
51
|
debugFlags.has(flag) ||
|
52
|
-
/(?:preserve-symlinks(?:-main)?|harmony(?:[_-]|$)|(?:trace[_-].+$)|gc
|
52
|
+
/(?:preserve-symlinks(?:-main)?|harmony(?:[_-]|$)|(?:trace[_-].+$)|gc[_-]global$|es[_-]staging$|use[_-]strict$|v8[_-](?!options).+?$)/.test(
|
53
53
|
flag
|
54
54
|
)
|
55
55
|
);
|
@@ -67,7 +67,6 @@ exports.impliesNoTimeouts = flag => debugFlags.has(flag);
|
|
67
67
|
/**
|
68
68
|
* All non-strictly-boolean arguments to node--those with values--must specify those values using `=`, e.g., `--inspect=0.0.0.0`.
|
69
69
|
* Unparse these arguments using `yargs-unparser` (which would result in `--inspect 0.0.0.0`), then supply `=` where we have values.
|
70
|
-
* Apparently --require in Node.js v8 does NOT want `=`.
|
71
70
|
* There's probably an easier or more robust way to do this; fixes welcome
|
72
71
|
* @param {Object} opts - Arguments object
|
73
72
|
* @returns {string[]} Unparsed arguments using `=` to specify values
|
@@ -79,9 +78,7 @@ exports.unparseNodeFlags = opts => {
|
|
79
78
|
? args
|
80
79
|
.join(' ')
|
81
80
|
.split(/\b/)
|
82
|
-
.map((arg
|
83
|
-
arg === ' ' && args[index - 1] !== 'require' ? '=' : arg
|
84
|
-
)
|
81
|
+
.map(arg => (arg === ' ' ? '=' : arg))
|
85
82
|
.join('')
|
86
83
|
.split(' ')
|
87
84
|
: [];
|
@@ -8,7 +8,6 @@
|
|
8
8
|
* @private
|
9
9
|
*/
|
10
10
|
|
11
|
-
const align = require('wide-align');
|
12
11
|
const Mocha = require('../mocha');
|
13
12
|
|
14
13
|
/**
|
@@ -30,7 +29,7 @@ const showKeys = obj => {
|
|
30
29
|
.forEach(key => {
|
31
30
|
const description = obj[key].description;
|
32
31
|
console.log(
|
33
|
-
` ${
|
32
|
+
` ${key.padEnd(maxKeyLength + 1)}${
|
34
33
|
description ? `- ${description}` : ''
|
35
34
|
}`
|
36
35
|
);
|
@@ -14,7 +14,7 @@ const {watchRun, watchParallelRun} = require('./watch-run');
|
|
14
14
|
const collectFiles = require('./collect-files');
|
15
15
|
const {format} = require('util');
|
16
16
|
const {createInvalidLegacyPluginError} = require('../errors');
|
17
|
-
const {requireOrImport} = require('../esm-utils');
|
17
|
+
const {requireOrImport} = require('../nodejs/esm-utils');
|
18
18
|
const PluginLoader = require('../plugin-loader');
|
19
19
|
|
20
20
|
/**
|
@@ -195,10 +195,10 @@ exports.runMocha = async (mocha, options) => {
|
|
195
195
|
* it actually exists. This must be run _after_ requires are processed (see
|
196
196
|
* {@link handleRequires}), as it'll prevent interfaces from loading otherwise.
|
197
197
|
* @param {Object} opts - Options object
|
198
|
-
* @param {"reporter"|"
|
199
|
-
* @param {Object} [map] -
|
200
|
-
*
|
201
|
-
* name
|
198
|
+
* @param {"reporter"|"ui"} pluginType - Type of plugin.
|
199
|
+
* @param {Object} [map] - Used as a cache of sorts;
|
200
|
+
* `Mocha.reporters` where each key corresponds to a reporter name,
|
201
|
+
* `Mocha.interfaces` where each key corresponds to an interface name.
|
202
202
|
* @private
|
203
203
|
*/
|
204
204
|
exports.validateLegacyPlugin = (opts, pluginType, map = {}) => {
|
@@ -225,18 +225,18 @@ exports.validateLegacyPlugin = (opts, pluginType, map = {}) => {
|
|
225
225
|
|
226
226
|
// if this exists, then it's already loaded, so nothing more to do.
|
227
227
|
if (!map[pluginId]) {
|
228
|
+
let foundId;
|
228
229
|
try {
|
229
|
-
|
230
|
+
foundId = require.resolve(pluginId);
|
231
|
+
map[pluginId] = require(foundId);
|
230
232
|
} catch (err) {
|
231
|
-
if (
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
} else {
|
239
|
-
throw createUnknownError(err);
|
233
|
+
if (foundId) throw createUnknownError(err);
|
234
|
+
|
235
|
+
// Try to load reporters from a cwd-relative path
|
236
|
+
try {
|
237
|
+
map[pluginId] = require(path.resolve(pluginId));
|
238
|
+
} catch (e) {
|
239
|
+
throw createUnknownError(e);
|
240
240
|
}
|
241
241
|
}
|
242
242
|
}
|
@@ -18,6 +18,7 @@ const TYPES = (exports.types = {
|
|
18
18
|
'file',
|
19
19
|
'global',
|
20
20
|
'ignore',
|
21
|
+
'node-option',
|
21
22
|
'reporter-option',
|
22
23
|
'require',
|
23
24
|
'spec',
|
@@ -32,7 +33,9 @@ const TYPES = (exports.types = {
|
|
32
33
|
'color',
|
33
34
|
'delay',
|
34
35
|
'diff',
|
36
|
+
'dry-run',
|
35
37
|
'exit',
|
38
|
+
'fail-zero',
|
36
39
|
'forbid-only',
|
37
40
|
'forbid-pending',
|
38
41
|
'full-trace',
|
@@ -78,6 +81,7 @@ exports.aliases = {
|
|
78
81
|
invert: ['i'],
|
79
82
|
jobs: ['j'],
|
80
83
|
'no-colors': ['C'],
|
84
|
+
'node-option': ['n'],
|
81
85
|
parallel: ['p'],
|
82
86
|
reporter: ['R'],
|
83
87
|
'reporter-option': ['reporter-options', 'O'],
|
@@ -83,6 +83,10 @@ exports.builder = yargs =>
|
|
83
83
|
description: 'Show diff on failure',
|
84
84
|
group: GROUPS.OUTPUT
|
85
85
|
},
|
86
|
+
'dry-run': {
|
87
|
+
description: 'Report tests without executing them',
|
88
|
+
group: GROUPS.RULES
|
89
|
+
},
|
86
90
|
exit: {
|
87
91
|
description: 'Force Mocha to quit after tests complete',
|
88
92
|
group: GROUPS.RULES
|
@@ -94,6 +98,10 @@ exports.builder = yargs =>
|
|
94
98
|
requiresArg: true,
|
95
99
|
coerce: list
|
96
100
|
},
|
101
|
+
'fail-zero': {
|
102
|
+
description: 'Fail test run if no test(s) encountered',
|
103
|
+
group: GROUPS.RULES
|
104
|
+
},
|
97
105
|
fgrep: {
|
98
106
|
conflicts: 'grep',
|
99
107
|
description: 'Only run tests containing this string',
|
@@ -172,6 +180,10 @@ exports.builder = yargs =>
|
|
172
180
|
group: GROUPS.OUTPUT,
|
173
181
|
hidden: true
|
174
182
|
},
|
183
|
+
'node-option': {
|
184
|
+
description: 'Node or V8 option (no leading "--")',
|
185
|
+
group: GROUPS.CONFIG
|
186
|
+
},
|
175
187
|
package: {
|
176
188
|
description: 'Path to package.json for config',
|
177
189
|
group: GROUPS.CONFIG,
|
@@ -354,7 +366,7 @@ exports.builder = yargs =>
|
|
354
366
|
.number(types.number)
|
355
367
|
.alias(aliases);
|
356
368
|
|
357
|
-
exports.handler = async function(argv) {
|
369
|
+
exports.handler = async function (argv) {
|
358
370
|
debug('post-yargs config', argv);
|
359
371
|
const mocha = new Mocha(argv);
|
360
372
|
|
@@ -46,7 +46,7 @@ exports.watchParallelRun = (
|
|
46
46
|
|
47
47
|
// this `require` is needed because the require cache has been cleared. the dynamic
|
48
48
|
// exports set via the below call to `mocha.ui()` won't work properly if a
|
49
|
-
// test depends on this module
|
49
|
+
// test depends on this module.
|
50
50
|
const Mocha = require('../mocha');
|
51
51
|
|
52
52
|
// ... and now that we've gotten a new module, we need to use it again due
|
@@ -108,7 +108,7 @@ exports.watchRun = (mocha, {watchFiles, watchIgnore}, fileCollectParams) => {
|
|
108
108
|
|
109
109
|
// this `require` is needed because the require cache has been cleared. the dynamic
|
110
110
|
// exports set via the below call to `mocha.ui()` won't work properly if a
|
111
|
-
// test depends on this module
|
111
|
+
// test depends on this module.
|
112
112
|
const Mocha = require('../mocha');
|
113
113
|
|
114
114
|
// ... and now that we've gotten a new module, we need to use it again due
|
@@ -231,10 +231,7 @@ const createWatcher = (
|
|
231
231
|
process.stdin.resume();
|
232
232
|
process.stdin.setEncoding('utf8');
|
233
233
|
process.stdin.on('data', data => {
|
234
|
-
const str = data
|
235
|
-
.toString()
|
236
|
-
.trim()
|
237
|
-
.toLowerCase();
|
234
|
+
const str = data.toString().trim().toLowerCase();
|
238
235
|
if (str === 'rs') rerunner.scheduleRun();
|
239
236
|
});
|
240
237
|
|
@@ -22,7 +22,7 @@ function Context() {}
|
|
22
22
|
* @param {Runnable} runnable
|
23
23
|
* @return {Context} context
|
24
24
|
*/
|
25
|
-
Context.prototype.runnable = function(runnable) {
|
25
|
+
Context.prototype.runnable = function (runnable) {
|
26
26
|
if (!arguments.length) {
|
27
27
|
return this._runnable;
|
28
28
|
}
|
@@ -37,7 +37,7 @@ Context.prototype.runnable = function(runnable) {
|
|
37
37
|
* @param {number} ms
|
38
38
|
* @return {Context} self
|
39
39
|
*/
|
40
|
-
Context.prototype.timeout = function(ms) {
|
40
|
+
Context.prototype.timeout = function (ms) {
|
41
41
|
if (!arguments.length) {
|
42
42
|
return this.runnable().timeout();
|
43
43
|
}
|
@@ -52,7 +52,7 @@ Context.prototype.timeout = function(ms) {
|
|
52
52
|
* @param {number} ms
|
53
53
|
* @return {Context} self
|
54
54
|
*/
|
55
|
-
Context.prototype.slow = function(ms) {
|
55
|
+
Context.prototype.slow = function (ms) {
|
56
56
|
if (!arguments.length) {
|
57
57
|
return this.runnable().slow();
|
58
58
|
}
|
@@ -66,7 +66,7 @@ Context.prototype.slow = function(ms) {
|
|
66
66
|
* @private
|
67
67
|
* @throws Pending
|
68
68
|
*/
|
69
|
-
Context.prototype.skip = function() {
|
69
|
+
Context.prototype.skip = function () {
|
70
70
|
this.runnable().skip();
|
71
71
|
};
|
72
72
|
|
@@ -77,7 +77,7 @@ Context.prototype.skip = function() {
|
|
77
77
|
* @param {number} n
|
78
78
|
* @return {Context} self
|
79
79
|
*/
|
80
|
-
Context.prototype.retries = function(n) {
|
80
|
+
Context.prototype.retries = function (n) {
|
81
81
|
if (!arguments.length) {
|
82
82
|
return this.runnable().retries();
|
83
83
|
}
|
@@ -18,7 +18,7 @@ const emitWarning = (msg, type) => {
|
|
18
18
|
process.emitWarning(msg, type);
|
19
19
|
} else {
|
20
20
|
/* istanbul ignore next */
|
21
|
-
process.nextTick(function() {
|
21
|
+
process.nextTick(function () {
|
22
22
|
console.warn(type + ': ' + msg);
|
23
23
|
});
|
24
24
|
}
|
@@ -328,7 +328,7 @@ function createFatalError(message, value) {
|
|
328
328
|
/**
|
329
329
|
* Dynamically creates a plugin-type-specific error based on plugin type
|
330
330
|
* @param {string} message - Error message
|
331
|
-
* @param {"reporter"|"
|
331
|
+
* @param {"reporter"|"ui"} pluginType - Plugin type. Future: expand as needed
|
332
332
|
* @param {string} [pluginId] - Name/path of plugin, if any
|
333
333
|
* @throws When `pluginType` is not known
|
334
334
|
* @public
|
@@ -339,7 +339,7 @@ function createInvalidLegacyPluginError(message, pluginType, pluginId) {
|
|
339
339
|
switch (pluginType) {
|
340
340
|
case 'reporter':
|
341
341
|
return createInvalidReporterError(message, pluginId);
|
342
|
-
case '
|
342
|
+
case 'ui':
|
343
343
|
return createInvalidInterfaceError(message, pluginId);
|
344
344
|
default:
|
345
345
|
throw new Error('unknown pluginType "' + pluginType + '"');
|
@@ -31,7 +31,7 @@ inherits(Hook, Runnable);
|
|
31
31
|
/**
|
32
32
|
* Resets the state for a next run.
|
33
33
|
*/
|
34
|
-
Hook.prototype.reset = function() {
|
34
|
+
Hook.prototype.reset = function () {
|
35
35
|
Runnable.prototype.reset.call(this);
|
36
36
|
delete this._error;
|
37
37
|
};
|
@@ -44,7 +44,7 @@ Hook.prototype.reset = function() {
|
|
44
44
|
* @param {Error} err
|
45
45
|
* @return {Error}
|
46
46
|
*/
|
47
|
-
Hook.prototype.error = function(err) {
|
47
|
+
Hook.prototype.error = function (err) {
|
48
48
|
if (!arguments.length) {
|
49
49
|
err = this._error;
|
50
50
|
this._error = null;
|
@@ -62,7 +62,9 @@ Hook.prototype.error = function(err) {
|
|
62
62
|
*/
|
63
63
|
Hook.prototype.serialize = function serialize() {
|
64
64
|
return {
|
65
|
-
$$
|
65
|
+
$$currentRetry: this.currentRetry(),
|
66
|
+
$$fullTitle: this.fullTitle(),
|
67
|
+
$$isPending: Boolean(this.isPending()),
|
66
68
|
$$titlePath: this.titlePath(),
|
67
69
|
ctx:
|
68
70
|
this.ctx && this.ctx.currentTest
|
@@ -73,9 +75,13 @@ Hook.prototype.serialize = function serialize() {
|
|
73
75
|
}
|
74
76
|
}
|
75
77
|
: {},
|
78
|
+
duration: this.duration,
|
79
|
+
file: this.file,
|
76
80
|
parent: {
|
81
|
+
$$fullTitle: this.parent.fullTitle(),
|
77
82
|
[MOCHA_ID_PROP_NAME]: this.parent.id
|
78
83
|
},
|
84
|
+
state: this.state,
|
79
85
|
title: this.title,
|
80
86
|
type: this.type,
|
81
87
|
[MOCHA_ID_PROP_NAME]: this.id
|