diff --git a/README.md b/README.md index 18eaa4b..95c923d 100644 --- a/README.md +++ b/README.md @@ -15,9 +15,10 @@ node --test \ Available reporters: +- [bail](https://www.npmjs.com/package/@reporters/bail) - bail on first failure - [github](https://www.npmjs.com/package/@reporters/github) - report to github actions - [jUnit](https://www.npmjs.com/package/@reporters/junit) - report to jUnit +- [mocha](https://www.npmjs.com/package/@reporters/mocha) - use any mocha reporter with `node:test` - [silent](https://www.npmjs.com/package/@reporters/silent) - a silent reporter -- [bail](https://www.npmjs.com/package/@reporters/bail) - bail on first failure -- [testwatch](https://www.npmjs.com/package/@reporters/testwatch) - An interactive REPL for `node:test` watch mode. - [slow](https://www.npmjs.com/package/@reporters/slow) - report slow tests +- [testwatch](https://www.npmjs.com/package/@reporters/testwatch) - An interactive REPL for `node:test` watch mode. diff --git a/packages/bail/index.js b/packages/bail/index.js index 202ca30..059c0ce 100644 --- a/packages/bail/index.js +++ b/packages/bail/index.js @@ -6,7 +6,7 @@ module.exports = async function* bail(source) { /* c8 ignore start */ yield `\n\u001b[31m✖ Bailing on failed test: ${event.data.name}\u001b[0m\n`; throw new Error('Bail'); - /* c8 ignore stop */ } + /* c8 ignore stop */ } }; diff --git a/packages/github/tests/output.js b/packages/github/tests/output.js deleted file mode 100644 index 5313c8c..0000000 --- a/packages/github/tests/output.js +++ /dev/null @@ -1,61 +0,0 @@ -'use strict'; - -module.exports = { - stdout: `::debug::starting to run tests -::debug::starting to run is ok -::debug::completed running is ok -::debug::starting to run fails -::error title=fails,file=tests/example.js,line=9,col=11::\\[Error \\[ERR_TEST_FAILURE\\]: this is an error\\] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at TestContext. (.*/example.js:9:11).*%0A} -::debug::starting to run is a diagnostic -::debug::completed running is a diagnostic -::notice file=tests/example.js,line=11,col=3::this is a diagnostic -::debug::starting to run should fail -::error title=should fail,file=tests/example.js,line=12,col=31::\\[Error \\[ERR_TEST_FAILURE\\]: The expression evaluated to a falsy value:%0A%0A assert\\(false\\)%0A\\] {%0A code: 'ERR_TEST_FAILURE',%0A failureType: 'testCodeFailure',%0A cause: AssertionError \\[ERR_ASSERTION\\]: The expression evaluated to a falsy value:%0A %0A assert\\(false\\)%0A %0A at TestContext. (.*/example.js:12:31).* -::debug::starting to run more tests -::debug::starting to run is ok -::debug::completed running is ok -::debug::completed running more tests -::debug::starting to run is skipped -::debug::completed running is skipped -::debug::starting to run is a todo -::debug::completed running is a todo -::debug::starting to run top level diagnostic -::debug::completed running top level diagnostic -::notice file=tests/example.js,line=21,col=1::top level diagnostic -::group::Test results \\(4 passed, 2 failed\\) -::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled 🚫: 0%0ASkipped ⏭️: 1%0ATodo 📝: 1%0ADuration 🕐: .*ms -::endgroup:: -`, - summary: `

Test Results

-
Total Tests8
Suites 📂2
Passed ✅4
Failed ❌2
Canceled 🚫0
Skipped ⏭️1
Todo 📝1
Duration 🕐.*ms
-`, - overrides: { - 18: { - stdout: `::debug::starting to run tests -::debug::starting to run is ok -::debug::completed running is ok -::debug::starting to run fails -::error title=fails,file=tests/example.js,line=9,col=11::\\[Error \\[ERR_TEST_FAILURE\\]: this is an error\\] {%0A failureType: 'testCodeFailure',%0A cause: Error: this is an error%0A at TestContext. (.*/example.js:9:11).* code: 'ERR_TEST_FAILURE'%0A} -::debug::starting to run is a diagnostic -::debug::completed running is a diagnostic -::notice file=tests/example.js,line=11,col=3::this is a diagnostic -::debug::starting to run should fail -::error title=should fail,file=tests/example.js,line=12,col=31::\\[Error \\[ERR_TEST_FAILURE\\]: The expression evaluated to a falsy value:%0A%0A assert\\(false\\)%0A\\] {%0A failureType: 'testCodeFailure',%0A cause: AssertionError \\[ERR_ASSERTION\\]: The expression evaluated to a falsy value:%0A %0A assert\\(false\\)%0A %0A at TestContext. (.*/example.js:12:31).* -::debug::starting to run more tests -::debug::starting to run is ok -::debug::completed running is ok -::debug::completed running more tests -::debug::starting to run is skipped -::debug::completed running is skipped -::debug::starting to run is a todo -::debug::completed running is a todo -::debug::starting to run top level diagnostic -::debug::completed running top level diagnostic -::notice file=tests/example.js,line=21,col=1::top level diagnostic -::group::Test results \\(4 passed, 2 failed\\) -::notice::Total Tests: 8%0ASuites 📂: 2%0APassed ✅: 4%0AFailed ❌: 2%0ACanceled 🚫: 0%0ASkipped ⏭️: 1%0ATodo 📝: 1%0ADuration 🕐: .*ms -::endgroup:: -`, - }, - }, -}; diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json new file mode 100644 index 0000000..8f79c1a --- /dev/null +++ b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/0.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "\n\n tests\n ✔ is ok\n 1) fails\n ✔ is a diagnostic\n 2) should fail\n\n more tests\n ✔ is ok\n\n - is skipped\n - is a todo\n ✔ top level diagnostic\n\n 4 passing (*ms)\n 2 pending\n 2 failing\n\n 1) \n tests\n fails:\n Error [ERR_TEST_FAILURE]: this is an error\n at async Promise.all (index 0)\n\n 2) \n tests\n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json new file mode 100644 index 0000000..b04c233 --- /dev/null +++ b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/1.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "\n\n 1) should fail\n ✔ should pass\n\n 1 passing (*ms)\n 1 failing\n\n 1) \n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json new file mode 100644 index 0000000..fcad495 --- /dev/null +++ b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/2.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is ok'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests fails'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is a diagnostic'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests should fail'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' more tests is ok'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is skipped'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is a todo'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' top level diagnostic'\n}\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json new file mode 100644 index 0000000..fcad495 --- /dev/null +++ b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/3.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is ok'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests fails'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is a diagnostic'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests should fail'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' more tests is ok'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is skipped'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is a todo'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' top level diagnostic'\n}\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/4.json b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/4.json new file mode 100644 index 0000000..0caf8dc --- /dev/null +++ b/packages/mocha/.snapshots/1f0f93c51b9f571a9d899160525b1bcb/4.json @@ -0,0 +1,5 @@ +{ + "stderr": "Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'invalid' imported from CWD/packages/mocha/index.js\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * {\n code: 'ERR_MODULE_NOT_FOUND'\n}\nError: invalid reporter \"invalid\"\n *\n *\n", + "stdout": "", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/0.json b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/0.json new file mode 100644 index 0000000..699c53d --- /dev/null +++ b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/0.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "\n\n tests\n ✔ is ok\n 1) fails\n ✔ is a diagnostic\n 2) should fail\n\n more tests\n ✔ is ok\n\n - is skipped\n - is a todo\n ✔ top level diagnostic\n\n 4 passing (*ms)\n 2 pending\n 2 failing\n\n 1) \n tests\n fails:\n Error [ERR_TEST_FAILURE]: this is an error\n \n\n 2) \n tests\n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/1.json b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/1.json new file mode 100644 index 0000000..14612cf --- /dev/null +++ b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/1.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "\n\n 1) should fail\n ✔ should pass\n\n 1 passing (*ms)\n 1 failing\n\n 1) \n should fail:\n Error [ERR_TEST_FAILURE]: false == true\n \n\n\n\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/2.json b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/2.json new file mode 100644 index 0000000..fcad495 --- /dev/null +++ b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/2.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is ok'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests fails'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is a diagnostic'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests should fail'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' more tests is ok'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is skipped'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is a todo'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' top level diagnostic'\n}\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/3.json b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/3.json new file mode 100644 index 0000000..fcad495 --- /dev/null +++ b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/3.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is ok'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests fails'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is a diagnostic'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests should fail'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' more tests is ok'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is skipped'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is a todo'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' top level diagnostic'\n}\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/4.json b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/4.json new file mode 100644 index 0000000..0caf8dc --- /dev/null +++ b/packages/mocha/.snapshots/4353502ed400317a687af8c8312f2662/4.json @@ -0,0 +1,5 @@ +{ + "stderr": "Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'invalid' imported from CWD/packages/mocha/index.js\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * {\n code: 'ERR_MODULE_NOT_FOUND'\n}\nError: invalid reporter \"invalid\"\n *\n *\n", + "stdout": "", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json new file mode 100644 index 0000000..699c53d --- /dev/null +++ b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/0.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "\n\n tests\n ✔ is ok\n 1) fails\n ✔ is a diagnostic\n 2) should fail\n\n more tests\n ✔ is ok\n\n - is skipped\n - is a todo\n ✔ top level diagnostic\n\n 4 passing (*ms)\n 2 pending\n 2 failing\n\n 1) \n tests\n fails:\n Error [ERR_TEST_FAILURE]: this is an error\n \n\n 2) \n tests\n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json new file mode 100644 index 0000000..b04c233 --- /dev/null +++ b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/1.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "\n\n 1) should fail\n ✔ should pass\n\n 1 passing (*ms)\n 1 failing\n\n 1) \n should fail:\n Error [ERR_TEST_FAILURE]: The expression evaluated to a falsy value:\n\n assert(false)\n\n \n\n\n\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/2.json b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/2.json new file mode 100644 index 0000000..fcad495 --- /dev/null +++ b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/2.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is ok'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests fails'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is a diagnostic'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests should fail'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' more tests is ok'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is skipped'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is a todo'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' top level diagnostic'\n}\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/3.json b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/3.json new file mode 100644 index 0000000..fcad495 --- /dev/null +++ b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/3.json @@ -0,0 +1,5 @@ +{ + "stderr": "", + "stdout": "{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is ok'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests fails'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests is a diagnostic'\n}\n{\n state: 'failed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' tests should fail'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' more tests is ok'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is skipped'\n}\n{\n state: 'pending',\n isPending: true,\n currentRetry: 0,\n fullTitle: ' is a todo'\n}\n{\n state: 'passed',\n isPending: false,\n currentRetry: 0,\n fullTitle: ' top level diagnostic'\n}\n", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/4.json b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/4.json new file mode 100644 index 0000000..0caf8dc --- /dev/null +++ b/packages/mocha/.snapshots/dc3fc117f81a81ae79e191693864201a/4.json @@ -0,0 +1,5 @@ +{ + "stderr": "Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'invalid' imported from CWD/packages/mocha/index.js\n *\n *\n *\n *\n *\n *\n *\n *\n *\n * {\n code: 'ERR_MODULE_NOT_FOUND'\n}\nError: invalid reporter \"invalid\"\n *\n *\n", + "stdout": "", + "exitCode": 1 +} \ No newline at end of file diff --git a/packages/mocha/README.md b/packages/mocha/README.md new file mode 100644 index 0000000..4817755 --- /dev/null +++ b/packages/mocha/README.md @@ -0,0 +1,32 @@ +[![npm version](https://img.shields.io/npm/v/@reporters/mocha)](https://www.npmjs.com/package/@reporters/mocha) ![tests](https://github.com/MoLow/reporters/actions/workflows/test.yaml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/MoLow/reporters/branch/main/graph/badge.svg?token=0LFVC8SCQV)](https://codecov.io/gh/MoLow/reporters) + +# Mocha reporters for `node:test` +Use this custom reporter to use [mocha reporters](https://mochajs.org/#reporters) with `node:test`. +Both built-in and custom mocha reporters such as [mochawesome](https://www.npmjs.com/package/mochawesome) are supported. + +## Installation + +```bash +npm install --save-dev @reporters/mocha +``` +or +```bash +yarn add --dev @reporters/mocha +``` + +## Usage + +Specify the desired mocha reporter inside the [mocha configuration file](https://mochajs.org/#configuring-mocha-nodejs), e.g. `.mocharc.js`: +```js +module.exports = { + reporter: '@reporters/mocha' +} +``` + +Then run the tests with `node:test`: + +```bash +node --test --test-reporter=@reporters/mocha +``` + + diff --git a/packages/mocha/index.js b/packages/mocha/index.js new file mode 100644 index 0000000..338caac --- /dev/null +++ b/packages/mocha/index.js @@ -0,0 +1,237 @@ +/* eslint-disable class-methods-use-this */ +/* eslint-disable no-underscore-dangle */ +/* eslint-disable max-classes-per-file */ + +'use strict'; + +const { EventEmitter } = require('node:events'); +const Mocha = require('mocha'); +const { loadOptions } = require('mocha/lib/cli'); + +const { + EVENT_RUN_BEGIN, + EVENT_RUN_END, + EVENT_TEST_FAIL, + EVENT_TEST_PENDING, + EVENT_TEST_PASS, + EVENT_TEST_BEGIN, + EVENT_TEST_END, + EVENT_SUITE_BEGIN, + EVENT_SUITE_END, +} = Mocha.Runner.constants; + +const { + STATE_FAILED, + STATE_PASSED, + STATE_PENDING, +} = Mocha.Runnable.constants; + +class Test { + #mochaOptions; + + constructor(parent = null, mochaOptions = {}) { + this.title = ''; + this.file = ''; + this.pending = false; + this.duration = 0; + this.err = null; + this.nesting = 0; + this.parent = parent; + this.root = !parent; + this.children = []; + this.#mochaOptions = mochaOptions; + + this.body = ''; + this._beforeAll = []; + this._beforeEach = []; + this._afterAll = []; + this._afterEach = []; + } + + applyTestEvent(event, passed) { + this.title = event.data.name; + this.file = event.data.file; + this.pending = Boolean(event.data.skip || event.data.todo); + this.duration = event.data.details?.duration_ms; + this.err = event.data.details?.error; + this.passed = passed; + this.nesting = event.data.nesting; + } + + get state() { + if (this.pending) { + return STATE_PENDING; + } + if (this.passed) { + return STATE_PASSED; + } + return STATE_FAILED; + } + + isPending() { + return this.pending; + } + + slow() { + return this.#mochaOptions.slow ?? 75; + } + + currentRetry() { + return 0; + } + + titlePath() { + const parentTitle = this.parent?.titlePath() ?? []; + return parentTitle.concat(this.title); + } + + fullTitle() { + return this.titlePath().join(' '); + } + + finalize() { + this.suites = this._suites; + this.tests = this._tests; + } + + get _suites() { + return this.children.filter((child) => child.children.length > 0); + } + + get _tests() { + return this.children.filter((child) => child.children.length === 0); + } +} + +class Runner extends EventEmitter { + stats = { + suites: 0, + tests: 0, + passes: 0, + pending: 0, + failures: 0, + start: new Date(), + end: null, + duration: null, + }; + + #reporter; + + #root = new Test(); + + #current = this.#root; + + #mochaOptions = loadOptions([]); + + async init() { + const reporterName = this.#mochaOptions.reporter ?? 'spec'; + let Reporter; + if (typeof reporterName === 'function') { + Reporter = reporterName; + } else if (Mocha.reporters[reporterName]) { + Reporter = Mocha.reporters[reporterName]; + } else { + try { + Reporter = await import(reporterName).then((m) => m.default || m); + } catch (err) { + console.error(err); + } + } + if (!Reporter) { + console.error(new Error(`invalid reporter "${reporterName}"`)); + return; + } + this.#reporter = new Reporter(this, this.#mochaOptions); + this.emit(EVENT_RUN_BEGIN); + } + + end() { + if (!this.#reporter) { + return; + } + this.stats.end = new Date(); + this.stats.duration = this.stats.end - this.stats.start; + this.#report(); + this.emit(EVENT_RUN_END); + if (typeof this.#reporter.done === 'function') { + this.#reporter.done(this.stats.failures, () => {}); + } + } + + #report(suite = this.#root) { + /* Not like mocha, node:test runs tests as soon as they are encountered + so the exact structure is unkown until all suites end */ + this.emit(EVENT_SUITE_BEGIN, suite); + suite.finalize(); + for (const s of suite.suites) { + this.#report(s); + } + for (const test of suite.tests) { + this.emit(EVENT_TEST_BEGIN, test); + if (test.pending) { + this.emit(EVENT_TEST_PENDING, test); + } else if (!test.passed) { + this.emit(EVENT_TEST_FAIL, test, test.err); + } else { + this.emit(EVENT_TEST_PASS, test); + } + this.emit(EVENT_TEST_END, test); + } + this.emit(EVENT_SUITE_END, suite); + } + + addChild(event, passed) { + const current = this.#current; + this.#current = new Test(current); + this.#current.applyTestEvent(event, passed); + current.children.push(this.#current); + } + + isNewTest(event) { + return this.#current.title !== event.data.name || this.#current.nesting !== event.data.nesting; + } + + childCompleted(event, passed) { + this.#current.applyTestEvent(event, passed); + if (this.#current?.nesting === event.data.nesting) { + if (this.#current.children.length > 0) { + this.stats.suites += 1; + } else if (this.#current.pending) { + this.stats.tests += 1; + this.stats.pending += 1; + } else if (!this.#current.passed) { + this.stats.tests += 1; + this.stats.failures += 1; + } else { + this.stats.tests += 1; + this.stats.passes += 1; + } + this.#current = this.#current.parent; + } + } +} + +module.exports = async function mochaReporter(source) { + const runner = new Runner(); + await runner.init(); + + for await (const event of source) { + switch (event.type) { + case 'test:start': + runner.addChild(event, false); + break; + case 'test:pass': + case 'test:fail': { + if (runner.isNewTest(event)) { + runner.addChild(event, event.type === 'test:pass'); + } + runner.childCompleted(event, event.type === 'test:pass'); + break; + } + default: + break; + } + } + + runner.end(); +}; diff --git a/packages/mocha/package.json b/packages/mocha/package.json new file mode 100644 index 0000000..2d6e4f6 --- /dev/null +++ b/packages/mocha/package.json @@ -0,0 +1,30 @@ +{ + "name": "@reporters/mocha", + "version": "1.2.4", + "description": "use any mocha reporter with `node:test`", + "type": "commonjs", + "keywords": [ + "node:test", + "test", + "mocha", + "reporter", + "reporters" + ], + "files": [ + "./index.js" + ], + "scripts": { + "test": "node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=../github/index.js --test-reporter-destination=stdout --test" + }, + "bugs": { + "url": "https://github.com/MoLow/reporters/issues" + }, + "main": "index.js", + "homepage": "https://github.com/MoLow/reporters/tree/main/packages/mocha", + "repository": "https://github.com/MoLow/reporters.git", + "author": "Moshe Atlow", + "license": "MIT", + "dependencies": { + "mocha": "^10.3.0" + } +} diff --git a/packages/mocha/tests/.mocharc.json b/packages/mocha/tests/.mocharc.json new file mode 100644 index 0000000..f1ef82d --- /dev/null +++ b/packages/mocha/tests/.mocharc.json @@ -0,0 +1,3 @@ +{ + "reporter": "list" +} \ No newline at end of file diff --git a/packages/mocha/tests/customReporter/.mocharc.js b/packages/mocha/tests/customReporter/.mocharc.js new file mode 100644 index 0000000..356f3b2 --- /dev/null +++ b/packages/mocha/tests/customReporter/.mocharc.js @@ -0,0 +1,5 @@ +const Reporter = require('./reporter.js'); + +module.exports = { + reporter: Reporter +}; diff --git a/packages/mocha/tests/customReporter/reporter.js b/packages/mocha/tests/customReporter/reporter.js new file mode 100644 index 0000000..b9eef69 --- /dev/null +++ b/packages/mocha/tests/customReporter/reporter.js @@ -0,0 +1,22 @@ +/* eslint-disable class-methods-use-this */ + +'use strict'; + +class Reporter { + constructor(runner) { + runner.on('test end', (test) => { + console.log({ + state: test.state, + isPending: test.isPending(), + currentRetry: test.currentRetry(), + fullTitle: test.fullTitle(), + }); + }); + } + + done(failures, fn) { + fn(); + } +} + +module.exports = Reporter; diff --git a/packages/mocha/tests/importReporter/.mocharc.json b/packages/mocha/tests/importReporter/.mocharc.json new file mode 100644 index 0000000..2f2d60f --- /dev/null +++ b/packages/mocha/tests/importReporter/.mocharc.json @@ -0,0 +1,3 @@ +{ + "reporter": "./tests/customReporter/reporter.js" +} \ No newline at end of file diff --git a/packages/mocha/tests/index.test.js b/packages/mocha/tests/index.test.js new file mode 100644 index 0000000..f6ffb9a --- /dev/null +++ b/packages/mocha/tests/index.test.js @@ -0,0 +1,43 @@ +'use strict'; + +const { test } = require('node:test'); +const { resolve } = require('node:path'); +const { spawnSync } = require('node:child_process'); +const assert = require('assert'); +const { Snap, nodeMajor } = require('../../../tests/utils'); +const reporter = require('../index'); + +const snapshot = Snap(`${__filename}.${nodeMajor}`); + +test('spwan with reporter', async () => { + const child = spawnSync(process.execPath, ['--test-reporter', './index.js', '../../tests/example'], { env: {} }); + await snapshot(child); +}); + +test('spwan with reporter - esm', async () => { + const child = spawnSync(process.execPath, ['--test-reporter', './index.js', '../../tests/example.mjs'], { env: {} }); + await snapshot(child); +}); + +test('custom reporter - file', async () => { + const child = spawnSync(process.execPath, ['--test-reporter', '../../index.js', '../../../../tests/example.js'], { env: {}, cwd: resolve('./tests/customReporter') }); + await snapshot(child); +}); + +test('custom reporter - function', async () => { + const child = spawnSync(process.execPath, ['--test-reporter', '../../index.js', '../../../../tests/example.js'], { env: {}, cwd: resolve('./tests/importReporter') }); + await snapshot(child); +}); + +test('reporter not found', async () => { + const child = spawnSync(process.execPath, ['--test-reporter', '../../index.js', '../../../../tests/example.js'], { env: {}, cwd: resolve('./tests/invalidReporter') }); + await snapshot(child); +}); + +test('empty', async () => { + await assert.doesNotReject(reporter([])); +}); + +test('single test', async () => { + await assert.doesNotReject(reporter([{ type: 'test:pass', data: { name: 'test', nesting: 0, details: { duration_ms: 100 } } }])); +}); diff --git a/packages/mocha/tests/invalidReporter/.mocharc.json b/packages/mocha/tests/invalidReporter/.mocharc.json new file mode 100644 index 0000000..2ea6345 --- /dev/null +++ b/packages/mocha/tests/invalidReporter/.mocharc.json @@ -0,0 +1,3 @@ +{ + "reporter": "invalid" +} \ No newline at end of file diff --git a/release-please-config.json b/release-please-config.json index 98c13f0..0ecfb92 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -19,6 +19,7 @@ "packages/silent": {}, "packages/bail": {}, "packages/testwatch": {}, - "packages/slow": {} + "packages/slow": {}, + "packages/mocha": {} } } diff --git a/tests/utils.js b/tests/utils.js index 546380d..06350f4 100644 --- a/tests/utils.js +++ b/tests/utils.js @@ -24,7 +24,7 @@ function snapshot(filename) { async function test(child, ...args) { const actual = { stderr: sanitize(child.stderr?.toString() ?? ''), - stdout: sanitize(child.stdout?.toString()), + stdout: sanitize(child.stdout?.toString() ?? ''), exitCode: child.status, }; assert.deepStrictEqual(actual, await snap(actual)); diff --git a/yarn.lock b/yarn.lock index e6f680e..1795546 100644 --- a/yarn.lock +++ b/yarn.lock @@ -155,6 +155,11 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ansi-colors@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" @@ -177,6 +182,14 @@ ansi-styles@^6.1.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== +anymatch@~3.1.2: + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -208,6 +221,11 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -223,6 +241,18 @@ brace-expansion@^2.0.1: dependencies: balanced-match "^1.0.0" +braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + c8@^7.13.0: version "7.13.0" resolved "https://registry.yarnpkg.com/c8/-/c8-7.13.0.tgz#a2a70a851278709df5a9247d62d7f3d4bcb5f2e4" @@ -254,7 +284,12 @@ callsites@^3.0.0: resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -chalk@^4.0.0, chalk@^4.1.1: +camelcase@^6.0.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" + integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== + +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -262,6 +297,21 @@ chalk@^4.0.0, chalk@^4.1.1: ansi-styles "^4.1.0" supports-color "^7.1.0" +chokidar@3.5.3: + version "3.5.3" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" + integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -307,6 +357,13 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2: shebang-command "^2.0.0" which "^2.0.1" +debug@4.3.4, debug@^4.1.1, debug@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -321,12 +378,10 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.1.1, debug@^4.3.2: - version "4.3.4" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== deep-is@^0.1.3: version "0.1.4" @@ -341,6 +396,11 @@ define-properties@^1.1.3, define-properties@^1.1.4: has-property-descriptors "^1.0.0" object-keys "^1.1.1" +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -422,16 +482,16 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escape-string-regexp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - eslint-config-airbnb-base@^15.0.0: version "15.0.0" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz#6b09add90ac79c2f8d723a2580e07f3925afd236" @@ -608,7 +668,14 @@ file-entry-cache@^6.0.1: dependencies: flat-cache "^3.0.4" -find-up@^5.0.0: +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +find-up@5.0.0, find-up@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== @@ -633,6 +700,11 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + flatted@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" @@ -659,6 +731,11 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== +fsevents@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" @@ -708,6 +785,24 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" +glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" + integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + glob@^10.2.6: version "10.2.6" resolved "https://registry.yarnpkg.com/glob/-/glob-10.2.6.tgz#1e27edbb3bbac055cb97113e27a066c100a4e5e1" @@ -786,6 +881,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -838,6 +938,13 @@ is-bigint@^1.0.1: dependencies: has-bigints "^1.0.1" +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + is-boolean-object@^1.1.0: version "1.1.2" resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" @@ -875,7 +982,7 @@ is-fullwidth-code-point@^3.0.0: resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== -is-glob@^4.0.0, is-glob@^4.0.3: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -894,11 +1001,21 @@ is-number-object@^1.0.4: dependencies: has-tostringtag "^1.0.0" +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + is-path-inside@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -928,6 +1045,11 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-unicode-supported@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" + integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== + is-weakref@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" @@ -976,7 +1098,7 @@ js-sdsl@^4.1.4: resolved "https://registry.yarnpkg.com/js-sdsl/-/js-sdsl-4.2.0.tgz#278e98b7bea589b8baaf048c20aeb19eb7ad09d0" integrity sha512-dyBIzQBDkCqCu+0upx25Y2jGdbTGxE9fshMsCdK0ViOongpV+n5tXRcZY9v7CaVQ79AGS9KA1KHtojxiM7aXSQ== -js-yaml@^4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -1027,6 +1149,14 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +log-symbols@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" + integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== + dependencies: + chalk "^4.1.0" + is-unicode-supported "^0.1.0" + lru-cache@^9.1.1: version "9.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.1.1.tgz#c58a93de58630b688de39ad04ef02ef26f1902f1" @@ -1039,6 +1169,13 @@ make-dir@^3.0.0: dependencies: semver "^6.0.0" +minimatch@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -1046,6 +1183,13 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== + dependencies: + brace-expansion "^2.0.1" + minimatch@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253" @@ -1063,6 +1207,32 @@ minimist@^1.2.0, minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minipass/-/minipass-6.0.2.tgz#542844b6c4ce95b202c0995b0a471f1229de4c81" integrity sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w== +mocha@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-10.3.0.tgz#0e185c49e6dccf582035c05fa91084a4ff6e3fe9" + integrity sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg== + dependencies: + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.3" + debug "4.3.4" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "8.1.0" + he "1.2.0" + js-yaml "4.1.0" + log-symbols "4.1.0" + minimatch "5.0.1" + ms "2.1.3" + serialize-javascript "6.0.0" + strip-json-comments "3.1.1" + supports-color "8.1.1" + workerpool "6.2.1" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -1073,7 +1243,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1, ms@^2.1.3: +ms@2.1.3, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -1083,6 +1253,11 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + object-inspect@^1.12.2, object-inspect@^1.9.0: version "1.12.2" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" @@ -1208,6 +1383,11 @@ path-scurry@^1.7.0: lru-cache "^9.1.1" minipass "^5.0.0 || ^6.0.2" +picomatch@^2.0.4, picomatch@^2.2.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -1223,6 +1403,20 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + regexp.prototype.flags@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" @@ -1275,6 +1469,11 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -1289,6 +1488,13 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +serialize-javascript@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" + integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== + dependencies: + randombytes "^2.1.0" + shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" @@ -1387,11 +1593,18 @@ strip-bom@^3.0.0: resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -1418,6 +1631,13 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" @@ -1504,6 +1724,11 @@ word-wrap@^1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +workerpool@6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== + "wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -1532,12 +1757,27 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + yargs-parser@^20.2.2, yargs-parser@^20.2.9: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs@^16.2.0: +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@16.2.0, yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==