From 3b9114ed79866e40ebb657943973da5a2b6624e9 Mon Sep 17 00:00:00 2001 From: Sonny Date: Fri, 20 Dec 2024 22:59:22 +0100 Subject: [PATCH] Port from Ava to Jest (#1023) See #1022 for rational Used https://github.com/skovhus/jest-codemods --- .github/workflows/CI.yml | 4 +- CONTRIBUTING.md | 4 +- Makefile | 19 +- ava.config.js | 30 - babel.config.js | 56 +- bundle.js | 4 +- e2e.config.js | 31 +- eslint.config.mjs | 46 +- jest.config.js | 15 + package-lock.json | 4613 ++++++++++------- package.json | 13 +- packages/client-core/test/Client.js | 9 +- packages/client/test/getDomain.js | 15 +- packages/component-core/test/send.js | 9 +- packages/connection-tcp/test/Connection.js | 43 +- packages/connection/test/close.js | 63 +- packages/connection/test/connect.js | 20 +- packages/connection/test/disconnect.js | 39 +- packages/connection/test/end.js | 81 +- packages/connection/test/error.js | 5 +- packages/connection/test/onData.js | 9 +- packages/connection/test/onElement.js | 31 +- packages/connection/test/parserError.js | 23 +- packages/connection/test/send.js | 13 +- packages/connection/test/socketClose.js | 15 +- packages/connection/test/start.js | 7 +- packages/connection/test/stop.js | 22 +- packages/connection/test/streamError.js | 30 +- packages/connection/test/test.js | 29 +- packages/debug/test.js | 62 +- packages/error/test.js | 28 +- packages/events/test/promise.test.js | 33 +- packages/id/test.js | 13 +- .../iq/{callee.test.js => test/callee.js} | 105 +- .../iq/{caller.test.js => test/caller.js} | 46 +- packages/jid/test/JID.js | 15 +- packages/jid/test/equality.js | 29 +- packages/jid/test/escapeLocal.js | 9 +- packages/jid/test/escaping.js | 133 +- packages/jid/test/index.js | 31 +- packages/jid/test/parsing.js | 75 +- packages/jid/test/serialization.js | 17 +- packages/jid/test/toPrimitive.js | 15 +- packages/middleware/test/Context.js | 57 +- packages/middleware/test/IncomingContext.js | 41 +- packages/middleware/test/OutgoingContext.js | 41 +- packages/middleware/test/middleware.js | 52 +- packages/reconnect/test.js | 16 +- .../resolve/test/compareAltConnections.js | 60 +- packages/resolve/test/httpParse.js | 6 +- packages/resolve/test/sortSrv.js | 73 +- packages/resource-binding/test.js | 35 +- packages/sasl/test.js | 46 +- packages/session-establishment/test.js | 9 +- packages/starttls/starttls.test.js | 9 +- packages/starttls/test.js | 35 +- packages/stream-features/test.js | 5 +- packages/stream-management/test.js | 84 +- packages/tcp/test.js | 9 +- packages/time/test.js | 35 +- packages/tls/test.js | 33 +- packages/uri/test.js | 59 +- packages/websocket/test/FramedParser.js | 15 +- packages/websocket/test/test.js | 61 +- packages/xml/test/Parser.js | 17 +- packages/xml/test/xml.js | 23 +- packages/xmpp.js/test.js | 17 +- test/browser.js | 23 +- test/client.js | 219 +- test/component.js | 65 +- test/see-other-host.js | 20 +- 71 files changed, 3771 insertions(+), 3303 deletions(-) delete mode 100644 ava.config.js create mode 100644 jest.config.js rename packages/iq/{callee.test.js => test/callee.js} (60%) rename packages/iq/{caller.test.js => test/caller.js} (73%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 8bc55497d..2bb44d14d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,8 +14,8 @@ jobs: matrix: # Do not support --experimental-require-module # Commented until we have a solution to run tests without it - # node-version: [14, 16, 18, 20, 22] - # node-version: [20, 22] // fails on 20 with (0 , _getDomain.default) is not a function + # node: [14, 16, 18, 20, 22] + # node: [20, 22] // fails on 20 with (0 , _getDomain.default) is not a function node: [22] steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d35d5e8d5..7ab944157 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,9 +22,9 @@ At that point you can make changes to the xmpp.js code and run tests with make test ``` -If you want to iterate faster, you can watch a test file with `npx ava --watch packages/debug/test.js`. +If you want to iterate faster, you can watch a test file with `npx jest --watch packages/debug/test.js`. -See [ava CLI](https://github.com/avajs/ava/blob/main/docs/05-command-line.md). +See [Jest CLI](https://jestjs.io/docs/cli). ## Submitting diff --git a/Makefile b/Makefile index 61388dbab..4d99866cd 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: setup lint test ci clean start stop restart bundlesize bundle size cert ncu +.PHONY: setup lint test ci clean start stop restart bundlesize bundle size ncu setup: node packages/xmpp.js/script.js @@ -7,26 +7,29 @@ setup: node bundle.js lint: - ./node_modules/.bin/eslint --cache . + npx eslint --cache . test: cd packages/xmpp.js/ && npm run prepublish npm install node bundle.js - ./node_modules/.bin/ava + npx jest make lint make bundlesize ci: npm install - ./node_modules/.bin/ava + npx jest make lint make restart - ./node_modules/.bin/lerna run prepublish + npx lerna run prepublish node bundle.js - ./node_modules/.bin/ava --config e2e.config.js + make e2e make bundlesize +e2e: + NODE_TLS_REJECT_UNAUTHORIZED=0 npx jest --runInBand --config e2e.config.js + clean: make stop rm -f server/localhost.key @@ -34,7 +37,7 @@ clean: rm -f server/prosody.err rm -f server/prosody.log rm -f server/prosody.pid - ./node_modules/.bin/lerna clean --yes + npx lerna clean --yes rm -rf node_modules/ rm -f packages/*/dist/*.js rm -f lerna-debug.log @@ -49,7 +52,7 @@ restart: ./server/ctl.js restart bundlesize: - ./node_modules/.bin/bundlesize + npx bundlesize bundle: node bundle.js diff --git a/ava.config.js b/ava.config.js deleted file mode 100644 index 5751eea62..000000000 --- a/ava.config.js +++ /dev/null @@ -1,30 +0,0 @@ -export default { - babel: { - testOptions: { - babelrc: false, - plugins: [ - [ - "@babel/plugin-transform-react-jsx", - { - pragma: "xml", - throwIfNamespace: false, - }, - ], - [ - "babel-plugin-jsx-pragmatic", - { - module: "@xmpp/xml", - import: "xml", - }, - ], - ], - }, - }, - nodeArguments: ["--experimental-require-module"], - files: [ - "packages/**/test.js", - "packages/**/test/*.js", - "packages/**/*.test.js", - "!packages/test/*.js", - ], -}; diff --git a/babel.config.js b/babel.config.js index c705ac4e8..12861b7ed 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,20 +1,46 @@ "use strict"; -module.exports = { - presets: [ - [ - "@babel/preset-env", - { - targets: { - ie: "10", +module.exports = function config(api) { + const isTest = api.env("test"); + + if (isTest) { + return { + plugins: [ + [ + "@babel/plugin-transform-react-jsx", + { + pragma: "xml", + throwIfNamespace: false, + }, + ], + [ + "babel-plugin-jsx-pragmatic", + { + module: "@xmpp/xml", + import: "xml", + }, + ], + "@babel/plugin-transform-modules-commonjs", + ], + }; + } + + return { + presets: [ + [ + "@babel/preset-env", + { + targets: { + ie: "10", + }, + loose: true, }, - loose: true, - }, + ], + ], + plugins: [ + "@babel/plugin-transform-runtime", + "babel-plugin-transform-async-to-promises", + "@babel/plugin-proposal-object-rest-spread", ], - ], - plugins: [ - "@babel/plugin-transform-runtime", - "babel-plugin-transform-async-to-promises", - "@babel/plugin-proposal-object-rest-spread", - ], + }; }; diff --git a/bundle.js b/bundle.js index 2a35ef659..8fc3e9b90 100755 --- a/bundle.js +++ b/bundle.js @@ -1,8 +1,6 @@ #!/usr/bin/env node -/* eslint-disable no-console */ - -'use strict' // eslint-disable-line node/shebang +'use strict' const fs = require('fs') const path = require('path') diff --git a/e2e.config.js b/e2e.config.js index d507deb69..71764ac77 100644 --- a/e2e.config.js +++ b/e2e.config.js @@ -1,26 +1,7 @@ -export default { - failFast: true, - serial: true, - babel: { - testOptions: { - babelrc: false, - plugins: [ - [ - "@babel/plugin-transform-react-jsx", - { - pragma: "xml", - }, - ], - [ - "babel-plugin-jsx-pragmatic", - { - module: "@xmpp/xml", - import: "xml", - }, - ], - ], - }, - }, - nodeArguments: ["--experimental-require-module"], - files: ["test/*.js"], +"use strict"; + +/** @type {import('jest').Config} */ +module.exports = { + testMatch: ["/test/*.js"], + setupFilesAfterEnv: ["jest-extended/all"], }; diff --git a/eslint.config.mjs b/eslint.config.mjs index 1d7394c16..c277c75a3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,17 +4,11 @@ import globals from "globals"; import eslintPluginUnicorn from "eslint-plugin-unicorn"; import eslintNodePlugin from "eslint-plugin-n"; import pluginPromise from "eslint-plugin-promise"; +import pluginJest from "eslint-plugin-jest"; export default [ { - ignores: [ - "**/dist/*.js", - "bundle.js", - "packages/xmpp.js/index.js", - "ava.config.js", - "e2e.config.js", - "eslint.config.mjs", - ], + ignores: ["**/dist/*.js", "eslint.config.mjs"], }, js.configs.recommended, eslintPluginUnicorn.configs["flat/recommended"], @@ -61,14 +55,9 @@ export default [ // node // https://github.com/eslint-community/eslint-plugin-n/ "n/no-unpublished-require": 0, // doesn't play nice with monorepo - "n/no-extraneous-require": [ - "error", - { allowModules: ["ava", "sinon", "@xmpp/test"] }, - ], - "n/no-extraneous-import": [ - "error", - { allowModules: ["ava", "sinon", "@xmpp/test"] }, - ], + "n/no-extraneous-require": ["error", { allowModules: ["@xmpp/test"] }], + "n/no-extraneous-import": ["error", { allowModules: ["@xmpp/test"] }], + "n/hashbang": "off", // promise // https://github.com/xjamundx/eslint-plugin-promise @@ -97,4 +86,29 @@ export default [ sourceType: "module", }, }, + { + files: ["**/*.spec.js", "**/*.test.js", "**/test.js", "**/test/**.js"], + plugins: { jest: pluginJest }, + languageOptions: { + globals: pluginJest.environments.globals.globals, + }, + rules: { + ...pluginJest.configs["flat/style"].rules, + ...pluginJest.configs["flat/recommended"].rules, + "jest/no-done-callback": "off", + "jest/prefer-to-be": "off", + "jest/no-conditional-expect": "off", + // https://github.com/jest-community/eslint-plugin-jest/pull/1688 + "jest/valid-expect": "off", + // "jest/valid-expect": [ + // "error", + // { + // alwaysAwait: true, + // // For jest-extended expect().pass + // minArgs: 0, + // }, + // ], + "promise/no-callback-in-promise": "off", + }, + }, ]; diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..c2797f22f --- /dev/null +++ b/jest.config.js @@ -0,0 +1,15 @@ +"use strict"; + +// eslint-disable-next-line n/no-extraneous-require +const { defaults } = require("jest-config"); + +/** @type {import('jest').Config} */ +module.exports = { + testMatch: [...defaults.testMatch, "**/test/*.js"], + testPathIgnorePatterns: [ + ...defaults.testPathIgnorePatterns, + "/test/", + "/packages/test/", + ], + setupFilesAfterEnv: ["jest-extended/all"], +}; diff --git a/package-lock.json b/package-lock.json index a7cbcdb7f..9b6fae37e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,40 +7,40 @@ "workspaces": [ "packages/*" ], - "bin": { - "serverctl": "server/ctl.js" - }, "devDependencies": { - "@ava/babel": "^2.0.0", "@babel/core": "^7.26.0", "@babel/plugin-proposal-object-rest-spread": "^7.16.5", + "@babel/plugin-transform-modules-commonjs": "^7.26.3", "@babel/plugin-transform-react-jsx": "^7.25.9", "@babel/plugin-transform-runtime": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", - "ava": "^3.15.0", + "babel-jest": "^29.7.0", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", "babelify": "^10.0.0", "babylon": "^6.18.0", "browser-pack-flat": "^3.5.0", "browserify": "^17.0.1", + "bundlesize": "^0.18.2", "common-shakeify": "^1.1.2", "eslint": "^9.16.0", "eslint-config-prettier": "^9.1.0", + "eslint-plugin-jest": "^28.10.0", "eslint-plugin-n": "^17.15.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^7.2.1", "eslint-plugin-unicorn": "^56.0.1", "exorcist": "^2.0.0", "husky": "^9.1.7", + "jest": "^29.7.0", + "jest-extended": "^4.0.2", "jsdom": "^25.0.1", "lerna": "^8.1.9", "lint-staged": "^15.2.11", "node-fetch": "^2.6.12", "prettier": "^3.4.2", "selfsigned": "^2.4.1", - "sinon": "^19.0.2", "uglify-js": "^3.19.3" }, "engines": { @@ -59,123 +59,6 @@ "node": ">=6.0.0" } }, - "node_modules/@ava/babel": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@ava/babel/-/babel-2.0.0.tgz", - "integrity": "sha512-50ol1X2AOuX82UskqQYx7XCvv/05GQA2dib/n4XP99sg63fIVtzwpPZ7amLN7mghhGRr2fjXFbuRgJ4+VeDsIg==", - "dev": true, - "dependencies": { - "@ava/require-precompiled": "^1.0.0", - "@babel/core": "^7.14.6", - "@babel/generator": "^7.14.5", - "@babel/plugin-proposal-dynamic-import": "^7.14.5", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", - "@babel/plugin-proposal-optional-chaining": "^7.14.5", - "@babel/plugin-transform-modules-commonjs": "^7.14.5", - "babel-plugin-espower": "^3.0.1", - "concordance": "^5.0.4", - "convert-source-map": "^1.8.0", - "dot-prop": "^6.0.1", - "empower-core": "^1.2.0", - "escape-string-regexp": "^4.0.0", - "find-up": "^5.0.0", - "is-plain-object": "^5.0.0", - "md5-hex": "^3.0.1", - "package-hash": "^4.0.0", - "pkg-conf": "^3.1.0", - "source-map-support": "^0.5.19", - "strip-bom-buf": "^2.0.0", - "write-file-atomic": "^3.0.3" - }, - "engines": { - "node": ">=12.22 <13 || >=14.16 <15 || >=16" - } - }, - "node_modules/@ava/babel/node_modules/dot-prop": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", - "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", - "dev": true, - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ava/babel/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ava/babel/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ava/babel/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ava/babel/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ava/require-precompiled": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@ava/require-precompiled/-/require-precompiled-1.0.0.tgz", - "integrity": "sha512-N7w4g+P/SUL8SF+HC4Z4e/ctV6nQ5AERC90K90r4xZQ8WVrJux9albvfyYAzygyU47CSqMWh6yJwFs8DYaeWmg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/@babel/cli": { "version": "7.26.4", "license": "MIT", @@ -267,8 +150,7 @@ }, "node_modules/@babel/core": { "version": "7.26.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", - "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.0", @@ -697,15 +579,16 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.", + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.16.5", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" + "@babel/compat-data": "^7.16.4", + "@babel/helper-compilation-targets": "^7.16.3", + "@babel/helper-plugin-utils": "^7.16.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.16.5" }, "engines": { "node": ">=6.9.0" @@ -714,16 +597,10 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.", + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" }, @@ -731,60 +608,52 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.16.5", + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.16.4", - "@babel/helper-compilation-targets": "^7.16.3", - "@babel/helper-plugin-utils": "^7.16.5", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.16.5" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz", - "integrity": "sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.", + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.0-placeholder-for-preset-env.2", + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -818,6 +687,30 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-jsx": { "version": "7.25.9", "license": "MIT", @@ -831,11 +724,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -843,6 +747,18 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "dev": true, @@ -854,11 +770,22 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" }, @@ -866,6 +793,51 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.9.tgz", + "integrity": "sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "dev": true, @@ -1857,26 +1829,11 @@ "node": ">=6.9.0" } }, - "node_modules/@concordance/react": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", - "integrity": "sha512-huLSkUuM2/P+U0uy2WwlKuixMsTODD8p4JVQBI4VKeopkiN0C7M3N9XYVawb4M+4spN5RrO/eLhk7KoQX6nsfA==", - "dev": true, - "dependencies": { - "arrify": "^1.0.1" - }, - "engines": { - "node": ">=6.12.3 <7 || >=8.9.4 <9 || >=10.0.0" - } - }, - "node_modules/@concordance/react/node_modules/arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true }, "node_modules/@emnapi/core": { "version": "1.3.1", @@ -2246,42 +2203,389 @@ "dev": true, "license": "ISC" }, - "node_modules/@jest/schemas": { - "version": "29.6.3", + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", "dev": true, - "license": "MIT", "dependencies": { - "@sinclair/typebox": "^0.27.8" + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=8" } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.8", - "license": "MIT", - "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" - }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, "engines": { - "node": ">=6.0.0" + "node": ">=8" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "license": "MIT", + "node_modules/@jest/console": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-29.7.0.tgz", + "integrity": "sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0" + }, "engines": { - "node": ">=6.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "license": "MIT", + "node_modules/@jest/core": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.7.0.tgz", + "integrity": "sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/reporters": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^29.7.0", + "jest-config": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-resolve-dependencies": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "jest-watcher": "^29.7.0", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, "engines": { - "node": ">=6.0.0" - } + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", + "integrity": "sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ==", + "dev": true, + "dependencies": { + "expect": "^29.7.0", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/expect-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.7.0.tgz", + "integrity": "sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-29.7.0.tgz", + "integrity": "sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@sinonjs/fake-timers": "^10.0.2", + "@types/node": "*", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/fake-timers/node_modules/@sinonjs/fake-timers": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", + "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^3.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-29.7.0.tgz", + "integrity": "sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/types": "^29.6.3", + "jest-mock": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-29.7.0.tgz", + "integrity": "sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "@types/node": "*", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "slash": "^3.0.0", + "string-length": "^4.0.1", + "strip-ansi": "^6.0.0", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/reporters/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-29.6.3.tgz", + "integrity": "sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.18", + "callsites": "^3.0.0", + "graceful-fs": "^4.2.9" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-29.7.0.tgz", + "integrity": "sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz", + "integrity": "sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw==", + "dev": true, + "dependencies": { + "@jest/test-result": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-29.7.0.tgz", + "integrity": "sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/types": "^29.6.3", + "@jridgewell/trace-mapping": "^0.3.18", + "babel-plugin-istanbul": "^6.1.1", + "chalk": "^4.0.0", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "micromatch": "^4.0.4", + "pirates": "^4.0.4", + "slash": "^3.0.0", + "write-file-atomic": "^4.0.2" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/transform/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@jest/transform/node_modules/write-file-atomic": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz", + "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.7" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.0", @@ -2615,14 +2919,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@lerna/create/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@lerna/create/node_modules/rimraf": { "version": "4.4.1", "dev": true, @@ -3594,15 +3890,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", - "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "dev": true, @@ -3611,49 +3898,6 @@ "type-detect": "4.0.8" } }, - "node_modules/@sinonjs/fake-timers": { - "version": "13.0.5", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "8.0.2", - "dev": true, - "license": "BSD-3-Clause", - "dependencies": { - "@sinonjs/commons": "^3.0.1", - "lodash.get": "^4.4.2", - "type-detect": "^4.1.0" - } - }, - "node_modules/@sinonjs/samsam/node_modules/type-detect": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.3", - "dev": true, - "license": "(Unlicense OR Apache-2.0)" - }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", - "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", - "dev": true, - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "dev": true, @@ -3704,48 +3948,275 @@ "tslib": "^2.4.0" } }, - "node_modules/@types/estree": { - "version": "1.0.6", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "dev": true, - "license": "MIT" - }, - "node_modules/@types/minimatch": { - "version": "3.0.5", + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, - "license": "MIT" + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } }, - "node_modules/@types/minimist": { - "version": "1.2.5", + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", "dev": true, - "license": "MIT" + "dependencies": { + "@babel/types": "^7.0.0" + } }, - "node_modules/@types/node": { - "version": "22.10.2", + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, - "license": "MIT", "dependencies": { - "undici-types": "~6.20.0" + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" } }, - "node_modules/@types/node-forge": { - "version": "1.3.11", + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", "dev": true, - "license": "MIT", "dependencies": { - "@types/node": "*" + "@babel/types": "^7.20.7" } }, - "node_modules/@types/normalize-package-data": { - "version": "2.4.1", + "node_modules/@types/estree": { + "version": "1.0.6", "dev": true, "license": "MIT" }, - "node_modules/@xmpp/base64": { + "node_modules/@types/graceful-fs": { + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimatch": { + "version": "3.0.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "22.10.2", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } + }, + "node_modules/@types/node-forge": { + "version": "1.3.11", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.1.tgz", + "integrity": "sha512-HxfHo2b090M5s2+/9Z3gkBhI6xBH8OJCFjH9MhQ+nnoZqxU3wNxkLT+VWXWSFWc3UF3Z+CfPAyqdCTdoXtDPCQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/visitor-keys": "8.18.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.1.tgz", + "integrity": "sha512-7uoAUsCj66qdNQNpH2G8MyTFlgerum8ubf21s3TSM3XmKXuIn+H2Sifh/ES2nPOPiYSRJWAk0fDkW0APBWcpfw==", + "dev": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.1.tgz", + "integrity": "sha512-z8U21WI5txzl2XYOW7i9hJhxoKKNG1kcU4RzyNvKrdZDmbjkmLBo8bgeiOJmA06kizLI76/CCBAAGlTlEeUfyg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/visitor-keys": "8.18.1", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^1.3.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.1.tgz", + "integrity": "sha512-8vikiIj2ebrC4WRdcAdDcmnu9Q/MXXwg+STf40BVfT8exDqBCUPdypvzcUPxEqRGKg9ALagZ0UWcYCtn+4W2iQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@typescript-eslint/scope-manager": "8.18.1", + "@typescript-eslint/types": "8.18.1", + "@typescript-eslint/typescript-estree": "8.18.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <5.8.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.1.tgz", + "integrity": "sha512-Vj0WLm5/ZsD013YeUKn+K0y8p1M0jPpxOkKdbD1wB0ns53a5piVY02zjf072TblEweAbcYiFiPoSMF3kp+VhhQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "8.18.1", + "eslint-visitor-keys": "^4.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@xmpp/base64": { "resolved": "packages/base64", "link": true }, @@ -3962,18 +4433,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", - "dev": true, - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/add-stream": { "version": "1.0.0", "dev": true, @@ -4014,15 +4473,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-align": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", - "integrity": "sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w==", - "dev": true, - "dependencies": { - "string-width": "^4.1.0" - } - }, "node_modules/ansi-colors": { "version": "4.1.3", "dev": true, @@ -4081,6 +4531,17 @@ "dev": true, "license": "ISC" }, + "node_modules/are-we-there-yet": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz", + "integrity": "sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, "node_modules/argparse": { "version": "1.0.10", "dev": true, @@ -4097,14 +4558,6 @@ "node": ">=8" } }, - "node_modules/array-find-index": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/array-from": { "version": "2.1.1", "dev": true, @@ -4123,14 +4576,6 @@ "node": ">=8" } }, - "node_modules/arrgv": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/arrify": { "version": "2.0.1", "dev": true, @@ -4177,15 +4622,6 @@ "inherits": "2.0.1" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", - "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/async": { "version": "3.2.6", "dev": true, @@ -4196,168 +4632,84 @@ "dev": true, "license": "MIT" }, - "node_modules/ava": { - "version": "3.15.0", - "resolved": "https://registry.npmjs.org/ava/-/ava-3.15.0.tgz", - "integrity": "sha512-HGAnk1SHPk4Sx6plFAUkzV/XC1j9+iQhOzt4vBly18/yo0AV8Oytx7mtJd/CR8igCJ5p160N/Oo/cNJi2uSeWA==", + "node_modules/available-typed-arrays": { + "version": "1.0.4", "dev": true, - "dependencies": { - "@concordance/react": "^2.0.0", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "ansi-styles": "^5.0.0", - "arrgv": "^1.0.2", - "arrify": "^2.0.1", - "callsites": "^3.1.0", - "chalk": "^4.1.0", - "chokidar": "^3.4.3", - "chunkd": "^2.0.1", - "ci-info": "^2.0.0", - "ci-parallel-vars": "^1.0.1", - "clean-yaml-object": "^0.1.0", - "cli-cursor": "^3.1.0", - "cli-truncate": "^2.1.0", - "code-excerpt": "^3.0.0", - "common-path-prefix": "^3.0.0", - "concordance": "^5.0.1", - "convert-source-map": "^1.7.0", - "currently-unhandled": "^0.4.1", - "debug": "^4.3.1", - "del": "^6.0.0", - "emittery": "^0.8.0", - "equal-length": "^1.0.0", - "figures": "^3.2.0", - "globby": "^11.0.1", - "ignore-by-default": "^2.0.0", - "import-local": "^3.0.2", - "indent-string": "^4.0.0", - "is-error": "^2.2.2", - "is-plain-object": "^5.0.0", - "is-promise": "^4.0.0", - "lodash": "^4.17.20", - "matcher": "^3.0.0", - "md5-hex": "^3.0.1", - "mem": "^8.0.0", - "ms": "^2.1.3", - "ora": "^5.2.0", - "p-event": "^4.2.0", - "p-map": "^4.0.0", - "picomatch": "^2.2.2", - "pkg-conf": "^3.1.0", - "plur": "^4.0.0", - "pretty-ms": "^7.0.1", - "read-pkg": "^5.2.0", - "resolve-cwd": "^3.0.0", - "slash": "^3.0.0", - "source-map-support": "^0.5.19", - "stack-utils": "^2.0.3", - "strip-ansi": "^6.0.0", - "supertap": "^2.0.0", - "temp-dir": "^2.0.0", - "trim-off-newlines": "^1.0.1", - "update-notifier": "^5.0.1", - "write-file-atomic": "^3.0.3", - "yargs": "^16.2.0" - }, - "bin": { - "ava": "cli.js" - }, + "license": "MIT", "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0 <15 || >=15" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ava/node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true + "node_modules/axios": { + "version": "1.7.9", + "dev": true, + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } }, - "node_modules/ava/node_modules/cli-truncate": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", - "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "node_modules/babel-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-29.7.0.tgz", + "integrity": "sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==", "dev": true, "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "@jest/transform": "^29.7.0", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.1.1", + "babel-preset-jest": "^29.6.3", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "slash": "^3.0.0" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "peerDependencies": { + "@babel/core": "^7.8.0" } }, - "node_modules/ava/node_modules/slice-ansi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", - "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "node_modules/babel-plugin-istanbul": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", + "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^5.0.4", + "test-exclude": "^6.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/ava/node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/babel-plugin-jest-hoist": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz", + "integrity": "sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.4", - "dev": true, + "node_modules/babel-plugin-jsx-pragmatic": { + "version": "1.0.2", "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/axios": { - "version": "1.7.9", - "dev": true, - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "node_modules/babel-plugin-espower": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/babel-plugin-espower/-/babel-plugin-espower-3.0.1.tgz", - "integrity": "sha512-Ms49U7VIAtQ/TtcqRbD6UBmJBUCSxiC3+zPc+eGqxKUIFO1lTshyEDRUjhoAbd2rWfwYf3cZ62oXozrd8W6J0A==", - "dev": true, - "dependencies": { - "@babel/generator": "^7.0.0", - "@babel/parser": "^7.0.0", - "call-matcher": "^1.0.0", - "core-js": "^2.0.0", - "espower-location-detector": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.1.1" - } - }, - "node_modules/babel-plugin-jsx-pragmatic": { - "version": "1.0.2", - "license": "MIT", - "dependencies": { - "babel-plugin-syntax-jsx": "^6.0.0" + "dependencies": { + "babel-plugin-syntax-jsx": "^6.0.0" } }, "node_modules/babel-plugin-polyfill-corejs2": { @@ -4413,6 +4765,48 @@ "dev": true, "license": "MIT" }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz", + "integrity": "sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, "node_modules/babelify": { "version": "10.0.0", "dev": true, @@ -4503,8 +4897,8 @@ }, "node_modules/binary-extensions": { "version": "2.2.0", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">=8" } @@ -4555,62 +4949,11 @@ "node": ">= 6" } }, - "node_modules/blueimp-md5": { - "version": "2.18.0", - "dev": true, - "license": "MIT" - }, "node_modules/bn.js": { "version": "5.2.0", "dev": true, "license": "MIT" }, - "node_modules/boxen": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz", - "integrity": "sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ==", - "dev": true, - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.2", - "type-fest": "^0.20.2", - "widest-line": "^3.1.0", - "wrap-ansi": "^7.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/camelcase": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", - "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "license": "MIT", @@ -4635,6 +4978,19 @@ "dev": true, "license": "MIT" }, + "node_modules/brotli-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/brotli-size/-/brotli-size-0.1.0.tgz", + "integrity": "sha512-5ny7BNvpe2TSmdafF1T9dnFYp3AIrJ8qJt29K0DQJzORlK38LBim/CmlY26JtreV6SWmXza7Oa+9m61SzvxR0Q==", + "dev": true, + "dependencies": { + "duplexer": "^0.1.1", + "iltorb": "^2.4.3" + }, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/browser-pack": { "version": "6.1.0", "dev": true, @@ -4869,6 +5225,15 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, "node_modules/buffer": { "version": "5.2.1", "dev": true, @@ -4903,6 +5268,29 @@ "dev": true, "license": "MIT" }, + "node_modules/bundlesize": { + "version": "0.18.2", + "resolved": "https://registry.npmjs.org/bundlesize/-/bundlesize-0.18.2.tgz", + "integrity": "sha512-wthRURckcAbe0Qcr7xMH8evVE/kjID8gqY0M17XJI/FVgCljLx6Ag4lIDbV76KVb2Ey5iCA4n5Fur61TEhF1JQ==", + "dev": true, + "dependencies": { + "axios": "^1.6.2", + "brotli-size": "0.1.0", + "bytes": "^3.1.0", + "ci-env": "^1.4.0", + "commander": "^2.20.0", + "cosmiconfig": "^5.2.1", + "github-build": "^1.2.4", + "glob": "^7.1.4", + "gzip-size": "^4.0.0", + "prettycli": "^1.4.3" + }, + "bin": { + "bundlesize": "index.js", + "bundlesize-init": "src/init-status.js", + "bundlesize-pipe": "pipe.js" + } + }, "node_modules/byte-size": { "version": "8.1.1", "dev": true, @@ -4911,6 +5299,15 @@ "node": ">=12.17" } }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/cacache": { "version": "18.0.4", "dev": true, @@ -4979,48 +5376,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", - "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", - "dev": true, - "dependencies": { - "clone-response": "^1.0.2", - "get-stream": "^5.1.0", - "http-cache-semantics": "^4.0.0", - "keyv": "^3.0.0", - "lowercase-keys": "^2.0.0", - "normalize-url": "^4.1.0", - "responselike": "^1.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/cacheable-request/node_modules/lowercase-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", - "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/cached-path-relative": { "version": "1.0.2", "dev": true, @@ -5028,8 +5383,7 @@ }, "node_modules/call-bind": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", - "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", @@ -5045,8 +5399,7 @@ }, "node_modules/call-bind-apply-helpers": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", - "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" @@ -5055,25 +5408,37 @@ "node": ">= 0.4" } }, - "node_modules/call-matcher": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/call-matcher/-/call-matcher-1.1.0.tgz", - "integrity": "sha512-IoQLeNwwf9KTNbtSA7aEBb1yfDbdnzwjCetjkC8io5oGeOmK2CBNdg0xr+tadRYKO0p7uQyZzvon0kXlZbvGrw==", + "node_modules/caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", "dev": true, "dependencies": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" + "callsites": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, - "node_modules/call-signature": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/call-signature/-/call-signature-0.0.2.tgz", - "integrity": "sha512-qvYvkAVcoae0obt8OsZn0VEBHeEpvYIZDy1gGYtZDJG0fHawew+Mi0dBjieFz8F8dzQ2Kr19+nsDm+T5XFVs+Q==", + "node_modules/caller-callsite/node_modules/callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=4" + } + }, + "node_modules/caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", + "dev": true, + "dependencies": { + "caller-callsite": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/callsites": { @@ -5155,6 +5520,15 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/chardet": { "version": "0.7.0", "dev": true, @@ -5162,8 +5536,8 @@ }, "node_modules/chokidar": { "version": "3.6.0", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -5191,15 +5565,14 @@ "node": ">=10" } }, - "node_modules/chunkd": { - "version": "2.0.1", - "dev": true, - "license": "MIT" + "node_modules/ci-env": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/ci-env/-/ci-env-1.17.0.tgz", + "integrity": "sha512-NtTjhgSEqv4Aj90TUYHQLxHdnCPXnjdtuGG1X8lTfp/JqeXTdw0FTWl/vUAPuvbWZTF8QVpv6ASe/XacE+7R2A==", + "dev": true }, "node_modules/ci-info": { "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, "funding": [ { @@ -5207,15 +5580,11 @@ "url": "https://github.com/sponsors/sibiraj-s" } ], + "license": "MIT", "engines": { "node": ">=8" } }, - "node_modules/ci-parallel-vars": { - "version": "1.0.1", - "dev": true, - "license": "MIT" - }, "node_modules/cipher-base": { "version": "1.0.4", "license": "MIT", @@ -5224,6 +5593,12 @@ "safe-buffer": "^5.0.1" } }, + "node_modules/cjs-module-lexer": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", + "dev": true + }, "node_modules/clean-regexp": { "version": "1.0.0", "dev": true, @@ -5251,27 +5626,6 @@ "node": ">=6" } }, - "node_modules/clean-yaml-object": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/clean-yaml-object/-/clean-yaml-object-0.1.0.tgz", - "integrity": "sha512-3yONmlN9CSAkzNwnRCiJQ7Q2xK5mWuEfL3PuTZcAUzhObbXsfsnMptJzXwz93nc5zn9V9TwCVMmV7w4xsm43dw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", - "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "dev": true, @@ -5296,9 +5650,8 @@ }, "node_modules/cli-truncate": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", - "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, + "license": "MIT", "dependencies": { "slice-ansi": "^5.0.0", "string-width": "^7.0.0" @@ -5312,9 +5665,8 @@ }, "node_modules/cli-truncate/node_modules/ansi-regex": { "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -5324,15 +5676,13 @@ }, "node_modules/cli-truncate/node_modules/emoji-regex": { "version": "10.4.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", - "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/cli-truncate/node_modules/string-width": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", - "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^10.3.0", "get-east-asian-width": "^1.0.0", @@ -5347,9 +5697,8 @@ }, "node_modules/cli-truncate/node_modules/strip-ansi": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -5408,27 +5757,6 @@ "node": ">=0.10.0" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", - "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", - "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/clone-response/node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/cmd-shim": { "version": "6.0.3", "dev": true, @@ -5437,18 +5765,31 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/code-excerpt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz", - "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==", + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", "dev": true, - "dependencies": { - "convert-to-spaces": "^1.0.1" - }, "engines": { - "node": ">=10" + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, + "node_modules/collect-v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz", + "integrity": "sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q==", + "dev": true + }, "node_modules/color-convert": { "version": "2.0.1", "dev": true, @@ -5517,16 +5858,17 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "node_modules/common-ancestor-path": { "version": "1.0.1", "dev": true, "license": "ISC" }, - "node_modules/common-path-prefix": { - "version": "3.0.0", - "dev": true, - "license": "ISC" - }, "node_modules/common-shakeify": { "version": "1.1.2", "dev": true, @@ -5570,55 +5912,6 @@ "typedarray": "^0.0.6" } }, - "node_modules/concordance": { - "version": "5.0.4", - "dev": true, - "license": "ISC", - "dependencies": { - "date-time": "^3.1.0", - "esutils": "^2.0.3", - "fast-diff": "^1.2.0", - "js-string-escape": "^1.0.1", - "lodash": "^4.17.15", - "md5-hex": "^3.0.1", - "semver": "^7.3.2", - "well-known-symbols": "^2.0.0" - }, - "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14" - } - }, - "node_modules/concordance/node_modules/semver": { - "version": "7.3.5", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/configstore": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", - "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", - "dev": true, - "dependencies": { - "dot-prop": "^5.2.0", - "graceful-fs": "^4.1.2", - "make-dir": "^3.0.0", - "unique-string": "^2.0.0", - "write-file-atomic": "^3.0.0", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/console-browserify": { "version": "1.2.0", "dev": true @@ -5972,25 +6265,8 @@ "dev": true, "license": "MIT" }, - "node_modules/convert-to-spaces": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", - "integrity": "sha512-cj09EBuObp9gZNQCzc7hByQyrs6jVGE+o9kSJmeUoj+GiPiJvi5LYqEH/Hmme4+MTLHM+Ejtq+FChpjjEnsPdQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/core-js": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", - "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", - "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.", - "dev": true, - "hasInstallScript": true - }, - "node_modules/core-js-compat": { - "version": "3.39.0", + "node_modules/core-js-compat": { + "version": "3.39.0", "dev": true, "license": "MIT", "dependencies": { @@ -6006,6 +6282,21 @@ "dev": true, "license": "MIT" }, + "node_modules/cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "dependencies": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/count-lines": { "version": "0.1.2", "dev": true, @@ -6050,6 +6341,27 @@ "sha.js": "^2.4.8" } }, + "node_modules/create-jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/create-jest/-/create-jest-29.7.0.tgz", + "integrity": "sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "prompts": "^2.0.1" + }, + "bin": { + "create-jest": "bin/create-jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "dev": true, @@ -6084,15 +6396,6 @@ "node": "*" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", - "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/cssesc": { "version": "3.0.0", "dev": true, @@ -6115,17 +6418,6 @@ "node": ">=18" } }, - "node_modules/currently-unhandled": { - "version": "0.4.1", - "dev": true, - "license": "MIT", - "dependencies": { - "array-find-index": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/d": { "version": "1.0.1", "dev": true, @@ -6160,17 +6452,6 @@ "node": ">=18" } }, - "node_modules/date-time": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "time-zone": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/dateformat": { "version": "3.0.3", "dev": true, @@ -6230,31 +6511,23 @@ "dev": true, "license": "MIT" }, - "node_modules/dedent": { - "version": "0.7.0", - "dev": true, - "license": "MIT" - }, - "node_modules/deep-equal": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", - "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", + "node_modules/decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", "dev": true, "dependencies": { - "is-arguments": "^1.1.1", - "is-date-object": "^1.0.5", - "is-regex": "^1.1.4", - "object-is": "^1.1.5", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.5.1" + "mimic-response": "^2.0.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": ">=8" } }, + "node_modules/dedent": { + "version": "0.7.0", + "dev": true, + "license": "MIT" + }, "node_modules/deep-extend": { "version": "0.6.0", "dev": true, @@ -6268,6 +6541,15 @@ "dev": true, "license": "MIT" }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/defaults": { "version": "1.0.3", "dev": true, @@ -6276,16 +6558,9 @@ "clone": "^1.0.2" } }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", - "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", - "dev": true - }, "node_modules/define-data-property": { "version": "1.1.4", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", - "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", @@ -6308,8 +6583,7 @@ }, "node_modules/define-properties": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", - "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", @@ -6327,28 +6601,6 @@ "dev": true, "license": "MIT" }, - "node_modules/del": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", - "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", - "dev": true, - "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "dev": true, @@ -6357,6 +6609,12 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, "node_modules/deprecation": { "version": "2.3.1", "dev": true, @@ -6393,6 +6651,27 @@ "node": ">=4" } }, + "node_modules/detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==", + "dev": true, + "bin": { + "detect-libc": "bin/detect-libc.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/detective": { "version": "5.2.0", "dev": true, @@ -6409,14 +6688,6 @@ "node": ">=0.8.0" } }, - "node_modules/diff": { - "version": "7.0.0", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/diff-sequences": { "version": "29.6.3", "dev": true, @@ -6498,8 +6769,7 @@ }, "node_modules/dunder-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", @@ -6522,12 +6792,6 @@ "readable-stream": "^2.0.2" } }, - "node_modules/duplexer3": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.5.tgz", - "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", - "dev": true - }, "node_modules/eastasianwidth": { "version": "0.2.0", "dev": true, @@ -6570,33 +6834,11 @@ "dev": true, "license": "MIT" }, - "node_modules/emittery": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", - "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/emittery?sponsor=1" - } - }, "node_modules/emoji-regex": { "version": "8.0.0", "dev": true, "license": "MIT" }, - "node_modules/empower-core": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/empower-core/-/empower-core-1.2.0.tgz", - "integrity": "sha512-g6+K6Geyc1o6FdXs9HwrXleCFan7d66G5xSCfSF7x1mJDCes6t0om9lFQG3zOrzh3Bkb/45N0cZ5Gqsf7YrzGQ==", - "dev": true, - "dependencies": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, "node_modules/encoding": { "version": "0.1.13", "license": "MIT", @@ -6688,15 +6930,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/equal-length": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/equal-length/-/equal-length-1.0.1.tgz", - "integrity": "sha512-TK2m7MvWPt/v3dan0BCNp99pytIE5UGrUj7F0KZirNX8xz8fDFUAZfgm8uB5FuQq9u0sMeDocYBfEhsd1nwGoA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/err-code": { "version": "2.0.3", "dev": true, @@ -6741,24 +6974,21 @@ }, "node_modules/es-define-property": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-errors": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/es-object-atoms": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", - "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, @@ -6791,12 +7021,6 @@ "next-tick": "~1.0.0" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "dev": true - }, "node_modules/es6-iterator": { "version": "2.0.3", "dev": true, @@ -6868,20 +7092,10 @@ "node": ">=6" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", - "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/escape-string-regexp": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -7035,6 +7249,31 @@ "eslint": ">=8" } }, + "node_modules/eslint-plugin-jest": { + "version": "28.10.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.10.0.tgz", + "integrity": "sha512-hyMWUxkBH99HpXT3p8hc7REbEZK3D+nk8vHXGgpB+XXsi0gO4PxMSP+pjfUzb67GnV9yawV9a53eUmcde1CCZA==", + "dev": true, + "dependencies": { + "@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "engines": { + "node": "^16.10.0 || ^18.12.0 || >=20.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0 || ^8.0.0", + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0", + "jest": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + }, + "jest": { + "optional": true + } + } + }, "node_modules/eslint-plugin-n": { "version": "17.15.0", "dev": true, @@ -7360,18 +7599,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/espower-location-detector": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/espower-location-detector/-/espower-location-detector-1.0.0.tgz", - "integrity": "sha512-Y/3H6ytYwqC3YcOc0gOU22Lp3eI5GAFGOymTdzFyfaiglKgtsw2dePOgXY3yrV+QcLPMPiVYwBU9RKaDoh2bbQ==", - "dev": true, - "dependencies": { - "is-url": "^1.2.1", - "path-is-absolute": "^1.0.0", - "source-map": "^0.5.0", - "xtend": "^4.0.0" - } - }, "node_modules/espree": { "version": "10.3.0", "dev": true, @@ -7400,15 +7627,6 @@ "node": ">=4" } }, - "node_modules/espurify": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/espurify/-/espurify-1.8.1.tgz", - "integrity": "sha512-ZDko6eY/o+D/gHCWyHTU85mKDgYcS4FJj7S+YD6WIInm7GQ6AnOjmcL4+buFV/JOztVLELi/7MmuGU5NHta0Mg==", - "dev": true, - "dependencies": { - "core-js": "^2.0.0" - } - }, "node_modules/esquery": { "version": "1.6.0", "dev": true, @@ -7538,6 +7756,15 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/exorcist": { "version": "2.0.0", "dev": true, @@ -7552,6 +7779,31 @@ "exorcist": "bin/exorcist.js" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/expect": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-29.7.0.tgz", + "integrity": "sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw==", + "dev": true, + "dependencies": { + "@jest/expect-utils": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/exponential-backoff": { "version": "3.1.1", "dev": true, @@ -7599,11 +7851,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-diff": { - "version": "1.2.0", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/fast-glob": { "version": "3.3.2", "dev": true, @@ -7642,6 +7889,15 @@ "reusify": "^1.0.4" } }, + "node_modules/fb-watchman": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", + "integrity": "sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, "node_modules/figures": { "version": "3.2.0", "dev": true, @@ -7908,6 +8164,19 @@ "version": "1.0.0", "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "license": "MIT", @@ -7915,13 +8184,74 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "node_modules/gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg==", + "deprecated": "This package is no longer supported.", "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "dependencies": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "node_modules/gauge/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gauge/node_modules/aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true + }, + "node_modules/gauge/node_modules/is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==", + "dev": true, + "dependencies": { + "number-is-nan": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gauge/node_modules/string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==", + "dev": true, + "dependencies": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/gauge/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, "node_modules/gensync": { @@ -7957,8 +8287,7 @@ }, "node_modules/get-intrinsic": { "version": "1.2.6", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", - "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", + "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", "dunder-proto": "^1.0.0", @@ -7978,6 +8307,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/get-pkg-repo": { "version": "4.2.1", "dev": true, @@ -8126,6 +8464,32 @@ "ini": "^1.3.2" } }, + "node_modules/github-build": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/github-build/-/github-build-1.2.4.tgz", + "integrity": "sha512-1kdMmIrvYH18ITHGMVa5BXOxj/+i/VZzPR4PGMBpLW9h15woU+gpM/mlqOk+jmuD4mmib8Dgb6Xcbyy0v+RqqA==", + "dev": true, + "dependencies": { + "axios": "1.6.0" + } + }, + "node_modules/github-build/node_modules/axios": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", + "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", + "dev": true, + "dependencies": { + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "dev": true + }, "node_modules/glob": { "version": "7.2.3", "license": "ISC", @@ -8155,30 +8519,6 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.1.tgz", - "integrity": "sha512-NBcGGFbBA9s1VzD41QXDG+3++t9Mn5t1FpLdhESY6oKY4gYTFpX4wO3sqGUa0Srjtbfj3szX0RnemmrVRUdULA==", - "dev": true, - "dependencies": { - "ini": "2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/global-dirs/node_modules/ini": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz", - "integrity": "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "11.12.0", "license": "MIT", @@ -8207,8 +8547,7 @@ }, "node_modules/gopd": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8216,66 +8555,24 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/got": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", - "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", - "dev": true, - "dependencies": { - "@sindresorhus/is": "^0.14.0", - "@szmarczak/http-timer": "^1.1.2", - "cacheable-request": "^6.0.0", - "decompress-response": "^3.3.0", - "duplexer3": "^0.1.4", - "get-stream": "^4.1.0", - "lowercase-keys": "^1.0.1", - "mimic-response": "^1.0.1", - "p-cancelable": "^1.0.0", - "to-readable-stream": "^1.0.0", - "url-parse-lax": "^3.0.0" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/got/node_modules/decompress-response": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", - "integrity": "sha512-BzRPQuY1ip+qDonAOz42gRm/pg9F768C+npV/4JOsxRC2sq+Rlk+Q4ZCAsOhnIaMrgarILY+RMUIvMmmX1qAEA==", + "node_modules/graceful-fs": { + "version": "4.2.11", "dev": true, - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } + "license": "ISC" }, - "node_modules/got/node_modules/get-stream": { + "node_modules/gzip-size": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-4.1.0.tgz", + "integrity": "sha512-1g6EPVvIHuPmpAdBBpsIVYLgjzGV/QqcFRJXpMyrqEWG10JhOaTjQeCcjMDyX0Iqfm/Q5M9twR/mbDk5f5MqkA==", "dev": true, "dependencies": { - "pump": "^3.0.0" + "duplexer": "^0.1.1", + "pify": "^3.0.0" }, - "engines": { - "node": ">=6" - } - }, - "node_modules/got/node_modules/mimic-response": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", - "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", - "dev": true, "engines": { "node": ">=4" } }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "dev": true, - "license": "ISC" - }, "node_modules/handlebars": { "version": "4.7.8", "dev": true, @@ -8358,8 +8655,7 @@ }, "node_modules/has-property-descriptors": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", - "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" }, @@ -8369,8 +8665,7 @@ }, "node_modules/has-symbols": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -8396,15 +8691,6 @@ "dev": true, "license": "ISC" }, - "node_modules/has-yarn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", - "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hash-base": { "version": "3.1.0", "license": "MIT", @@ -8438,31 +8724,6 @@ "minimalistic-assert": "^1.0.1" } }, - "node_modules/hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "dependencies": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/hasha/node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/hasown": { "version": "2.0.2", "license": "MIT", @@ -8520,6 +8781,12 @@ "node": ">=18" } }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "node_modules/htmlescape": { "version": "1.1.1", "dev": true, @@ -8622,15 +8889,6 @@ "node": ">= 4" } }, - "node_modules/ignore-by-default": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz", - "integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==", - "dev": true, - "engines": { - "node": ">=10 <11 || >=12 <13 || >=14" - } - }, "node_modules/ignore-walk": { "version": "6.0.5", "dev": true, @@ -8664,10 +8922,38 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha512-m7ZEHgtw69qOGw+jwxXkHlrlIPdTGkyh66zXZ1ajZbxkDBNjSY/LGbmjc7h0s2ELsUDTAhFr55TrPSSqJGPG0A==", + "node_modules/iltorb": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/iltorb/-/iltorb-2.4.5.tgz", + "integrity": "sha512-EMCMl3LnnNSZJS5QrxyZmMTaAC4+TJkM5woD+xbpm9RB+mFYCr7C05GFE3TEGCsVQSVHmjX+3sf5AiwsylNInQ==", + "deprecated": "The zlib module provides APIs for brotli compression/decompression starting with Node.js v10.16.0, please use it over iltorb", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "detect-libc": "^1.0.3", + "nan": "^2.14.0", + "npmlog": "^4.1.2", + "prebuild-install": "^5.3.3", + "which-pm-runs": "^1.0.0" + } + }, + "node_modules/import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", + "dev": true, + "dependencies": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/import-fresh/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", "dev": true, "engines": { "node": ">=4" @@ -8891,15 +9177,6 @@ "version": "1.3.1", "license": "Unlicense" }, - "node_modules/irregular-plurals": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", - "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-arguments": { "version": "1.1.1", "dev": true, @@ -8932,8 +9209,8 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -8984,24 +9261,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-ci/node_modules/ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, "node_modules/is-core-module": { "version": "2.6.0", "dev": true, @@ -9026,6 +9285,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-docker": { "version": "2.2.1", "dev": true, @@ -9040,12 +9308,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-error": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/is-error/-/is-error-2.2.2.tgz", - "integrity": "sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==", - "dev": true - }, "node_modules/is-extglob": { "version": "2.1.1", "devOptional": true, @@ -9062,6 +9324,15 @@ "node": ">=8" } }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/is-generator-function": { "version": "1.0.10", "dev": true, @@ -9087,22 +9358,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz", - "integrity": "sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ==", - "dev": true, - "dependencies": { - "global-dirs": "^3.0.0", - "is-path-inside": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-interactive": { "version": "1.0.0", "dev": true, @@ -9126,18 +9381,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-npm": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", - "integrity": "sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "devOptional": true, @@ -9167,24 +9410,6 @@ "node": ">=8" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", - "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "1.1.0", "dev": true, @@ -9206,11 +9431,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-promise": { - "version": "4.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/is-regex": { "version": "1.1.4", "license": "MIT", @@ -9273,42 +9493,883 @@ "node_modules/is-text-path": { "version": "1.0.1", "dev": true, - "license": "MIT", + "license": "MIT", + "dependencies": { + "text-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.7", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.4", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "dev": true, + "license": "ISC" + }, + "node_modules/isobject": { + "version": "3.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz", + "integrity": "sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.3", + "@babel/parser": "^7.14.7", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report/node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/istanbul-lib-report/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jake": { + "version": "10.9.2", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", + "integrity": "sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/types": "^29.6.3", + "import-local": "^3.0.2", + "jest-cli": "^29.7.0" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-29.7.0.tgz", + "integrity": "sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w==", + "dev": true, + "dependencies": { + "execa": "^5.0.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-changed-files/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-circus": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz", + "integrity": "sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/expect": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^1.0.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^29.7.0", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "p-limit": "^3.1.0", + "pretty-format": "^29.7.0", + "pure-rand": "^6.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-circus/node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/jest-circus/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-cli": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", + "integrity": "sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==", + "dev": true, + "dependencies": { + "@jest/core": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "create-jest": "^29.7.0", + "exit": "^0.1.2", + "import-local": "^3.0.2", + "jest-config": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "yargs": "^17.3.1" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-cli/node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-cli/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/jest-config": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.7.0.tgz", + "integrity": "sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@jest/test-sequencer": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-jest": "^29.7.0", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-circus": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-runner": "^29.7.0", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "micromatch": "^4.0.4", + "parse-json": "^5.2.0", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-config/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-diff": { + "version": "29.7.0", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^29.6.3", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.7.0.tgz", + "integrity": "sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-each": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-29.7.0.tgz", + "integrity": "sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "jest-util": "^29.7.0", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-29.7.0.tgz", + "integrity": "sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-extended": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-4.0.2.tgz", + "integrity": "sha512-FH7aaPgtGYHc9mRjriS0ZEHYM5/W69tLrFTIdzm+yJgeoCmmrSB/luSfMSqWP9O29QWHPEmJ4qmU6EwsZideog==", + "dev": true, + "dependencies": { + "jest-diff": "^29.0.0", + "jest-get-type": "^29.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "jest": ">=27.2.5" + }, + "peerDependenciesMeta": { + "jest": { + "optional": true + } + } + }, + "node_modules/jest-get-type": { + "version": "29.6.3", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-29.7.0.tgz", + "integrity": "sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/graceful-fs": "^4.1.3", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.9", + "jest-regex-util": "^29.6.3", + "jest-util": "^29.7.0", + "jest-worker": "^29.7.0", + "micromatch": "^4.0.4", + "walker": "^1.0.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-leak-detector": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", + "integrity": "sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw==", + "dev": true, + "dependencies": { + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz", + "integrity": "sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "pretty-format": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.7.0.tgz", + "integrity": "sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^29.6.3", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "micromatch": "^4.0.4", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-mock": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", + "integrity": "sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw==", + "dev": true, + "dependencies": { + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-util": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", + "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-29.6.3.tgz", + "integrity": "sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg==", + "dev": true, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz", + "integrity": "sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^29.7.0", + "jest-validate": "^29.7.0", + "resolve": "^1.20.0", + "resolve.exports": "^2.0.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz", + "integrity": "sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA==", + "dev": true, + "dependencies": { + "jest-regex-util": "^29.6.3", + "jest-snapshot": "^29.7.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.7.0.tgz", + "integrity": "sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ==", + "dev": true, + "dependencies": { + "@jest/console": "^29.7.0", + "@jest/environment": "^29.7.0", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "graceful-fs": "^4.2.9", + "jest-docblock": "^29.7.0", + "jest-environment-node": "^29.7.0", + "jest-haste-map": "^29.7.0", + "jest-leak-detector": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-resolve": "^29.7.0", + "jest-runtime": "^29.7.0", + "jest-util": "^29.7.0", + "jest-watcher": "^29.7.0", + "jest-worker": "^29.7.0", + "p-limit": "^3.1.0", + "source-map-support": "0.5.13" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-runner/node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/jest-runner/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-runner/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-runner/node_modules/source-map-support": { + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/jest-runtime": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz", + "integrity": "sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ==", + "dev": true, + "dependencies": { + "@jest/environment": "^29.7.0", + "@jest/fake-timers": "^29.7.0", + "@jest/globals": "^29.7.0", + "@jest/source-map": "^29.6.3", + "@jest/test-result": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "glob": "^7.1.3", + "graceful-fs": "^4.2.9", + "jest-haste-map": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-mock": "^29.7.0", + "jest-regex-util": "^29.6.3", + "jest-resolve": "^29.7.0", + "jest-snapshot": "^29.7.0", + "jest-util": "^29.7.0", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.7.0.tgz", + "integrity": "sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw==", + "dev": true, + "dependencies": { + "@babel/core": "^7.11.6", + "@babel/generator": "^7.7.2", + "@babel/plugin-syntax-jsx": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/types": "^7.3.3", + "@jest/expect-utils": "^29.7.0", + "@jest/transform": "^29.7.0", + "@jest/types": "^29.6.3", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^29.7.0", + "graceful-fs": "^4.2.9", + "jest-diff": "^29.7.0", + "jest-get-type": "^29.6.3", + "jest-matcher-utils": "^29.7.0", + "jest-message-util": "^29.7.0", + "jest-util": "^29.7.0", + "natural-compare": "^1.4.0", + "pretty-format": "^29.7.0", + "semver": "^7.5.3" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", + "dev": true, "dependencies": { - "text-extensions": "^1.0.0" + "@jest/types": "^29.6.3", + "@types/node": "*", + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": ">=0.10.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/is-typed-array": { - "version": "1.1.7", + "node_modules/jest-validate": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.7.0.tgz", + "integrity": "sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw==", "dev": true, - "license": "MIT", "dependencies": { - "available-typed-arrays": "^1.0.4", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" + "@jest/types": "^29.6.3", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^29.6.3", + "leven": "^3.1.0", + "pretty-format": "^29.7.0" }, "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/is-unicode-supported": { - "version": "0.1.0", + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -9316,111 +10377,65 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-url": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz", - "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", - "dev": true - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, - "node_modules/is-wsl": { - "version": "2.2.0", + "node_modules/jest-watcher": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.7.0.tgz", + "integrity": "sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g==", "dev": true, - "license": "MIT", "dependencies": { - "is-docker": "^2.0.0" + "@jest/test-result": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.13.1", + "jest-util": "^29.7.0", + "string-length": "^4.0.1" }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", - "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", - "dev": true - }, - "node_modules/isarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/isexe": { - "version": "2.0.0", + "node_modules/jest-watcher/node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", "dev": true, - "license": "ISC" - }, - "node_modules/isobject": { - "version": "3.0.1", - "license": "MIT", "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jackspeak": { - "version": "3.4.3", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" - } - }, - "node_modules/jake": { - "version": "10.9.2", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.4", - "minimatch": "^3.1.2" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" + "url": "https://github.com/sindresorhus/emittery?sponsor=1" } }, - "node_modules/jest-diff": { + "node_modules/jest-worker": { "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, - "license": "MIT", "dependencies": { - "chalk": "^4.0.0", - "diff-sequences": "^29.6.3", - "jest-get-type": "^29.6.3", - "pretty-format": "^29.7.0" + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" }, "engines": { "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-get-type": { - "version": "29.6.3", - "dev": true, - "license": "MIT", - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/js-string-escape": { - "version": "1.0.1", + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, - "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, "engines": { - "node": ">= 0.8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/js-tokens": { @@ -9493,12 +10508,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", - "integrity": "sha512-CuUqjv0FUZIdXkHPI8MezCnFCdaTAacej1TZYulLoAg1h/PhwkdXFN4V/gzY4g+fMBCOV2xF+rp7t2XD2ns/NQ==", - "dev": true - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "dev": true, @@ -9591,20 +10600,6 @@ "dev": true, "license": "MIT" }, - "node_modules/just-extend": { - "version": "6.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/keyv": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", - "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", - "dev": true, - "dependencies": { - "json-buffer": "3.0.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "license": "MIT", @@ -9612,6 +10607,15 @@ "node": ">=0.10.0" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/koa-compose": { "version": "4.1.0", "license": "MIT" @@ -9625,18 +10629,6 @@ "stream-splicer": "^2.0.0" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", - "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", - "dev": true, - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lerna": { "version": "8.1.9", "dev": true, @@ -9970,14 +10962,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lerna/node_modules/resolve-from": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/lerna/node_modules/rimraf": { "version": "4.4.1", "dev": true, @@ -10081,6 +11065,15 @@ "node": ">=12" } }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/levn": { "version": "0.4.1", "dev": true, @@ -10471,17 +11464,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", - "dev": true - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.ismatch": { "version": "4.4.0", "dev": true, @@ -10729,15 +11711,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "dev": true, @@ -10751,8 +11724,7 @@ }, "node_modules/ltx": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/ltx/-/ltx-3.1.1.tgz", - "integrity": "sha512-1p19JqGI/OZEe4XoBM1i5/P2X/gO14RVqWgbPZJE5xOKrhbR7DznKi8hJhe1vTmgA6MSbE7Khg1uJMBxid4uCQ==", + "license": "MIT", "engines": { "node": ">= 12.4.0" } @@ -10765,21 +11737,6 @@ "sourcemap-codec": "^1.4.1" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/make-fetch-happen": { "version": "13.0.1", "dev": true, @@ -10802,16 +11759,13 @@ "node": "^16.14.0 || >=18.0.0" } }, - "node_modules/map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "node_modules/makeerror": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", + "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==", "dev": true, "dependencies": { - "p-defer": "^1.0.0" - }, - "engines": { - "node": ">=6" + "tmpl": "1.0.5" } }, "node_modules/map-obj": { @@ -10825,35 +11779,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/matcher": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-3.0.0.tgz", - "integrity": "sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/math-intrinsics": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/md5-hex": { - "version": "3.0.1", - "dev": true, "license": "MIT", - "dependencies": { - "blueimp-md5": "^2.10.0" - }, "engines": { - "node": ">=8" + "node": ">= 0.4" } }, "node_modules/md5.js": { @@ -10865,31 +11795,6 @@ "safe-buffer": "^5.1.2" } }, - "node_modules/mem": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/mem/-/mem-8.1.1.tgz", - "integrity": "sha512-qFCFUDs7U3b8mBDPyz5EToEKoAkgCzqquIgi9nkkR9bixxOVOre+09lbuH7+9Kn2NFpm56M3GUWVbU2hQgdACA==", - "dev": true, - "dependencies": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/mem?sponsor=1" - } - }, - "node_modules/mem/node_modules/mimic-fn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-3.1.0.tgz", - "integrity": "sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/meow": { "version": "8.1.2", "dev": true, @@ -11032,9 +11937,8 @@ }, "node_modules/mimic-fn": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", - "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -11053,6 +11957,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/min-indent": { "version": "1.0.1", "dev": true, @@ -11332,6 +12248,12 @@ "dev": true, "license": "MIT" }, + "node_modules/nan": { + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", + "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", + "dev": true + }, "node_modules/nanobench": { "version": "2.1.1", "dev": true, @@ -11405,6 +12327,12 @@ "node": ">=0.8.0" } }, + "node_modules/napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", + "dev": true + }, "node_modules/natural-compare": { "version": "1.4.0", "dev": true, @@ -11428,16 +12356,22 @@ "dev": true, "license": "MIT" }, - "node_modules/nise": { - "version": "6.1.1", + "node_modules/node-abi": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", + "integrity": "sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.1", - "@sinonjs/text-encoding": "^0.7.3", - "just-extend": "^6.2.0", - "path-to-regexp": "^8.1.0" + "semver": "^5.4.1" + } + }, + "node_modules/node-abi/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" } }, "node_modules/node-environment-flags": { @@ -11457,8 +12391,7 @@ }, "node_modules/node-fetch": { "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -11476,18 +12409,15 @@ }, "node_modules/node-fetch/node_modules/tr46": { "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + "license": "MIT" }, "node_modules/node-fetch/node_modules/webidl-conversions": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + "license": "BSD-2-Clause" }, "node_modules/node-fetch/node_modules/whatwg-url": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" @@ -11598,6 +12528,12 @@ "node": "^16.13.0 || >=18.0.0" } }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true + }, "node_modules/node-machine-id": { "version": "1.1.12", "dev": true, @@ -11607,6 +12543,12 @@ "version": "2.0.19", "license": "MIT" }, + "node_modules/noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha512-6kM8CLXvuW5crTxsAtva2YLrRrDaiTIkIePWs9moLHqbFWT94WpNFjwS/5dfLfECg5i/lkmw3aoqVidxt23TEQ==", + "dev": true + }, "node_modules/nopt": { "version": "7.2.1", "dev": true, @@ -11653,15 +12595,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", - "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/npm-bundled": { "version": "3.0.1", "dev": true, @@ -11793,6 +12726,28 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "node_modules/number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/nwsapi": { "version": "2.2.16", "dev": true, @@ -11982,22 +12937,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", - "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object-keys": { "version": "1.1.1", "license": "MIT", @@ -12161,39 +13100,6 @@ "node": ">=0.10.0" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", - "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", - "dev": true, - "dependencies": { - "p-timeout": "^3.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/p-finally": { "version": "1.0.0", "dev": true, @@ -12319,36 +13225,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/package-json": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", - "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", - "dev": true, - "dependencies": { - "got": "^9.6.0", - "registry-auth-token": "^4.0.0", - "registry-url": "^5.0.0", - "semver": "^6.2.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/package-json-from-dist": { "version": "1.0.1", "dev": true, @@ -12453,15 +13329,6 @@ "node": ">=4" } }, - "node_modules/parse-ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", - "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/parse-passwd": { "version": "1.0.0", "license": "MIT", @@ -12557,14 +13424,6 @@ "dev": true, "license": "ISC" }, - "node_modules/path-to-regexp": { - "version": "8.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=16" - } - }, "node_modules/path-type": { "version": "4.0.0", "dev": true, @@ -12629,108 +13488,6 @@ "node": ">= 6" } }, - "node_modules/pkg-conf": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", - "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", - "dev": true, - "dependencies": { - "find-up": "^3.0.0", - "load-json-file": "^5.2.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/load-json-file": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", - "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.15", - "parse-json": "^4.0.0", - "pify": "^4.0.1", - "strip-bom": "^3.0.0", - "type-fest": "^0.3.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/type-fest": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", - "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/pkg-dir": { "version": "3.0.0", "license": "MIT", @@ -12779,21 +13536,6 @@ "node": ">=4" } }, - "node_modules/plur": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", - "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", - "dev": true, - "dependencies": { - "irregular-plurals": "^3.2.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/pluralize": { "version": "8.0.0", "dev": true, @@ -12814,6 +13556,35 @@ "node": ">=4" } }, + "node_modules/prebuild-install": { + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.6.tgz", + "integrity": "sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg==", + "dev": true, + "dependencies": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "dev": true, @@ -12822,15 +13593,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", - "integrity": "sha512-ravE6m9Atw9Z/jjttRUZ+clIXogdghyZAuWJ3qEzjT+jI/dL1ifAqhZeC5VHzQp1MSt1+jxKkFNemj/iO7tVUA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { "version": "3.4.2", "dev": true, @@ -12866,19 +13628,84 @@ "node": ">= 0.8" } }, - "node_modules/pretty-ms": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", - "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "node_modules/prettycli": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/prettycli/-/prettycli-1.4.3.tgz", + "integrity": "sha512-KLiwAXXfSWXZqGmZlnKPuGMTFp+0QbcySplL1ft9gfteT/BNsG64Xo8u2Qr9r+qnsIZWBQ66Zs8tg+8s2fmzvw==", + "dev": true, + "dependencies": { + "chalk": "2.1.0" + } + }, + "node_modules/prettycli/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { - "parse-ms": "^2.1.0" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=10" + "node": ">=4" + } + }, + "node_modules/prettycli/node_modules/chalk": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.1.0.tgz", + "integrity": "sha512-LUHGS/dge4ujbXMJrnihYMcL4AoOweGnw9Tp3kQuqy1Kx5c1qKjqvMJZ6nVJPMWJtKCTN72ZogH3oeSO9g9rXQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.1.0", + "escape-string-regexp": "^1.0.5", + "supports-color": "^4.0.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "engines": { + "node": ">=4" + } + }, + "node_modules/prettycli/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/prettycli/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/prettycli/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/prettycli/node_modules/has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/prettycli/node_modules/supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha512-ycQR/UbvI9xIlEdQT1TQqwoXtEldExbCEAJgRo5YXlmSKjv6ThHnP9/vwGa1gr19Gfw+LkFd7KqYMhzrRC5JYw==", + "dev": true, + "dependencies": { + "has-flag": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/proc-log": { @@ -12943,6 +13770,19 @@ "node": ">=10" } }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/promzard": { "version": "1.0.2", "dev": true, @@ -12996,17 +13836,21 @@ "dev": true, "license": "MIT" }, - "node_modules/pupa": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", - "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", "dev": true, - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] }, "node_modules/querystring": { "version": "0.2.0", @@ -13263,8 +14107,8 @@ }, "node_modules/readdirp": { "version": "3.6.0", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -13315,27 +14159,9 @@ "node_modules/regexp-tree": { "version": "0.1.27", "dev": true, - "license": "MIT", - "bin": { - "regexp-tree": "bin/regexp-tree" - } - }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.3.tgz", - "integrity": "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-errors": "^1.3.0", - "set-function-name": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" + "license": "MIT", + "bin": { + "regexp-tree": "bin/regexp-tree" } }, "node_modules/regexpp": { @@ -13387,30 +14213,6 @@ "regjsparser": "bin/parser" } }, - "node_modules/registry-auth-token": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.2.tgz", - "integrity": "sha512-PC5ZysNb42zpFME6D/XlIgtNGdTl8bBOCw90xQLVMpzuuubJKYDWFAEuUNc+Cn8Z8724tg2SDhDRrkVEsqfDMg==", - "dev": true, - "dependencies": { - "rc": "1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", - "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", - "dev": true, - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/regjsgen": { "version": "0.8.0", "dev": true, @@ -13434,18 +14236,6 @@ "jsesc": "bin/jsesc" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", - "dev": true, - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -13477,10 +14267,11 @@ "node": ">=8" } }, - "node_modules/resolve-cwd/node_modules/resolve-from": { + "node_modules/resolve-from": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -13493,13 +14284,13 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/responselike": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", - "integrity": "sha512-/Fpe5guzJk1gPqdJLJR5u7eG/gNY4nImjbRDaVWVMRhne55TCmj2i9Q+54PBRfatRC8v/rIiv9BN0pMd9OV5EQ==", + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", "dev": true, - "dependencies": { - "lowercase-keys": "^1.0.0" + "engines": { + "node": ">=10" } }, "node_modules/restore-cursor": { @@ -13536,22 +14327,6 @@ "dev": true, "license": "MIT" }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/ripemd160": { "version": "2.0.2", "license": "MIT", @@ -13698,45 +14473,6 @@ "semver": "bin/semver.js" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", - "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", - "dev": true, - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/serialize-error": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-7.0.1.tgz", - "integrity": "sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==", - "dev": true, - "dependencies": { - "type-fest": "^0.13.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/serialize-error/node_modules/type-fest": { - "version": "0.13.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", - "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/set-blocking": { "version": "2.0.0", "dev": true, @@ -13744,8 +14480,7 @@ }, "node_modules/set-function-length": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", - "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", @@ -13758,21 +14493,6 @@ "node": ">= 0.4" } }, - "node_modules/set-function-name": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", - "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", - "dev": true, - "dependencies": { - "define-data-property": "^1.1.4", - "es-errors": "^1.3.0", - "functions-have-names": "^1.2.3", - "has-property-descriptors": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/sha.js": { "version": "2.4.11", "license": "(MIT AND BSD-3-Clause)", @@ -13878,23 +14598,23 @@ ], "license": "MIT" }, - "node_modules/sinon": { - "version": "19.0.2", + "node_modules/simple-get": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz", + "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", "dev": true, - "license": "BSD-3-Clause", "dependencies": { - "@sinonjs/commons": "^3.0.1", - "@sinonjs/fake-timers": "^13.0.2", - "@sinonjs/samsam": "^8.0.1", - "diff": "^7.0.0", - "nise": "^6.1.1", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" } }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, "node_modules/slash": { "version": "3.0.0", "dev": true, @@ -13905,9 +14625,8 @@ }, "node_modules/slice-ansi": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^6.0.0", "is-fullwidth-code-point": "^4.0.0" @@ -13921,9 +14640,8 @@ }, "node_modules/slice-ansi/node_modules/ansi-styles": { "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -13933,9 +14651,8 @@ }, "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=12" }, @@ -14095,9 +14812,8 @@ }, "node_modules/stack-utils": { "version": "2.0.6", - "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", - "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^2.0.0" }, @@ -14107,9 +14823,8 @@ }, "node_modules/stack-utils/node_modules/escape-string-regexp": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", - "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -14202,6 +14917,19 @@ "node": ">=0.6.19" } }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/string-width": { "version": "4.2.3", "dev": true, @@ -14282,18 +15010,6 @@ "node": ">=8" } }, - "node_modules/strip-bom-buf": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-2.0.0.tgz", - "integrity": "sha512-gLFNHucd6gzb8jMsl5QmZ3QgnUJmp7qn4uUSHNwEXumAp7YizoGYw19ZUVfuq4aBOQUtyn2k8X/CwzWB73W2lQ==", - "dev": true, - "dependencies": { - "is-utf8": "^0.2.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-final-newline": { "version": "2.0.0", "dev": true, @@ -14348,22 +15064,6 @@ "minimist": "^1.1.0" } }, - "node_modules/supertap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supertap/-/supertap-2.0.0.tgz", - "integrity": "sha512-jRzcXlCeDYvKoZGA5oRhYyR3jUIYu0enkSxtmAgHRlD7HwrovTpH4bDSi0py9FtuA8si9cW/fKommJHuaoDHJA==", - "dev": true, - "dependencies": { - "arrify": "^2.0.1", - "indent-string": "^4.0.0", - "js-yaml": "^3.14.0", - "serialize-error": "^7.0.1", - "strip-ansi": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/supports-color": { "version": "7.2.0", "dev": true, @@ -14412,6 +15112,24 @@ "node": ">=10" } }, + "node_modules/tar-fs": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", + "dev": true, + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-fs/node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true + }, "node_modules/tar-stream": { "version": "2.2.0", "dev": true, @@ -14470,11 +15188,16 @@ "node": ">=8" } }, - "node_modules/temp-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz", - "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, "engines": { "node": ">=8" } @@ -14501,14 +15224,6 @@ "xtend": "~4.0.1" } }, - "node_modules/time-zone": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/timers-browserify": { "version": "1.4.2", "dev": true, @@ -14543,14 +15258,11 @@ "node": ">=14.14" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", - "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", - "dev": true, - "engines": { - "node": ">=6" - } + "node_modules/tmpl": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", + "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", + "dev": true }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -14645,13 +15357,16 @@ "node": ">=8" } }, - "node_modules/trim-off-newlines": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/trim-off-newlines/-/trim-off-newlines-1.0.3.tgz", - "integrity": "sha512-kh6Tu6GbeSNMGfrrZh6Bb/4ZEHV1QlB4xNDBeog8Y9/QwFlKTRyWvY3Fs9tRDAMZliVUwieMgEdIeL/FtqjkJg==", + "node_modules/ts-api-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", + "integrity": "sha512-i3eMG77UTMD0hZhgRS562pv83RC6ukSAC2GMNWc+9dieh/+jDM5u5YG+NHX6VNDRHQcHwmsTHctP9LhbC3WxVw==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" } }, "node_modules/tsconfig-paths": { @@ -14698,6 +15413,18 @@ "node": "^16.14.0 || >=18.0.0" } }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/type": { "version": "1.2.0", "dev": true, @@ -14738,15 +15465,6 @@ "dev": true, "license": "MIT" }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.7.2", "dev": true, @@ -14869,18 +15587,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/unique-string": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", - "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", - "dev": true, - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/universal-user-agent": { "version": "6.0.1", "dev": true, @@ -14931,46 +15637,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz", - "integrity": "sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw==", - "dev": true, - "dependencies": { - "boxen": "^5.0.0", - "chalk": "^4.1.0", - "configstore": "^5.0.1", - "has-yarn": "^2.1.0", - "import-lazy": "^2.1.0", - "is-ci": "^2.0.0", - "is-installed-globally": "^0.4.0", - "is-npm": "^5.0.0", - "is-yarn-global": "^0.3.0", - "latest-version": "^5.1.0", - "pupa": "^2.1.1", - "semver": "^7.3.4", - "semver-diff": "^3.1.1", - "xdg-basedir": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/yeoman/update-notifier?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/uri-js": { "version": "4.4.1", "dev": true, @@ -14996,18 +15662,6 @@ "querystring": "0.2.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", - "integrity": "sha512-NjFKA0DidqPa5ciFcSrXnAltTtzz84ogy+NebPvfEgAck0+TNg4UJ4IN+fB7zRZfbgUf0syOo9MDxFkDSMuFaQ==", - "dev": true, - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "dev": true, @@ -15042,6 +15696,26 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, "node_modules/v8flags": { "version": "3.2.0", "license": "MIT", @@ -15090,6 +15764,15 @@ "dev": true, "license": "ISC" }, + "node_modules/walker": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz", + "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==", + "dev": true, + "dependencies": { + "makeerror": "1.0.12" + } + }, "node_modules/wcwidth": { "version": "1.0.1", "dev": true, @@ -15106,14 +15789,6 @@ "node": ">=12" } }, - "node_modules/well-known-symbols": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=6" - } - }, "node_modules/whatwg-encoding": { "version": "3.1.1", "dev": true, @@ -15184,6 +15859,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-pm-runs": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.1.0.tgz", + "integrity": "sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/which-typed-array": { "version": "1.1.6", "dev": true, @@ -15211,18 +15895,6 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", - "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", - "dev": true, - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "dev": true, @@ -15306,18 +15978,6 @@ "version": "1.0.2", "license": "ISC" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "dependencies": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } - }, "node_modules/write-json-file": { "version": "3.2.0", "dev": true, @@ -15412,15 +16072,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", - "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/xml-name-validator": { "version": "5.0.0", "dev": true, diff --git a/package.json b/package.json index 9c62f9717..27c5a31b9 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,15 @@ { "private": true, "type": "commonjs", - "bin": { - "serverctl": "server/ctl.js" - }, "devDependencies": { - "@ava/babel": "^2.0.0", "@babel/core": "^7.26.0", "@babel/plugin-proposal-object-rest-spread": "^7.16.5", + "@babel/plugin-transform-modules-commonjs": "^7.26.3", "@babel/plugin-transform-react-jsx": "^7.25.9", "@babel/plugin-transform-runtime": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", - "ava": "^3.15.0", + "babel-jest": "^29.7.0", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", "babelify": "^10.0.0", @@ -23,23 +20,25 @@ "common-shakeify": "^1.1.2", "eslint": "^9.16.0", "eslint-config-prettier": "^9.1.0", + "eslint-plugin-jest": "^28.10.0", "eslint-plugin-n": "^17.15.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^7.2.1", "eslint-plugin-unicorn": "^56.0.1", "exorcist": "^2.0.0", "husky": "^9.1.7", + "jest": "^29.7.0", + "jest-extended": "^4.0.2", "jsdom": "^25.0.1", "lerna": "^8.1.9", "lint-staged": "^15.2.11", "node-fetch": "^2.6.12", "prettier": "^3.4.2", "selfsigned": "^2.4.1", - "sinon": "^19.0.2", "uglify-js": "^3.19.3" }, "scripts": { - "test": "ava", + "test": "jest", "lint": "eslint --cache .", "preversion": "make bundle" }, diff --git a/packages/client-core/test/Client.js b/packages/client-core/test/Client.js index 9dd0cf133..b15f0057a 100644 --- a/packages/client-core/test/Client.js +++ b/packages/client-core/test/Client.js @@ -1,9 +1,8 @@ "use strict"; -const test = require("ava"); const Client = require("../lib/Client"); -test("_findTransport", (t) => { +test("_findTransport", () => { class Transport { socketParameters(uri) { if (uri === "a") { @@ -20,7 +19,7 @@ test("_findTransport", (t) => { const entity = new Client(); entity.transports.push(Transport); - t.is(entity._findTransport("a"), Transport); - t.is(entity._findTransport("b"), undefined); - t.is(entity._findTransport("c"), undefined); + expect(entity._findTransport("a")).toBe(Transport); + expect(entity._findTransport("b")).toBe(undefined); + expect(entity._findTransport("c")).toBe(undefined); }); diff --git a/packages/client/test/getDomain.js b/packages/client/test/getDomain.js index 97079d71e..a3574869f 100644 --- a/packages/client/test/getDomain.js +++ b/packages/client/test/getDomain.js @@ -1,11 +1,10 @@ -import test from "ava"; import getDomain from "../lib/getDomain.js"; -test("getDomain", (t) => { - t.is(getDomain("ws://foo:123/foobar"), "foo"); - t.is(getDomain("ws://123.156.123.5:123/foobar"), "123.156.123.5"); - t.is(getDomain("xmpp://foo:123/foobar"), "foo"); - t.is(getDomain("foo"), "foo"); - t.is(getDomain("foo:123"), "foo"); - t.is(getDomain("foo:123/foobar"), "foo"); +test("getDomain", () => { + expect(getDomain("ws://foo:123/foobar")).toBe("foo"); + expect(getDomain("ws://123.156.123.5:123/foobar")).toBe("123.156.123.5"); + expect(getDomain("xmpp://foo:123/foobar")).toBe("foo"); + expect(getDomain("foo")).toBe("foo"); + expect(getDomain("foo:123")).toBe("foo"); + expect(getDomain("foo:123/foobar")).toBe("foo"); }); diff --git a/packages/component-core/test/send.js b/packages/component-core/test/send.js index f9991fd1c..f36866de2 100644 --- a/packages/component-core/test/send.js +++ b/packages/component-core/test/send.js @@ -1,9 +1,8 @@ "use strict"; -const test = require("ava"); const { Component, xml } = require(".."); -test("from attribute", (t) => { +test("from attribute", () => { const entity = new Component(); entity.jid = "test.foobar"; entity.write = () => Promise.resolve(); @@ -11,13 +10,13 @@ test("from attribute", (t) => { el = xml("el"); entity.send(el); - t.is(el.attrs.from, undefined); + expect(el.attrs.from).toBe(undefined); el = xml("message"); entity.send(el); - t.is(el.attrs.from, "test.foobar"); + expect(el.attrs.from).toBe("test.foobar"); el = xml("el", { from: "bar" }); entity.send(el); - t.is(el.attrs.from, "bar"); + expect(el.attrs.from).toBe("bar"); }); diff --git a/packages/connection-tcp/test/Connection.js b/packages/connection-tcp/test/Connection.js index 790d0f704..ecc0679a9 100644 --- a/packages/connection-tcp/test/Connection.js +++ b/packages/connection-tcp/test/Connection.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const _Connection = require("../../../packages/connection"); const Connection = require(".."); const net = require("net"); @@ -8,54 +7,50 @@ const xml = require("@xmpp/xml"); const NS_STREAM = "http://etherx.jabber.org/streams"; -test("new Connection()", (t) => { +test("new Connection()", () => { const conn = new Connection(); - t.true(conn instanceof _Connection); - t.is(conn.NS, NS_STREAM); + expect(conn instanceof _Connection).toBe(true); + expect(conn.NS).toBe(NS_STREAM); }); -test("Socket", (t) => { +test("Socket", () => { const conn = new Connection(); - t.is(conn.Socket, net.Socket); + expect(conn.Socket).toBe(net.Socket); }); -test("NS", (t) => { - t.is(Connection.prototype.NS, NS_STREAM); +test("NS", () => { + expect(Connection.prototype.NS).toBe(NS_STREAM); }); -test("header()", (t) => { +test("header()", () => { const conn = new Connection(); conn.NS = "foobar"; - t.is( - conn.header(conn.headerElement()), - ``, + expect(conn.header(conn.headerElement())).toBe( + `` ); }); -test("footer()", (t) => { +test("footer()", () => { const conn = new Connection(); - t.is(conn.footer(), ""); + expect(conn.footer()).toBe(""); }); -test("socketParameters()", (t) => { - t.deepEqual(Connection.prototype.socketParameters("xmpp://foo"), { +test("socketParameters()", () => { + expect(Connection.prototype.socketParameters("xmpp://foo")).toEqual({ port: null, host: "foo", }); - t.deepEqual(Connection.prototype.socketParameters("xmpp://foo:1234"), { + expect(Connection.prototype.socketParameters("xmpp://foo:1234")).toEqual({ port: 1234, host: "foo", }); - t.deepEqual( - Connection.prototype.socketParameters("xmpps://foo:1234"), - undefined, - ); + expect(Connection.prototype.socketParameters("xmpps://foo:1234")).toEqual(undefined); }); -test("sendMany", async (t) => { - t.plan(1); +test("sendMany", async () => { + expect.assertions(1); const conn = new Connection(); conn.root = xml("root"); @@ -64,7 +59,7 @@ test("sendMany", async (t) => { conn.socket = { write(str, fn) { - t.is(str, ""); + expect(str).toBe(""); fn(); }, }; diff --git a/packages/connection/test/close.js b/packages/connection/test/close.js index 8d4a9f11d..a9734974a 100644 --- a/packages/connection/test/close.js +++ b/packages/connection/test/close.js @@ -1,23 +1,27 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); -const { EventEmitter, promise, timeout } = require("@xmpp/events"); +const { + EventEmitter, + promise, + timeout, + TimeoutError, +} = require("@xmpp/events"); const xml = require("@xmpp/xml"); -test("resets properties on socket close event", (t) => { +test("resets properties on socket close event", () => { const conn = new Connection(); conn._attachSocket(new EventEmitter()); conn.jid = {}; conn.status = "online"; conn.socket.emit("connect"); conn.socket.emit("close"); - t.is(conn.jid, null); - t.is(conn.status, "disconnect"); + expect(conn.jid).toBe(null); + expect(conn.status).toBe("disconnect"); }); -test.cb("timeout", (t) => { - t.plan(2); +test("timeout", async () => { + expect.assertions(2); const conn = new Connection(); conn.parser = new EventEmitter(); conn.footerElement = () => { @@ -30,16 +34,13 @@ test.cb("timeout", (t) => { }; conn.on("output", (el) => { - t.is(el, ""); - }); - conn.close().catch((err) => { - t.is(err.name, "TimeoutError"); - t.end(); + expect(el).toBe(""); }); + + await expect(conn.close()).rejects.toThrow(new TimeoutError()); }); -test.cb("error on status closing", (t) => { - t.plan(2); +test("error on status closing", async () => { const conn = new Connection(); conn.parser = new EventEmitter(); conn.footerElement = () => { @@ -52,16 +53,16 @@ test.cb("error on status closing", (t) => { }; conn.status = "closing"; - conn.close().catch((err) => { - t.is(err.name, "Error"); - t.is(err.message, "Connection is closing"); - t.end(); - }); + conn.parser.emit("end"); + + await expect(conn.close()).rejects.toThrow( + new Error("Connection is closing"), + ); }); -test("resolves", async (t) => { - t.plan(2); +test("resolves", async () => { + expect.assertions(2); const conn = new Connection(); conn.parser = new EventEmitter(); conn.footerElement = () => { @@ -74,7 +75,7 @@ test("resolves", async (t) => { }; conn.on("output", (el) => { - t.is(el, ""); + expect(el).toBe(""); }); const promiseClose = conn.close(); @@ -82,10 +83,10 @@ test("resolves", async (t) => { const el = await promiseClose; - t.is(el.toString(), ``); + expect(el.toString()).toBe(``); }); -test("emits closing status", (t) => { +test("emits closing status", () => { const conn = new Connection(); conn.parser = new EventEmitter(); conn.footerElement = () => { @@ -98,7 +99,7 @@ test("emits closing status", (t) => { }; const p = Promise.all([ - promise(conn, "status").then((status) => t.is(status, "closing")), + promise(conn, "status").then((status) => expect(status).toBe("closing")), conn.close(), ]); @@ -106,8 +107,8 @@ test("emits closing status", (t) => { return p; }); -test("do not emit closing status if parser property is missing", (t) => { - t.plan(2); +test("do not emit closing status if parser property is missing", async () => { + expect.assertions(2); const conn = new Connection(); conn.parser = null; conn.footerElement = () => { @@ -119,10 +120,10 @@ test("do not emit closing status if parser property is missing", (t) => { return cb(); }; - return Promise.all([ - timeout(promise(conn, "status"), 500).catch((err) => - t.is(err.name, "TimeoutError"), + await Promise.all([ + expect(timeout(promise(conn, "status"), 500)).rejects.toThrow( + new TimeoutError(), ), - conn.close().catch((err) => t.pass(err)), + expect(conn.close()).rejects.toThrow(), ]); }); diff --git a/packages/connection/test/connect.js b/packages/connection/test/connect.js index 2fb2451a6..5eff449d7 100644 --- a/packages/connection/test/connect.js +++ b/packages/connection/test/connect.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const { EventEmitter, promise } = require("@xmpp/events"); @@ -13,7 +12,7 @@ function socket(fn) { }; } -test('emits "connecting" status', (t) => { +test('emits "connecting" status', () => { const conn = new Connection(); // eslint-disable-next-line func-names conn.Socket = socket(function () { @@ -22,12 +21,14 @@ test('emits "connecting" status', (t) => { return Promise.all([ promise(conn, "connecting"), - promise(conn, "status").then((status) => t.is(status, "connecting")), + promise(conn, "status").then((status) => expect(status).toBe("connecting")), conn.connect("url"), ]); }); -test("rejects if an error is emitted before connected", async (t) => { +test("rejects if an error is emitted before connected", async () => { + expect.assertions(2); + const conn = new Connection(); const error = {}; @@ -35,21 +36,24 @@ test("rejects if an error is emitted before connected", async (t) => { conn.Socket = socket(function () { this.emit("error", error); }); - conn.on("error", (err) => t.is(err, error)); + conn.on("error", (err) => { + expect(err).toBe(error); + }); try { await conn.connect("url"); + expect.fail(); } catch (err) { - t.is(err, error); + expect(err).toBe(error); } }); -test("resolves if socket connects", async (t) => { +test("resolves if socket connects", async () => { const conn = new Connection(); // eslint-disable-next-line func-names conn.Socket = socket(function () { this.emit("connect"); }); await conn.connect("url"); - t.pass(); + expect().pass(); }); diff --git a/packages/connection/test/disconnect.js b/packages/connection/test/disconnect.js index 35b3c7353..0052af292 100644 --- a/packages/connection/test/disconnect.js +++ b/packages/connection/test/disconnect.js @@ -1,42 +1,39 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const { EventEmitter } = require("@xmpp/events"); -test.cb("rejects with TimeoutError if socket doesn't close", (t) => { - t.plan(2); +test("rejects with TimeoutError if socket doesn't close", (done) => { + expect.assertions(2); const conn = new Connection(); conn.socket = new EventEmitter(); conn.socket.end = () => {}; conn.disconnect().catch((err) => { - t.is(err.name, "TimeoutError"); - t.end(); + expect(err.name).toBe("TimeoutError"); + done(); }); - t.is(conn.status, "disconnecting"); + expect(conn.status).toBe("disconnecting"); }); -test.cb("resolves", (t) => { - t.plan(3); +test("resolves", (done) => { + expect.assertions(3); const conn = new Connection(); const sock = new EventEmitter(); conn._attachSocket(sock); sock.emit("connect"); sock.end = () => {}; - conn - .disconnect() - .then(() => { - t.is(conn.status, "disconnect"); - return t.end(); - }) - .catch(t.fail); - t.is(conn.status, "disconnecting"); + // eslint-disable-next-line promise/catch-or-return + conn.disconnect().then(() => { + expect(conn.status).toBe("disconnect"); + return done(); + }); + expect(conn.status).toBe("disconnecting"); sock.emit("close"); - t.is(conn.status, "disconnect"); + expect(conn.status).toBe("disconnect"); }); -test.cb("rejects if socket.end throws", (t) => { - t.plan(1); +test("rejects if socket.end throws", (done) => { + expect.assertions(1); const error = new Error("foobar"); @@ -47,7 +44,7 @@ test.cb("rejects if socket.end throws", (t) => { }; conn.disconnect().catch((err) => { - t.is(err, error); - t.end(); + expect(err).toBe(error); + done(); }); }); diff --git a/packages/connection/test/end.js b/packages/connection/test/end.js index 22f68fa3b..972bdf654 100644 --- a/packages/connection/test/end.js +++ b/packages/connection/test/end.js @@ -1,68 +1,63 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); -test("#_end", (t) => { - t.plan(2); +test("#_end", async () => { const conn = new Connection(); - conn.close = () => { - t.pass(); - return Promise.resolve(); - }; - conn.disconnect = () => { - t.pass(); - return Promise.resolve(); - }; + const spy_close = jest.spyOn(conn, "close"); + const spy_disconnect = jest.spyOn(conn, "disconnect"); - return conn._end(); + await conn._end(); + + expect(spy_close).toHaveBeenCalledTimes(1); + expect(spy_disconnect).toHaveBeenCalledTimes(1); }); -test("#_end with close rejection", (t) => { - t.plan(2); +test("#_end with close rejection", async () => { const conn = new Connection(); - conn.close = () => { - t.pass(); + + const spy_close = jest.spyOn(conn, "close").mockImplementation(() => { return Promise.reject(); - }; + }); + const spy_disconnect = jest.spyOn(conn, "disconnect"); - conn.disconnect = () => { - t.pass(); - return Promise.resolve(); - }; + await conn._end(); - return conn._end(); + expect(spy_close).toHaveBeenCalledTimes(1); + expect(spy_disconnect).toHaveBeenCalledTimes(1); }); -test("#_end with disconnect rejection", (t) => { - t.plan(2); +test("#_end with disconnect rejection", async () => { const conn = new Connection(); - conn.close = () => { - t.pass(); - return Promise.resolve(); - }; - conn.disconnect = () => { - t.pass(); - return Promise.reject(); - }; + const spy_close = jest.spyOn(conn, "close"); + const spy_disconnect = jest + .spyOn(conn, "disconnect") + .mockImplementation(() => { + return Promise.reject(); + }); - return conn._end(); + await conn._end(); + + expect(spy_close).toHaveBeenCalledTimes(1); + expect(spy_disconnect).toHaveBeenCalledTimes(1); }); -test("#_end with close and disconnect rejection", (t) => { - t.plan(2); +test("#_end with close and disconnect rejection", async () => { const conn = new Connection(); - conn.close = () => { - t.pass(); - return Promise.reject(); - }; - conn.disconnect = () => { - t.pass(); + const spy_close = jest.spyOn(conn, "close").mockImplementation(() => { return Promise.reject(); - }; + }); + const spy_disconnect = jest + .spyOn(conn, "disconnect") + .mockImplementation(() => { + return Promise.reject(); + }); + + await conn._end(); - return conn._end(); + expect(spy_close).toHaveBeenCalledTimes(1); + expect(spy_disconnect).toHaveBeenCalledTimes(1); }); diff --git a/packages/connection/test/error.js b/packages/connection/test/error.js index d1a4557af..4359c2711 100644 --- a/packages/connection/test/error.js +++ b/packages/connection/test/error.js @@ -1,15 +1,14 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const { EventEmitter } = require("@xmpp/events"); -test("emit error on socket error", (t) => { +test("emit error on socket error", () => { const conn = new Connection(); conn._attachSocket(new EventEmitter()); const error = new Error("foobar"); conn.on("error", (err) => { - t.is(err, error); + expect(err).toBe(error); }); conn.socket.emit("error", error); }); diff --git a/packages/connection/test/onData.js b/packages/connection/test/onData.js index 672b00262..d73c4c518 100644 --- a/packages/connection/test/onData.js +++ b/packages/connection/test/onData.js @@ -1,20 +1,19 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); -test("#_onData", (t) => { - t.plan(2); +test("#_onData", () => { + expect.assertions(2); const foo = ""; const conn = new Connection(); conn.parser = { write(str) { - t.is(str, foo); + expect(str).toBe(foo); }, }; conn.on("input", (data) => { - t.is(data, foo); + expect(data).toBe(foo); }); conn._onData(foo); }); diff --git a/packages/connection/test/onElement.js b/packages/connection/test/onElement.js index 5f5c80e09..46bcdfa55 100644 --- a/packages/connection/test/onElement.js +++ b/packages/connection/test/onElement.js @@ -1,25 +1,24 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const xml = require("@xmpp/xml"); -test.cb("#_onElement", (t) => { - t.plan(2); +test("#_onElement", done => { + expect.assertions(2); const foo = ; const conn = new Connection(); conn.on("element", (el) => { - t.is(el, foo); + expect(el).toBe(foo); }); conn.on("nonza", (el) => { - t.is(el, foo); - t.end(); + expect(el).toBe(foo); + done(); }); conn._onElement(foo); }); -test.cb("#_onElement stream:error", (t) => { - t.plan(7); +test("#_onElement stream:error", done => { + expect.assertions(7); // prettier-ignore const application = xml('application') @@ -31,22 +30,22 @@ test.cb("#_onElement stream:error", (t) => { ]); const conn = new Connection(); conn._end = () => { - t.end(); + done(); return Promise.resolve(); }; conn.on("element", (el) => { - t.is(el, foo); + expect(el).toBe(foo); }); conn.on("nonza", (el) => { - t.is(el, foo); + expect(el).toBe(foo); }); conn.on("error", (error) => { - t.is(error.name, "StreamError"); - t.is(error.condition, "foo-bar"); - t.is(error.message, "foo-bar - hello"); - t.is(error.application, application); - t.is(error.element, foo); + expect(error.name).toBe("StreamError"); + expect(error.condition).toBe("foo-bar"); + expect(error.message).toBe("foo-bar - hello"); + expect(error.application).toBe(application); + expect(error.element).toBe(foo); }); conn._onElement(foo); }); diff --git a/packages/connection/test/parserError.js b/packages/connection/test/parserError.js index 4c66e3a12..2e9520983 100644 --- a/packages/connection/test/parserError.js +++ b/packages/connection/test/parserError.js @@ -1,27 +1,28 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const { EventEmitter } = require("@xmpp/events"); -test("calls _detachParser, sends a bad-format stream error and emit an error", (t) => { - t.plan(3); +test("calls _detachParser, sends a bad-format stream error and emit an error", async () => { + expect.assertions(4); + const conn = new Connection(); const parser = new EventEmitter(); conn._attachParser(parser); - const error = {}; - conn._detachParser = () => { - t.pass(); - }; + const spy_detachParser = jest.spyOn(conn, "_detachParser"); + const spy_streamError = jest.spyOn(conn, "_streamError"); - conn._streamError = (condition) => { - t.is(condition, "bad-format"); - }; + const error = new Error("foo"); conn.on("error", (err) => { - t.is(err, error); + expect(err).toBe(error); }); parser.emit("error", error); + + expect(spy_streamError).toHaveBeenCalledWith("bad-format"); + expect(spy_streamError).toHaveBeenCalledTimes(1); + + expect(spy_detachParser).toHaveBeenCalledTimes(1); }); diff --git a/packages/connection/test/send.js b/packages/connection/test/send.js index d5052dc17..3bb106b4f 100644 --- a/packages/connection/test/send.js +++ b/packages/connection/test/send.js @@ -1,11 +1,10 @@ "use strict"; const xml = require("@xmpp/xml"); -const test = require("ava"); const Connection = require(".."); -test("send", (t) => { - t.plan(3); +test("send", () => { + expect.assertions(3); const conn = new Connection(); conn.root = xml("root"); @@ -13,17 +12,17 @@ test("send", (t) => { conn.socket = { write(str) { - t.is(str, ""); + expect(str).toBe(""); }, }; - t.is(foo.attrs.parent, undefined); + expect(foo.attrs.parent).toBe(undefined); conn.send(foo); - t.is(foo.parent, conn.root); + expect(foo.parent).toBe(conn.root); conn.on("send", (element) => { - t.is(element, foo); + expect(element).toBe(foo); }); }); diff --git a/packages/connection/test/socketClose.js b/packages/connection/test/socketClose.js index 30abd2711..72f45d42c 100644 --- a/packages/connection/test/socketClose.js +++ b/packages/connection/test/socketClose.js @@ -1,24 +1,23 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const { EventEmitter } = require("@xmpp/events"); -test("calls _reset and _status", (t) => { - t.plan(3); +test("calls _reset and _status", () => { + expect.assertions(3); const conn = new Connection(); const sock = new EventEmitter(); conn._attachSocket(sock); const evt = {}; conn._status = (status, { clean, event }) => { - t.is(clean, false); - t.is(event, evt); + expect(clean).toBe(false); + expect(event).toBe(evt); }; - conn._reset = () => { - t.pass(); - }; + const spy_reset = jest.spyOn(conn, "_reset"); sock.emit("close", true, evt); + + expect(spy_reset).toHaveBeenCalled(); }); diff --git a/packages/connection/test/start.js b/packages/connection/test/start.js index b2ae260c4..173934fe0 100644 --- a/packages/connection/test/start.js +++ b/packages/connection/test/start.js @@ -1,13 +1,12 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); -test("rejects if connection is not offline", (t) => { +test("rejects if connection is not offline", () => { const conn = new Connection(); conn.status = "online"; return conn.start().catch((err) => { - t.true(err instanceof Error); - t.is(err.message, "Connection is not offline"); + expect(err instanceof Error).toBe(true); + expect(err.message).toBe("Connection is not offline"); }); }); diff --git a/packages/connection/test/stop.js b/packages/connection/test/stop.js index 48dea80f2..e4990b968 100644 --- a/packages/connection/test/stop.js +++ b/packages/connection/test/stop.js @@ -1,42 +1,42 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); -test("resolves if socket property is undefined", async (t) => { +test("resolves if socket property is undefined", async () => { const conn = new Connection(); conn.footerElement = () => ; conn.socket = undefined; await conn.stop(); - t.pass(); + expect().pass(); }); -test("resolves if close rejects", async (t) => { +test("resolves if close rejects", async () => { const conn = new Connection(); conn.close = () => Promise.reject(); conn.disconnect = () => Promise.resolve(); await conn.stop(); - t.pass(); + expect().pass(); }); -test("resolves if disconnect rejects", async (t) => { +test("resolves if disconnect rejects", async () => { const conn = new Connection(); conn.disconnect = () => Promise.reject(); conn.close = () => Promise.resolve(); await conn.stop(); - t.pass(); + expect().pass(); }); -test("resolves with the result of close", async (t) => { +test("resolves with the result of close", async () => { const conn = new Connection(); conn.socket = {}; const el = {}; conn.close = () => Promise.resolve(el); conn.disconnect = () => Promise.resolve(); - t.is(await conn.stop(), el); + expect(await conn.stop()).toBe(el); }); -test("does not throw if connection is not established", async (t) => { +test("does not throw if connection is not established", async () => { const conn = new Connection(); - await t.notThrowsAsync(conn.stop()); + await conn.stop(); + expect().pass(); }); diff --git a/packages/connection/test/streamError.js b/packages/connection/test/streamError.js index 0f41c75b3..b88c0b4eb 100644 --- a/packages/connection/test/streamError.js +++ b/packages/connection/test/streamError.js @@ -1,27 +1,21 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const xml = require("@xmpp/xml"); -test("#_streamError", (t) => { - t.plan(2); +test("#_streamError", async () => { const conn = new Connection(); - conn.send = (el) => { - t.deepEqual( - el, - // prettier-ignore - xml('stream:error', {}, [ - xml('foo-bar', {xmlns: 'urn:ietf:params:xml:ns:xmpp-streams'}), - ]), - ); - return Promise.resolve(); - }; - conn._end = () => { - t.pass(); - return Promise.resolve(); - }; + const spy_end = jest.spyOn(conn, "_end"); + const spy_send = jest.spyOn(conn, "send"); - return conn._streamError("foo-bar"); + await conn._streamError("foo-bar"); + + expect(spy_end).toHaveBeenCalled(); + + expect(spy_send).toHaveBeenCalledWith( + xml("stream:error", {}, [ + xml("foo-bar", { xmlns: "urn:ietf:params:xml:ns:xmpp-streams" }), + ]), + ); }); diff --git a/packages/connection/test/test.js b/packages/connection/test/test.js index e80ede4c0..35f9fac3d 100644 --- a/packages/connection/test/test.js +++ b/packages/connection/test/test.js @@ -1,33 +1,32 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const { EventEmitter } = require("@xmpp/events"); const xml = require("@xmpp/xml"); -test("new Connection()", (t) => { +test("new Connection()", () => { const conn = new Connection(); - t.is(conn.jid, null); - t.is(conn.timeout, 2000); - t.true(conn instanceof EventEmitter); + expect(conn.jid).toBe(null); + expect(conn.timeout).toBe(2000); + expect(conn instanceof EventEmitter).toBe(true); }); -test("isStanza()", (t) => { +test("isStanza()", () => { const conn = new Connection(); - t.is(conn.isStanza(xml("foo")), false); + expect(conn.isStanza(xml("foo"))).toBe(false); - t.is(conn.isStanza(xml("presence")), true); - t.is(conn.isStanza(xml("iq")), true); - t.is(conn.isStanza(xml("message")), true); + expect(conn.isStanza(xml("presence"))).toBe(true); + expect(conn.isStanza(xml("iq"))).toBe(true); + expect(conn.isStanza(xml("message"))).toBe(true); }); -test("isNonza()", (t) => { +test("isNonza()", () => { const conn = new Connection(); - t.is(conn.isNonza(xml("foo")), true); + expect(conn.isNonza(xml("foo"))).toBe(true); - t.is(conn.isNonza(xml("presence")), false); - t.is(conn.isNonza(xml("iq")), false); - t.is(conn.isNonza(xml("message")), false); + expect(conn.isNonza(xml("presence"))).toBe(false); + expect(conn.isNonza(xml("iq"))).toBe(false); + expect(conn.isNonza(xml("message"))).toBe(false); }); diff --git a/packages/debug/test.js b/packages/debug/test.js index fc15f764c..342fc312c 100644 --- a/packages/debug/test.js +++ b/packages/debug/test.js @@ -1,49 +1,33 @@ "use strict"; -const test = require("ava"); const { hideSensitive } = require("."); -test("SASL", (t) => { - t.deepEqual( - hideSensitive(foo), - - - , - ); +test("SASL", () => { + expect(hideSensitive(foo)).toEqual( + + ); - t.deepEqual( - hideSensitive( - foo, - ), - - - , - ); + expect(hideSensitive( + foo, + )).toEqual( + + ); - t.deepEqual( - hideSensitive( - foo, - ), - - - , - ); + expect(hideSensitive( + foo, + )).toEqual( + + ); - t.deepEqual( - hideSensitive( - foo, - ), - - - , - ); + expect(hideSensitive( + foo, + )).toEqual( + + ); }); -test("component handshake", (t) => { - t.deepEqual( - hideSensitive(foo), - - - , - ); +test("component handshake", () => { + expect(hideSensitive(foo)).toEqual( + + ); }); diff --git a/packages/error/test.js b/packages/error/test.js index 1152dc8f6..2aa0cb9ac 100644 --- a/packages/error/test.js +++ b/packages/error/test.js @@ -1,11 +1,10 @@ "use strict"; -const test = require("ava"); const XMPPError = require("."); // eslint-disable-next-line n/no-extraneous-require const parse = require("@xmpp/xml/lib/parse.js"); -test("fromElement", (t) => { +test("fromElement", () => { const application_element = ( ); @@ -22,14 +21,14 @@ test("fromElement", (t) => { const error = XMPPError.fromElement(nonza); - t.is(error instanceof Error, true); - t.is(error.name, "XMPPError"); - t.is(error.condition, "some-condition"); - t.is(error.text, "foo"); - t.is(error.application, application_element); + expect(error instanceof Error).toBe(true); + expect(error.name).toBe("XMPPError"); + expect(error.condition).toBe("some-condition"); + expect(error.text).toBe("foo"); + expect(error.application).toBe(application_element); }); -test("fromElement - whitespaces", (t) => { +test("fromElement - whitespaces", () => { const nonza = parse( ` @@ -44,12 +43,9 @@ test("fromElement - whitespaces", (t) => { const error = XMPPError.fromElement(nonza); - t.is(error instanceof Error, true); - t.is(error.name, "XMPPError"); - t.is(error.condition, "some-condition"); - t.is(error.text, "\n foo\n "); - t.is( - error.application.toString(), - ``, - ); + expect(error instanceof Error).toBe(true); + expect(error.name).toBe("XMPPError"); + expect(error.condition).toBe("some-condition"); + expect(error.text).toBe("\n foo\n "); + expect(error.application.toString()).toBe(``); }); diff --git a/packages/events/test/promise.test.js b/packages/events/test/promise.test.js index 736767673..50fe712f9 100644 --- a/packages/events/test/promise.test.js +++ b/packages/events/test/promise.test.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const { promise } = require(".."); const EventEmitter = require("events"); @@ -17,39 +16,39 @@ class Socket extends EventEmitter { } } -test('resolves if "event" is emitted', async (t) => { +test('resolves if "event" is emitted', async () => { const value = {}; // eslint-disable-next-line func-names const socket = new Socket(function () { this.emit("connect", value); }); - t.is(socket.listenerCount("error"), 0); - t.is(socket.listenerCount("connect"), 0); + expect(socket.listenerCount("error")).toBe(0); + expect(socket.listenerCount("connect")).toBe(0); socket.connect(); const p = promise(socket, "connect"); - t.is(socket.listenerCount("error"), 1); - t.is(socket.listenerCount("connect"), 1); + expect(socket.listenerCount("error")).toBe(1); + expect(socket.listenerCount("connect")).toBe(1); const result = await p; - t.is(result, value); - t.is(socket.listenerCount("error"), 0); - t.is(socket.listenerCount("connect"), 0); + expect(result).toBe(value); + expect(socket.listenerCount("error")).toBe(0); + expect(socket.listenerCount("connect")).toBe(0); }); -test('rejects if "errorEvent" is emitted', (t) => { +test('rejects if "errorEvent" is emitted', () => { const error = new Error("foobar"); // eslint-disable-next-line func-names const socket = new Socket(function () { this.emit("error", error); }); - t.is(socket.listenerCount("error"), 0); - t.is(socket.listenerCount("connect"), 0); + expect(socket.listenerCount("error")).toBe(0); + expect(socket.listenerCount("connect")).toBe(0); socket.connect(); const p = promise(socket, "connect", "error"); - t.is(socket.listenerCount("error"), 1); - t.is(socket.listenerCount("connect"), 1); + expect(socket.listenerCount("error")).toBe(1); + expect(socket.listenerCount("connect")).toBe(1); return p.catch((err) => { - t.is(err, error); - t.is(socket.listenerCount("error"), 0); - t.is(socket.listenerCount("connect"), 0); + expect(err).toBe(error); + expect(socket.listenerCount("error")).toBe(0); + expect(socket.listenerCount("connect")).toBe(0); }); }); diff --git a/packages/id/test.js b/packages/id/test.js index a735b1002..de4cfe1e1 100644 --- a/packages/id/test.js +++ b/packages/id/test.js @@ -1,16 +1,15 @@ "use strict"; -const test = require("ava"); const xid = require("."); -test("returns a non empty string", (t) => { - t.is(typeof xid(), "string"); - t.is(xid().length > 0, true); +test("returns a non empty string", () => { + expect(typeof xid()).toBe("string"); + expect(xid().length > 0).toBe(true); }); -test("dupliacates", (t) => { +test("duplicates", () => { const id = xid(); - for (let i = 0; i < 1000000; i++) { - t.not(id, xid()); + for (let i = 0; i < 100000; i++) { + expect(id).not.toBe(xid()); } }); diff --git a/packages/iq/callee.test.js b/packages/iq/test/callee.js similarity index 60% rename from packages/iq/callee.test.js rename to packages/iq/test/callee.js index e61ec805d..eb285e4fa 100644 --- a/packages/iq/callee.test.js +++ b/packages/iq/test/callee.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const { mockClient, promiseSend, @@ -8,7 +7,7 @@ const { promiseError, } = require("@xmpp/test"); -test("empty result when the handler returns true", async (t) => { +test("empty result when the handler returns true", async () => { const xmpp = mockClient(); const { iqCallee } = xmpp; @@ -21,10 +20,10 @@ test("empty result when the handler returns true", async (t) => { , ); - t.deepEqual(await promiseSend(xmpp), ); + expect(await promiseSend(xmpp)).toEqual(); }); -test("iqs with text children are valid", async (t) => { +test("iqs with text children are valid", async () => { const xmpp = mockClient(); const { iqCallee } = xmpp; @@ -39,10 +38,10 @@ test("iqs with text children are valid", async (t) => { , ); - t.deepEqual(await promiseSend(xmpp), ); + expect(await promiseSend(xmpp)).toEqual(); }); -test("iqs with multiple element children are invalid", async (t) => { +test("iqs with multiple element children are invalid", async () => { const xmpp = mockClient(); const { iqCallee } = xmpp; @@ -56,18 +55,15 @@ test("iqs with multiple element children are invalid", async (t) => { , ); - t.deepEqual( - await promiseSend(xmpp), - - - - - - , - ); + expect(await promiseSend(xmpp)).toEqual( + + + + + ); }); -test("non empty result when the handler returns an xml.Element", async (t) => { +test("non empty result when the handler returns an xml.Element", async () => { const xmpp = mockClient(); const { iqCallee } = xmpp; @@ -82,15 +78,12 @@ test("non empty result when the handler returns an xml.Element", async (t) => { , ); - t.deepEqual( - await promiseSend(xmpp), - - - , - ); + expect(await promiseSend(xmpp)).toEqual( + + ); }); -test("service unavailable error reply when there are no handler", async (t) => { +test("service unavailable error reply when there are no handler", async () => { const xmpp = mockClient(); xmpp.mockInput( @@ -99,18 +92,15 @@ test("service unavailable error reply when there are no handler", async (t) => { , ); - t.deepEqual( - await promiseSend(xmpp), - - - - - - , - ); + expect(await promiseSend(xmpp)).toEqual( + + + + + ); }); -test("internal server error reply when handler throws an error", async (t) => { +test("internal server error reply when handler throws an error", async () => { const xmpp = mockClient(); const { iqCallee } = xmpp; @@ -129,19 +119,16 @@ test("internal server error reply when handler throws an error", async (t) => { , ); - t.is(await errorPromise, error); - t.deepEqual( - await outputPromise, - - - - - - , - ); + expect(await errorPromise).toBe(error); + expect(await outputPromise).toEqual( + + + + + ); }); -test("internal server error reply when handler rejects with an error", async (t) => { +test("internal server error reply when handler rejects with an error", async () => { const xmpp = mockClient(); const { iqCallee } = xmpp; @@ -160,19 +147,16 @@ test("internal server error reply when handler rejects with an error", async (t) , ); - t.is(await errorPromise, error); - t.deepEqual( - await outputPromise, - - - - - - , - ); + expect(await errorPromise).toBe(error); + expect(await outputPromise).toEqual( + + + + + ); }); -test("stanza error reply when handler returns an error element", async (t) => { +test("stanza error reply when handler returns an error element", async () => { const xmpp = mockClient(); const { iqCallee } = xmpp; @@ -195,11 +179,8 @@ test("stanza error reply when handler returns an error element", async (t) => { , ); - t.deepEqual( - await outputPromise, - - - {errorElement} - , - ); + expect(await outputPromise).toEqual( + + {errorElement} + ); }); diff --git a/packages/iq/caller.test.js b/packages/iq/test/caller.js similarity index 73% rename from packages/iq/caller.test.js rename to packages/iq/test/caller.js index 8e61e48d9..03a3e5447 100644 --- a/packages/iq/caller.test.js +++ b/packages/iq/test/caller.js @@ -1,21 +1,19 @@ "use strict"; -const test = require("ava"); const { mockClient, mockInput } = require("@xmpp/test"); const StanzaError = require("@xmpp/middleware/lib/StanzaError"); -test.cb("#request", (t) => { +test("#request", (done) => { const xmpp = mockClient(); const { iqCaller } = xmpp; xmpp.send = (el) => { - t.deepEqual( - el, + expect(el).toEqual( , ); - t.end(); + done(); return Promise.resolve(); }; @@ -26,7 +24,7 @@ test.cb("#request", (t) => { ); }); -test("removes the handler if sending failed", async (t) => { +test("removes the handler if sending failed", async () => { const xmpp = mockClient(); const { iqCaller } = xmpp; @@ -42,17 +40,17 @@ test("removes the handler if sending failed", async (t) => { , ); - t.is(iqCaller.handlers.size, 1); + expect(iqCaller.handlers.size).toBe(1); try { await promise; } catch (err) { - t.is(err, error); - t.is(iqCaller.handlers.size, 0); + expect(err).toBe(error); + expect(iqCaller.handlers.size).toBe(0); } }); -test("resolves with with the stanza for result reply", async (t) => { +test("resolves with with the stanza for result reply", async () => { const xmpp = mockClient(); const { iqCaller } = xmpp; @@ -63,10 +61,11 @@ test("resolves with with the stanza for result reply", async (t) => { const reply = ; mockInput(xmpp, reply); - t.deepEqual(await promiseRequest, reply); + expect(await promiseRequest).toEqual(reply); }); -test("rejects with a StanzaError for error reply", async (t) => { +test("rejects with a StanzaError for error reply", async () => { + expect.assertions(1); const xmpp = mockClient(); const { iqCaller } = xmpp; @@ -86,11 +85,14 @@ test("rejects with a StanzaError for error reply", async (t) => { ); mockInput(xmpp, stanzaElement); - const err = await t.throwsAsync(promiseRequest); - t.deepEqual(err, StanzaError.fromElement(errorElement)); + try { + await promiseRequest; + } catch (err) { + expect(err).toEqual(StanzaError.fromElement(errorElement)); + } }); -test("rejects with a TimeoutError if no answer is received within timeout", async (t) => { +test("rejects with a TimeoutError if no answer is received within timeout", async () => { const xmpp = mockClient(); const { iqCaller } = xmpp; @@ -101,17 +103,17 @@ test("rejects with a TimeoutError if no answer is received within timeout", asyn 1, ); - t.is(iqCaller.handlers.size, 1); + expect(iqCaller.handlers.size).toBe(1); try { await promise; } catch (err) { - t.is(err.name, "TimeoutError"); - t.is(iqCaller.handlers.size, 0); + expect(err.name).toBe("TimeoutError"); + expect(iqCaller.handlers.size).toBe(0); } }); -test("#get", async (t) => { +test("#get", async () => { const xmpp = mockClient(); const { iqCaller } = xmpp; @@ -127,10 +129,10 @@ test("#get", async (t) => { ); mockInput(xmpp, reply); - t.deepEqual(await promiseGet, replyChild); + expect(await promiseGet).toEqual(replyChild); }); -test("#set", async (t) => { +test("#set", async () => { const xmpp = mockClient(); const { iqCaller } = xmpp; @@ -146,5 +148,5 @@ test("#set", async (t) => { ); mockInput(xmpp, reply); - t.deepEqual(await promiseSet, replyChild); + expect(await promiseSet).toEqual(replyChild); }); diff --git a/packages/jid/test/JID.js b/packages/jid/test/JID.js index 24fb03e14..5e4234d76 100644 --- a/packages/jid/test/JID.js +++ b/packages/jid/test/JID.js @@ -1,14 +1,17 @@ "use strict"; -const test = require("ava"); const JID = require("../lib/JID"); -test("throws TypeError for invalid domain", (t) => { - t.throws(() => new JID("foo"), { instanceOf: TypeError }); +test("throws TypeError for invalid domain", () => { + expect(() => new JID("foo")).toThrow(new TypeError("Invalid domain.")); - t.throws(() => new JID(), { instanceOf: TypeError }); + expect(() => new JID()).toThrow(new TypeError("Invalid domain.")); - t.throws(() => new JID("foo", "", "r"), { instanceOf: TypeError }); + expect(() => new JID("foo", "", "r")).toThrow( + new TypeError("Invalid domain."), + ); - t.throws(() => new JID("foo", "", "r"), { instanceOf: TypeError }); + expect(() => new JID("foo", "", "r")).toThrow( + new TypeError("Invalid domain."), + ); }); diff --git a/packages/jid/test/equality.js b/packages/jid/test/equality.js index ef3a59c5f..1e12ef0a7 100644 --- a/packages/jid/test/equality.js +++ b/packages/jid/test/equality.js @@ -1,46 +1,45 @@ "use strict"; -const test = require("ava"); const jid = require(".."); -test("should parsed JIDs should be equal", (t) => { +test("should parsed JIDs should be equal", () => { const j1 = jid("foo@bar/baz"); const j2 = jid("foo@bar/baz"); - t.is(j1.equals(j2), true); + expect(j1.equals(j2)).toBe(true); }); -test("should parsed JIDs should be not equal", (t) => { +test("should parsed JIDs should be not equal", () => { const j1 = jid("foo@bar/baz"); const j2 = jid("quux@bar/baz"); - t.is(j1.equals(j2), false); + expect(j1.equals(j2)).toBe(false); }); -test("should ignore case in user", (t) => { +test("should ignore case in user", () => { const j1 = jid("foo@bar/baz"); const j2 = jid("FOO@bar/baz"); - t.is(j1.equals(j2), true); + expect(j1.equals(j2)).toBe(true); }); -test("should ignore case in domain", (t) => { +test("should ignore case in domain", () => { const j1 = jid("foo@bar/baz"); const j2 = jid("foo@BAR/baz"); - t.is(j1.equals(j2), true); + expect(j1.equals(j2)).toBe(true); }); -test("should not ignore case in resource", (t) => { +test("should not ignore case in resource", () => { const j1 = jid("foo@bar/baz"); const j2 = jid("foo@bar/Baz"); - t.is(j1.equals(j2), false); + expect(j1.equals(j2)).toBe(false); }); -test("should ignore international caseness", (t) => { +test("should ignore international caseness", () => { const j1 = jid("föö@bär/baß"); const j2 = jid("fÖö@BÄR/baß"); - t.is(j1.equals(j2), true); + expect(j1.equals(j2)).toBe(true); }); -test("should work with bare JIDs", (t) => { +test("should work with bare JIDs", () => { const j1 = jid("romeo@example.net/9519407536580081"); const j2 = jid("romeo@example.net"); - t.is(j1.bare().equals(j2), true); + expect(j1.bare().equals(j2)).toBe(true); }); diff --git a/packages/jid/test/escapeLocal.js b/packages/jid/test/escapeLocal.js index fae6a0196..e87a4d7b8 100644 --- a/packages/jid/test/escapeLocal.js +++ b/packages/jid/test/escapeLocal.js @@ -1,18 +1,17 @@ "use strict"; -const test = require("ava"); const jid = require(".."); -test("Should not change string - issue 43", (t) => { +test("Should not change string - issue 43", () => { const test = "test\u001A@example.com"; const addr = jid(test); - t.is(addr.local, "test\u001A"); + expect(addr.local).toBe("test\u001A"); }); -test("Should escape - issue 43", (t) => { +test("Should escape - issue 43", () => { const test = "test\u001Aa@example.com"; const addr = jid(test); - t.is(addr.local, "testa"); + expect(addr.local).toBe("testa"); }); diff --git a/packages/jid/test/escaping.js b/packages/jid/test/escaping.js index ac6587fc3..5bc83e954 100644 --- a/packages/jid/test/escaping.js +++ b/packages/jid/test/escaping.js @@ -1,136 +1,135 @@ "use strict"; -const test = require("ava"); const JID = require("../lib/JID"); -test("escape `space cadet@example.com`", (t) => { +test("escape `space cadet@example.com`", () => { const esc = new JID("space cadet", "example.com"); - t.is(esc.toString(), String.raw`space\20cadet@example.com`); - t.is(esc.toString(true), "space cadet@example.com"); + expect(esc.toString()).toBe(String.raw`space\20cadet@example.com`); + expect(esc.toString(true)).toBe("space cadet@example.com"); }); -test('escape `call me "ishmael"@example.com`', (t) => { +test('escape `call me "ishmael"@example.com`', () => { const esc = new JID('call me "ishmael"', "example.com"); - t.is(esc.toString(), String.raw`call\20me\20\22ishmael\22@example.com`); - t.is(esc.toString(true), 'call me "ishmael"@example.com'); + expect(esc.toString()).toBe(String.raw`call\20me\20\22ishmael\22@example.com`); + expect(esc.toString(true)).toBe('call me "ishmael"@example.com'); }); -test("escape `at&t guy@example.com`", (t) => { +test("escape `at&t guy@example.com`", () => { const esc = new JID("at&t guy", "example.com"); - t.is(esc.toString(), String.raw`at\26t\20guy@example.com`); - t.is(esc.toString(true), "at&t guy@example.com"); + expect(esc.toString()).toBe(String.raw`at\26t\20guy@example.com`); + expect(esc.toString(true)).toBe("at&t guy@example.com"); }); -test("escape `d'artagnan@example.com`", (t) => { +test("escape `d'artagnan@example.com`", () => { const esc = new JID("d'artagnan", "example.com"); - t.is(esc.toString(), String.raw`d\27artagnan@example.com`); - t.is(esc.toString(true), "d'artagnan@example.com"); + expect(esc.toString()).toBe(String.raw`d\27artagnan@example.com`); + expect(esc.toString(true)).toBe("d'artagnan@example.com"); }); -test("escape `/.fanboy@example.com`", (t) => { +test("escape `/.fanboy@example.com`", () => { const esc = new JID("/.fanboy", "example.com"); - t.is(esc.toString(), String.raw`\2f.fanboy@example.com`); - t.is(esc.toString(true), "/.fanboy@example.com"); + expect(esc.toString()).toBe(String.raw`\2f.fanboy@example.com`); + expect(esc.toString(true)).toBe("/.fanboy@example.com"); }); -test("escape `::foo::@example.com`", (t) => { +test("escape `::foo::@example.com`", () => { const esc = new JID("::foo::", "example.com"); - t.is(esc.toString(), String.raw`\3a\3afoo\3a\3a@example.com`); - t.is(esc.toString(true), "::foo::@example.com"); + expect(esc.toString()).toBe(String.raw`\3a\3afoo\3a\3a@example.com`); + expect(esc.toString(true)).toBe("::foo::@example.com"); }); -test("escape `@example.com`", (t) => { +test("escape `@example.com`", () => { const esc = new JID("", "example.com"); - t.is(esc.toString(), String.raw`\3cfoo\3e@example.com`); - t.is(esc.toString(true), "@example.com"); + expect(esc.toString()).toBe(String.raw`\3cfoo\3e@example.com`); + expect(esc.toString(true)).toBe("@example.com"); }); -test("escape `user@host@example.com`", (t) => { +test("escape `user@host@example.com`", () => { const esc = new JID("user@host", "example.com"); - t.is(esc.toString(), String.raw`user\40host@example.com`); - t.is(esc.toString(true), "user@host@example.com"); + expect(esc.toString()).toBe(String.raw`user\40host@example.com`); + expect(esc.toString(true)).toBe("user@host@example.com"); }); -test("escape `c:\\net@example.com`", (t) => { +test("escape `c:\\net@example.com`", () => { const esc = new JID(String.raw`c:\net`, "example.com"); - t.is(esc.toString(), String.raw`c\3a\5cnet@example.com`); - t.is(esc.toString(true), String.raw`c:\net@example.com`); + expect(esc.toString()).toBe(String.raw`c\3a\5cnet@example.com`); + expect(esc.toString(true)).toBe(String.raw`c:\net@example.com`); }); -test("escape `c:\\\\net@example.com`", (t) => { +test("escape `c:\\\\net@example.com`", () => { const esc = new JID(String.raw`c:\\net`, "example.com"); - t.is(esc.toString(), String.raw`c\3a\5c\5cnet@example.com`); - t.is(esc.toString(true), String.raw`c:\\net@example.com`); + expect(esc.toString()).toBe(String.raw`c\3a\5c\5cnet@example.com`); + expect(esc.toString(true)).toBe(String.raw`c:\\net@example.com`); }); -test("escape `c:\\cool stuff@example.com`", (t) => { +test("escape `c:\\cool stuff@example.com`", () => { const esc = new JID(String.raw`c:\cool stuff`, "example.com"); - t.is(esc.toString(), String.raw`c\3a\5ccool\20stuff@example.com`); - t.is(esc.toString(true), String.raw`c:\cool stuff@example.com`); + expect(esc.toString()).toBe(String.raw`c\3a\5ccool\20stuff@example.com`); + expect(esc.toString(true)).toBe(String.raw`c:\cool stuff@example.com`); }); -test("escape `c:\\5commas@example.com`", (t) => { +test("escape `c:\\5commas@example.com`", () => { const esc = new JID(String.raw`c:\5commas`, "example.com"); - t.is(esc.toString(), String.raw`c\3a\5c5commas@example.com`); - t.is(esc.toString(true), String.raw`c:\5commas@example.com`); + expect(esc.toString()).toBe(String.raw`c\3a\5c5commas@example.com`); + expect(esc.toString(true)).toBe(String.raw`c:\5commas@example.com`); }); -test("escape `space\\20cadet@example.com`", (t) => { +test("escape `space\\20cadet@example.com`", () => { const esc = new JID(String.raw`space\20cadet`, "example.com"); - t.is(esc.toString(), String.raw`space\20cadet@example.com`); - t.is(esc.toString(true), "space cadet@example.com"); + expect(esc.toString()).toBe(String.raw`space\20cadet@example.com`); + expect(esc.toString(true)).toBe("space cadet@example.com"); }); -test("escape `at\\26t\\20guy@example.com`", (t) => { +test("escape `at\\26t\\20guy@example.com`", () => { const esc = new JID(String.raw`at\26t\20guy`, "example.com"); - t.is(esc.toString(), String.raw`at\26t\20guy@example.com`); - t.is(esc.toString(true), "at&t guy@example.com"); + expect(esc.toString()).toBe(String.raw`at\26t\20guy@example.com`); + expect(esc.toString(true)).toBe("at&t guy@example.com"); }); -test("escape `d\\27artagnan@example.com`", (t) => { +test("escape `d\\27artagnan@example.com`", () => { const esc = new JID(String.raw`d\27artagnan`, "example.com"); - t.is(esc.toString(), String.raw`d\27artagnan@example.com`); - t.is(esc.toString(true), "d'artagnan@example.com"); + expect(esc.toString()).toBe(String.raw`d\27artagnan@example.com`); + expect(esc.toString(true)).toBe("d'artagnan@example.com"); }); -test("escape `\\2f.fanboy@example.com`", (t) => { +test("escape `\\2f.fanboy@example.com`", () => { const esc = new JID(String.raw`\2f.fanboy`, "example.com"); - t.is(esc.toString(), String.raw`\2f.fanboy@example.com`); - t.is(esc.toString(true), "/.fanboy@example.com"); + expect(esc.toString()).toBe(String.raw`\2f.fanboy@example.com`); + expect(esc.toString(true)).toBe("/.fanboy@example.com"); }); -test("escape `\\3a\\3afoo\\3a\\3a@example.com`", (t) => { +test("escape `\\3a\\3afoo\\3a\\3a@example.com`", () => { const esc = new JID(String.raw`\3a\3afoo\3a\3a`, "example.com"); - t.is(esc.toString(), String.raw`\3a\3afoo\3a\3a@example.com`); - t.is(esc.toString(true), "::foo::@example.com"); + expect(esc.toString()).toBe(String.raw`\3a\3afoo\3a\3a@example.com`); + expect(esc.toString(true)).toBe("::foo::@example.com"); }); -test("escape `\\3cfoo\\3e@example.com`", (t) => { +test("escape `\\3cfoo\\3e@example.com`", () => { const esc = new JID(String.raw`\3cfoo\3e`, "example.com"); - t.is(esc.toString(), String.raw`\3cfoo\3e@example.com`); - t.is(esc.toString(true), "@example.com"); + expect(esc.toString()).toBe(String.raw`\3cfoo\3e@example.com`); + expect(esc.toString(true)).toBe("@example.com"); }); -test("escape `user\\40host@example.com`", (t) => { +test("escape `user\\40host@example.com`", () => { const esc = new JID(String.raw`user\40host`, "example.com"); - t.is(esc.toString(), String.raw`user\40host@example.com`); - t.is(esc.toString(true), "user@host@example.com"); + expect(esc.toString()).toBe(String.raw`user\40host@example.com`); + expect(esc.toString(true)).toBe("user@host@example.com"); }); -test("escape `c\\3a\\5cnet@example.com`", (t) => { +test("escape `c\\3a\\5cnet@example.com`", () => { const esc = new JID(String.raw`c\3a\5cnet`, "example.com"); - t.is(esc.toString(), String.raw`c\3a\5cnet@example.com`); - t.is(esc.toString(true), String.raw`c:\net@example.com`); + expect(esc.toString()).toBe(String.raw`c\3a\5cnet@example.com`); + expect(esc.toString(true)).toBe(String.raw`c:\net@example.com`); }); -test("escape `c\\3a\\5ccool\\20stuff@example.com`", (t) => { +test("escape `c\\3a\\5ccool\\20stuff@example.com`", () => { const esc = new JID(String.raw`c\3a\5ccool\20stuff`, "example.com"); - t.is(esc.toString(), String.raw`c\3a\5ccool\20stuff@example.com`); - t.is(esc.toString(true), String.raw`c:\cool stuff@example.com`); + expect(esc.toString()).toBe(String.raw`c\3a\5ccool\20stuff@example.com`); + expect(esc.toString(true)).toBe(String.raw`c:\cool stuff@example.com`); }); -test("escape `c\\3a\\5c5commas@example.com`", (t) => { +test("escape `c\\3a\\5c5commas@example.com`", () => { const esc = new JID(String.raw`c\3a\5c5commas`, "example.com"); - t.is(esc.toString(), String.raw`c\3a\5c5commas@example.com`); - t.is(esc.toString(true), String.raw`c:\5commas@example.com`); + expect(esc.toString()).toBe(String.raw`c\3a\5c5commas@example.com`); + expect(esc.toString(true)).toBe(String.raw`c:\5commas@example.com`); }); diff --git a/packages/jid/test/index.js b/packages/jid/test/index.js index f279bf00b..f8cf4e296 100644 --- a/packages/jid/test/index.js +++ b/packages/jid/test/index.js @@ -1,37 +1,34 @@ "use strict"; -const test = require("ava"); -const { spy } = require("sinon"); const jid = require(".."); const JID = require("../lib/JID"); -test("equal calls equals on the first argument with the second argument", (t) => { +test("equal calls equals on the first argument with the second argument", () => { const A = jid("foo"); const B = jid("bar"); - spy(A, "equals"); + const spy_equals = jest.spyOn(A, "equals"); jid.equal(A, B); - t.true(A.equals.calledWith(B)); - A.equals.restore(); + expect(spy_equals).toHaveBeenCalledWith(B); }); -test("JID exports lib/JID", (t) => { - t.is(jid.JID, JID); +test("JID exports lib/JID", () => { + expect(jid.JID).toBe(JID); }); -test("calls parse if only first argument provided", (t) => { +test("calls parse if only first argument provided", () => { const addr = jid("foo@bar"); - t.true(addr instanceof JID); - t.is(addr.toString(), "foo@bar"); + expect(addr instanceof JID).toBe(true); + expect(addr.toString()).toBe("foo@bar"); }); -test("calls JID with passed arguments", (t) => { +test("calls JID with passed arguments", () => { const addr = jid("foo", "bar", "baz"); - t.true(addr instanceof JID); - t.is(addr.toString(), "foo@bar/baz"); + expect(addr instanceof JID).toBe(true); + expect(addr.toString()).toBe("foo@bar/baz"); }); -test("works as expected with new operator", (t) => { +test("works as expected with new operator", () => { const addr = new jid("foo", "bar", "baz"); - t.true(addr instanceof JID); - t.is(addr.toString(), "foo@bar/baz"); + expect(addr instanceof JID).toBe(true); + expect(addr.toString()).toBe("foo@bar/baz"); }); diff --git a/packages/jid/test/parsing.js b/packages/jid/test/parsing.js index 6e34f6b89..b835bbffc 100644 --- a/packages/jid/test/parsing.js +++ b/packages/jid/test/parsing.js @@ -1,72 +1,71 @@ "use strict"; -const test = require("ava"); const parse = require("../lib/parse"); -test('should parse a "domain" JID', (t) => { +test('should parse a "domain" JID', () => { const j = parse("d"); - t.is(j.getLocal(), ""); - t.is(j.getDomain(), "d"); - t.is(j.getResource(), ""); + expect(j.getLocal()).toBe(""); + expect(j.getDomain()).toBe("d"); + expect(j.getResource()).toBe(""); }); -test('should parse a "user@domain" JID', (t) => { +test('should parse a "user@domain" JID', () => { const j = parse("u@d"); - t.is(j.getLocal(), "u"); - t.is(j.getDomain(), "d"); - t.is(j.getResource(), ""); + expect(j.getLocal()).toBe("u"); + expect(j.getDomain()).toBe("d"); + expect(j.getResource()).toBe(""); }); -test('should parse a "domain/resource" JID', (t) => { +test('should parse a "domain/resource" JID', () => { const j = parse("d/r"); - t.is(j.getLocal(), ""); - t.is(j.getDomain(), "d"); - t.is(j.getResource(), "r"); + expect(j.getLocal()).toBe(""); + expect(j.getDomain()).toBe("d"); + expect(j.getResource()).toBe("r"); }); -test('should parse a "user@domain/resource" JID', (t) => { +test('should parse a "user@domain/resource" JID', () => { const j = parse("u@d/r"); - t.is(j.getLocal(), "u"); - t.is(j.getDomain(), "d"); - t.is(j.getResource(), "r"); + expect(j.getLocal()).toBe("u"); + expect(j.getDomain()).toBe("d"); + expect(j.getResource()).toBe("r"); }); -test('should parse a "user@domain/resource@thing" JID', (t) => { +test('should parse a "user@domain/resource@thing" JID', () => { const j = parse("u@d/r@foo"); - t.is(j.getLocal(), "u"); - t.is(j.getDomain(), "d"); - t.is(j.getResource(), "r@foo"); + expect(j.getLocal()).toBe("u"); + expect(j.getDomain()).toBe("d"); + expect(j.getResource()).toBe("r@foo"); }); -test('should parse a "user@domain/resource/thing" JID', (t) => { +test('should parse a "user@domain/resource/thing" JID', () => { const j = parse("u@d/r/foo"); - t.is(j.getLocal(), "u"); - t.is(j.getDomain(), "d"); - t.is(j.getResource(), "r/foo"); + expect(j.getLocal()).toBe("u"); + expect(j.getDomain()).toBe("d"); + expect(j.getResource()).toBe("r/foo"); }); -test("should parse an internationalized domain name as unicode", (t) => { +test("should parse an internationalized domain name as unicode", () => { const j = parse("öko.de"); - t.is(j.getDomain(), "öko.de"); + expect(j.getDomain()).toBe("öko.de"); }); -test("should parse an empty domain JID (#109)", (t) => { +test("should parse an empty domain JID (#109)", () => { const j = parse("u@d", ""); - t.is(j.getLocal(), "u"); - t.is(j.getDomain(), "d"); - t.is(j.getResource(), ""); + expect(j.getLocal()).toBe("u"); + expect(j.getDomain()).toBe("d"); + expect(j.getResource()).toBe(""); }); -test("should allow access to jid parts using keys", (t) => { +test("should allow access to jid parts using keys", () => { const j = parse("u@d/r", ""); - t.is(j.local, "u"); - t.is(j.domain, "d"); - t.is(j.resource, "r"); + expect(j.local).toBe("u"); + expect(j.domain).toBe("d"); + expect(j.resource).toBe("r"); }); -test("shouldn't get U_STRINGPREP_PROHIBITED_ERROR (#93)", (t) => { - t.notThrows(() => { +test("shouldn't get U_STRINGPREP_PROHIBITED_ERROR (#93)", () => { + expect(() => { const j = parse("f u@d"); j.toString(); - }); + }).not.toThrow(); }); diff --git a/packages/jid/test/serialization.js b/packages/jid/test/serialization.js index b1335f9ce..cbf17bb37 100644 --- a/packages/jid/test/serialization.js +++ b/packages/jid/test/serialization.js @@ -1,24 +1,23 @@ "use strict"; -const test = require("ava"); const JID = require("../lib/JID"); -test('should serialize a "domain" JID', (t) => { +test('should serialize a "domain" JID', () => { const j = new JID(null, "d"); - t.is(j.toString(), "d"); + expect(j.toString()).toBe("d"); }); -test('should serialize a "user@domain" JID', (t) => { +test('should serialize a "user@domain" JID', () => { const j = new JID("u", "d"); - t.is(j.toString(), "u@d"); + expect(j.toString()).toBe("u@d"); }); -test('should serialize a "domain/resource" JID', (t) => { +test('should serialize a "domain/resource" JID', () => { const j = new JID(null, "d", "r"); - t.is(j.toString(), "d/r"); + expect(j.toString()).toBe("d/r"); }); -test('should serialize a "user@domain/resource" JID', (t) => { +test('should serialize a "user@domain/resource" JID', () => { const j = new JID("u", "d", "r"); - t.is(j.toString(), "u@d/r"); + expect(j.toString()).toBe("u@d/r"); }); diff --git a/packages/jid/test/toPrimitive.js b/packages/jid/test/toPrimitive.js index c345e864f..375458c02 100644 --- a/packages/jid/test/toPrimitive.js +++ b/packages/jid/test/toPrimitive.js @@ -1,17 +1,16 @@ "use strict"; -const test = require("ava"); const JID = require("../lib/JID"); -test("cocerce to string", (t) => { +test("cocerce to string", () => { const addr = new JID("foo", "bar"); - t.is(addr + "", addr.toString()); - t.is("" + addr, addr.toString()); - t.true(addr == addr.toString()); + expect(addr + "").toBe(addr.toString()); + expect("" + addr).toBe(addr.toString()); + expect(addr == addr.toString()).toBe(true); }); -test("cocerce to NaN", (t) => { +test("cocerce to NaN", () => { const addr = new JID("foo", "bar"); - t.true(isNaN(+addr)); - t.true(isNaN(addr + 4)); + expect(isNaN(+addr)).toBe(true); + expect(isNaN(addr + 4)).toBe(true); }); diff --git a/packages/middleware/test/Context.js b/packages/middleware/test/Context.js index 5173885f6..496f02d1d 100644 --- a/packages/middleware/test/Context.js +++ b/packages/middleware/test/Context.js @@ -1,79 +1,78 @@ "use strict"; -const test = require("ava"); const Context = require("../lib/Context"); -test("sets the entity property", (t) => { +test("sets the entity property", () => { const entity = {}; const ctx = new Context(entity, { attrs: {} }); - t.is(ctx.entity, entity); + expect(ctx.entity).toBe(entity); }); -test("sets the stanza property", (t) => { +test("sets the stanza property", () => { const stanza = ; const ctx = new Context({}, stanza); - t.is(ctx.stanza, stanza); + expect(ctx.stanza).toBe(stanza); }); -test("sets name, id and type properties", (t) => { +test("sets name, id and type properties", () => { const stanza = ; const ctx = new Context({}, stanza); - t.is(ctx.name, "message"); - t.is(ctx.id, "foobar"); - t.is(ctx.type, "whatever"); + expect(ctx.name).toBe("message"); + expect(ctx.id).toBe("foobar"); + expect(ctx.type).toBe("whatever"); }); -test("id property defaults to empty string", (t) => { +test("id property defaults to empty string", () => { const stanza = ; const ctx = new Context({}, stanza); - t.is(ctx.id, ""); + expect(ctx.id).toBe(""); }); -test("type property defaults to normal for message", (t) => { +test("type property defaults to normal for message", () => { const stanza = ; const ctx = new Context({}, stanza); - t.is(ctx.type, "normal"); + expect(ctx.type).toBe("normal"); }); -test("type property defaults to available for presence", (t) => { +test("type property defaults to available for presence", () => { const stanza = ; const ctx = new Context({}, stanza); - t.is(ctx.type, "available"); + expect(ctx.type).toBe("available"); }); -test("type property defaults to empty string for iq", (t) => { +test("type property defaults to empty string for iq", () => { const stanza = ; const ctx = new Context({}, stanza); - t.is(ctx.type, ""); + expect(ctx.type).toBe(""); }); -test("type property defaults to empty string for nonzas", (t) => { +test("type property defaults to empty string for nonzas", () => { const stanza = ; const ctx = new Context({}, stanza); - t.is(ctx.type, ""); + expect(ctx.type).toBe(""); }); -test("to property is null", (t) => { +test("to property is null", () => { const ctx = new Context({}, ); - t.is(ctx.to, null); + expect(ctx.to).toBe(null); }); -test("from property is null", (t) => { +test("from property is null", () => { const ctx = new Context({}, ); - t.is(ctx.from, null); + expect(ctx.from).toBe(null); }); -test("local property is an empty string", (t) => { +test("local property is an empty string", () => { const ctx = new Context({}, ); - t.is(ctx.local, ""); + expect(ctx.local).toBe(""); }); -test("domain property is an empty string", (t) => { +test("domain property is an empty string", () => { const ctx = new Context({}, ); - t.is(ctx.domain, ""); + expect(ctx.domain).toBe(""); }); -test("resource property is an empty string", (t) => { +test("resource property is an empty string", () => { const ctx = new Context({}, ); - t.is(ctx.resource, ""); + expect(ctx.resource).toBe(""); }); diff --git a/packages/middleware/test/IncomingContext.js b/packages/middleware/test/IncomingContext.js index f8001ab8b..7f53361f4 100644 --- a/packages/middleware/test/IncomingContext.js +++ b/packages/middleware/test/IncomingContext.js @@ -1,64 +1,63 @@ "use strict"; -const test = require("ava"); const Context = require("../lib/IncomingContext"); const { JID } = require("@xmpp/test"); const _Context = require("../lib/Context"); -test("is instance of Context", (t) => { +test("is instance of Context", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: {} }); - t.true(ctx instanceof _Context); + expect(ctx instanceof _Context).toBe(true); }); -test("sets the from property", (t) => { +test("sets the from property", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: { from: "foo@bar" } }); - t.deepEqual(ctx.from, new JID("foo@bar")); + expect(ctx.from).toEqual(new JID("foo@bar")); }); -test("from property default to entity jid domain", (t) => { +test("from property default to entity jid domain", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: {} }); - t.deepEqual(ctx.from, new JID("bar")); + expect(ctx.from).toEqual(new JID("bar")); }); -test("sets the to property", (t) => { +test("sets the to property", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: { to: "foo@bar" } }); - t.deepEqual(ctx.to, new JID("foo@bar")); + expect(ctx.to).toEqual(new JID("foo@bar")); }); -test("to property default to entity jid", (t) => { +test("to property default to entity jid", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: {} }); - t.deepEqual(ctx.to, new JID("foo@bar")); + expect(ctx.to).toEqual(new JID("foo@bar")); }); -test("sets the local property to from.local", (t) => { +test("sets the local property to from.local", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: { from: "foo@bar" } }); - t.deepEqual(ctx.local, "foo"); + expect(ctx.local).toEqual("foo"); }); -test("local property defaults to empty string", (t) => { +test("local property defaults to empty string", () => { const ctx = new Context({}, { attrs: { from: "bar" } }); - t.deepEqual(ctx.local, ""); + expect(ctx.local).toEqual(""); }); -test("sets the domain property to from.domain", (t) => { +test("sets the domain property to from.domain", () => { const entity = { jid: new JID("foo@bar") }; const ctx = new Context(entity, { attrs: { from: "foo@bar" } }); - t.deepEqual(ctx.domain, "bar"); + expect(ctx.domain).toEqual("bar"); }); -test("sets the resource property to from.resource", (t) => { +test("sets the resource property to from.resource", () => { const entity = { jid: new JID("foo@bar/test") }; const ctx = new Context(entity, { attrs: { from: "foo@bar/test" } }); - t.deepEqual(ctx.resource, "test"); + expect(ctx.resource).toEqual("test"); }); -test("resource property defaults to empty string", (t) => { +test("resource property defaults to empty string", () => { const ctx = new Context({}, { attrs: { from: "foo@bar" } }); - t.deepEqual(ctx.resource, ""); + expect(ctx.resource).toEqual(""); }); diff --git a/packages/middleware/test/OutgoingContext.js b/packages/middleware/test/OutgoingContext.js index 4faf3d00f..762f20246 100644 --- a/packages/middleware/test/OutgoingContext.js +++ b/packages/middleware/test/OutgoingContext.js @@ -1,64 +1,63 @@ "use strict"; -const test = require("ava"); const Context = require("../lib/OutgoingContext"); const { JID } = require("@xmpp/test"); const _Context = require("../lib/Context"); -test("is instance of Context", (t) => { +test("is instance of Context", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: {} }); - t.true(ctx instanceof _Context); + expect(ctx instanceof _Context).toBe(true); }); -test("sets the from property", (t) => { +test("sets the from property", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: { from: "foo@bar" } }); - t.deepEqual(ctx.from, new JID("foo@bar")); + expect(ctx.from).toEqual(new JID("foo@bar")); }); -test("from property default to entity jid", (t) => { +test("from property default to entity jid", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: {} }); - t.deepEqual(ctx.from, new JID("foo@bar")); + expect(ctx.from).toEqual(new JID("foo@bar")); }); -test("sets the to property", (t) => { +test("sets the to property", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: { to: "foo@bar" } }); - t.deepEqual(ctx.to, new JID("foo@bar")); + expect(ctx.to).toEqual(new JID("foo@bar")); }); -test("to property default to entity jid domain", (t) => { +test("to property default to entity jid domain", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: {} }); - t.deepEqual(ctx.to, new JID("bar")); + expect(ctx.to).toEqual(new JID("bar")); }); -test("sets the local property to to.local", (t) => { +test("sets the local property to to.local", () => { const entity = { jid: new JID("foo@bar"), domain: "bar" }; const ctx = new Context(entity, { attrs: { to: "foo@bar" } }); - t.deepEqual(ctx.local, "foo"); + expect(ctx.local).toEqual("foo"); }); -test("local property defaults to empty string", (t) => { +test("local property defaults to empty string", () => { const ctx = new Context({}, { attrs: { to: "bar" } }); - t.deepEqual(ctx.local, ""); + expect(ctx.local).toEqual(""); }); -test("sets the domain property to to.domain", (t) => { +test("sets the domain property to to.domain", () => { const entity = { jid: new JID("foo@bar") }; const ctx = new Context(entity, { attrs: { to: "foo@bar" } }); - t.deepEqual(ctx.domain, "bar"); + expect(ctx.domain).toEqual("bar"); }); -test("sets the resource property to to.resource", (t) => { +test("sets the resource property to to.resource", () => { const entity = { jid: new JID("foo@bar/test") }; const ctx = new Context(entity, { attrs: { to: "foo@bar/test" } }); - t.deepEqual(ctx.resource, "test"); + expect(ctx.resource).toEqual("test"); }); -test("resource property defaults to empty string", (t) => { +test("resource property defaults to empty string", () => { const ctx = new Context({}, { attrs: { to: "foo@bar" } }); - t.deepEqual(ctx.resource, ""); + expect(ctx.resource).toEqual(""); }); diff --git a/packages/middleware/test/middleware.js b/packages/middleware/test/middleware.js index 8881a8185..3419cf164 100644 --- a/packages/middleware/test/middleware.js +++ b/packages/middleware/test/middleware.js @@ -1,44 +1,44 @@ "use strict"; -const test = require("ava"); const IncomingContext = require("../lib/IncomingContext"); const OutgoingContext = require("../lib/OutgoingContext"); const { context, mockClient, mockInput, promiseError } = require("@xmpp/test"); -const middleware = require(".."); +const _middleware = require(".."); -test.beforeEach((t) => { - t.context = context(); - const { entity } = t.context; - t.context.middleware = middleware({ entity }); +let ctx; + +beforeEach(() => { + ctx = context(); + const { entity } = ctx; + ctx.middleware = _middleware({ entity }); }); -test.cb("use", (t) => { - t.plan(4); +test("use", (done) => { + expect.assertions(4); const stanza = ; - t.context.middleware.use((ctx, next) => { - t.true(ctx instanceof IncomingContext); - t.deepEqual(ctx.stanza, stanza); - t.is(ctx.entity, t.context.entity); - t.true(next() instanceof Promise); - t.end(); + ctx.middleware.use((ctx, next) => { + expect(ctx instanceof IncomingContext).toBe(true); + expect(ctx.stanza).toEqual(stanza); + expect(ctx.entity).toBe(ctx.entity); + expect(next() instanceof Promise).toBe(true); + done(); }); - t.context.fakeIncoming(stanza); + ctx.fakeIncoming(stanza); }); -test.cb("filter", (t) => { - t.plan(4); +test("filter", (done) => { + expect.assertions(3); const stanza = ; - t.context.middleware.filter((ctx, next) => { - t.true(ctx instanceof OutgoingContext); - t.deepEqual(ctx.stanza, stanza); - t.is(ctx.entity, t.context.entity); - t.true(next() instanceof Promise); - t.end(); + ctx.middleware.filter((ctx, next) => { + expect(ctx instanceof OutgoingContext).toBe(true); + expect(ctx.stanza).toEqual(stanza); + expect(next() instanceof Promise).toBe(true); + done(); }); - t.context.fakeOutgoing(stanza); + ctx.fakeOutgoing(stanza); }); -test("emits an error event if a middleware throws", async (t) => { +test("emits an error event if a middleware throws", async () => { const xmpp = mockClient(); const { middleware } = xmpp; @@ -53,5 +53,5 @@ test("emits an error event if a middleware throws", async (t) => { mockInput(xmpp, ); const err = await willError; - t.deepEqual(err, error); + expect(err).toEqual(error); }); diff --git a/packages/reconnect/test.js b/packages/reconnect/test.js index 8ed02eb56..27bbff77f 100644 --- a/packages/reconnect/test.js +++ b/packages/reconnect/test.js @@ -1,21 +1,23 @@ "use strict"; -const test = require("ava"); const _reconnect = require("."); const EventEmitter = require("events"); -test("it schedule a reconnect when disconnect is emitted", (t) => { +test("it schedule a reconnect when disconnect is emitted", (done) => { const entity = new EventEmitter(); const reconnect = _reconnect({ entity }); reconnect.scheduleReconnect = () => { - t.pass(); + expect.pass(); + done(); }; entity.emit("disconnect"); }); -test("#reconnect", async (t) => { +test("#reconnect", async () => { + expect.assertions(3); + const entity = new EventEmitter(); const reconnect = _reconnect({ entity }); @@ -26,12 +28,12 @@ test("#reconnect", async (t) => { }; entity.connect = (service) => { - t.is(service, entity.options.service); + expect(service).toBe(entity.options.service); }; entity.open = ({ domain, lang }) => { - t.is(domain, entity.options.domain); - t.is(lang, entity.options.lang); + expect(domain).toBe(entity.options.domain); + expect(lang).toBe(entity.options.lang); }; await reconnect.reconnect(); diff --git a/packages/resolve/test/compareAltConnections.js b/packages/resolve/test/compareAltConnections.js index 6d1bcfce3..4895ba252 100644 --- a/packages/resolve/test/compareAltConnections.js +++ b/packages/resolve/test/compareAltConnections.js @@ -1,43 +1,33 @@ "use strict"; -const test = require("ava"); const { compare } = require("../lib/alt-connections"); -test("by security", (t) => { - t.deepEqual( - [ - { uri: "http://web.example.org:5280/bosh", method: "xbosh" }, - { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, - ].sort(compare), - [ - { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, - { uri: "http://web.example.org:5280/bosh", method: "xbosh" }, - ], - ); +test("by security", () => { + expect([ + { uri: "http://web.example.org:5280/bosh", method: "xbosh" }, + { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, + ].sort(compare)).toEqual([ + { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, + { uri: "http://web.example.org:5280/bosh", method: "xbosh" }, + ]); - t.deepEqual( - [ - { uri: "ws://web.example.com:80/ws", method: "websocket" }, - { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, - ].sort(compare), - [ - { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, - { uri: "ws://web.example.com:80/ws", method: "websocket" }, - ], - ); + expect([ + { uri: "ws://web.example.com:80/ws", method: "websocket" }, + { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, + ].sort(compare)).toEqual([ + { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, + { uri: "ws://web.example.com:80/ws", method: "websocket" }, + ]); }); -test("by method", (t) => { - t.deepEqual( - [ - { uri: "https://web.example.org:5280/http-poll", method: "httppoll" }, - { uri: "wss://web.example.com:443/ws", method: "websocket" }, - { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, - ].sort(compare), - [ - { uri: "wss://web.example.com:443/ws", method: "websocket" }, - { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, - { uri: "https://web.example.org:5280/http-poll", method: "httppoll" }, - ], - ); +test("by method", () => { + expect([ + { uri: "https://web.example.org:5280/http-poll", method: "httppoll" }, + { uri: "wss://web.example.com:443/ws", method: "websocket" }, + { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, + ].sort(compare)).toEqual([ + { uri: "wss://web.example.com:443/ws", method: "websocket" }, + { uri: "https://web.example.org:5280/bosh", method: "xbosh" }, + { uri: "https://web.example.org:5280/http-poll", method: "httppoll" }, + ]); }); diff --git a/packages/resolve/test/httpParse.js b/packages/resolve/test/httpParse.js index 986f4cecf..cebe49485 100644 --- a/packages/resolve/test/httpParse.js +++ b/packages/resolve/test/httpParse.js @@ -1,7 +1,5 @@ "use strict"; -const test = require("ava"); - const domain = "example.com"; // eslint-disable-next-line n/no-unsupported-features/node-builtins globalThis.fetch = (url) => { @@ -23,8 +21,8 @@ globalThis.fetch = (url) => { const { resolve } = require("../lib/http"); -test("parse", async (t) => { - t.deepEqual(await resolve(domain), [ +test("parse", async () => { + expect(await resolve(domain)).toEqual([ { rel: "urn:xmpp:alt-connections:websocket", href: "wss://example.com/ws", diff --git a/packages/resolve/test/sortSrv.js b/packages/resolve/test/sortSrv.js index a78a48995..23bf2fc65 100644 --- a/packages/resolve/test/sortSrv.js +++ b/packages/resolve/test/sortSrv.js @@ -1,52 +1,39 @@ "use strict"; -const test = require("ava"); const sort = require("../lib/dns").sortSrv; -test("by priority", (t) => { - t.deepEqual( - sort([ - { priority: 2, weight: 0 }, - { priority: 1, weight: 0 }, - ]), - [ - { priority: 1, weight: 0 }, - { priority: 2, weight: 0 }, - ], - ); +test("by priority", () => { + expect(sort([ + { priority: 2, weight: 0 }, + { priority: 1, weight: 0 }, + ])).toEqual([ + { priority: 1, weight: 0 }, + { priority: 2, weight: 0 }, + ]); - t.deepEqual( - sort([ - { priority: 2, weight: 1 }, - { priority: 1, weight: 0 }, - ]), - [ - { priority: 1, weight: 0 }, - { priority: 2, weight: 1 }, - ], - ); + expect(sort([ + { priority: 2, weight: 1 }, + { priority: 1, weight: 0 }, + ])).toEqual([ + { priority: 1, weight: 0 }, + { priority: 2, weight: 1 }, + ]); }); -test("by weight", (t) => { - t.deepEqual( - sort([ - { weight: 1, priority: 0 }, - { weight: 2, priority: 0 }, - ]), - [ - { weight: 2, priority: 0 }, - { weight: 1, priority: 0 }, - ], - ); +test("by weight", () => { + expect(sort([ + { weight: 1, priority: 0 }, + { weight: 2, priority: 0 }, + ])).toEqual([ + { weight: 2, priority: 0 }, + { weight: 1, priority: 0 }, + ]); - t.deepEqual( - sort([ - { weight: 2, priority: 0 }, - { weight: 1, priority: 0 }, - ]), - [ - { weight: 2, priority: 0 }, - { weight: 1, priority: 0 }, - ], - ); + expect(sort([ + { weight: 2, priority: 0 }, + { weight: 1, priority: 0 }, + ])).toEqual([ + { weight: 2, priority: 0 }, + { weight: 1, priority: 0 }, + ]); }); diff --git a/packages/resource-binding/test.js b/packages/resource-binding/test.js index e5cd7953b..f4603b111 100644 --- a/packages/resource-binding/test.js +++ b/packages/resource-binding/test.js @@ -1,9 +1,8 @@ "use strict"; -const test = require("ava"); const { mockClient, delay } = require("@xmpp/test"); -test("without resource", async (t) => { +test("without resource", async () => { const resource = Math.random().toString(); const jid = "foo@bar/" + resource; @@ -22,14 +21,14 @@ test("without resource", async (t) => { ); const child = await entity.catchOutgoingSet(); - t.deepEqual(child, ); + expect(child).toEqual(); await delay(); - t.is(entity.jid.toString(), jid); + expect(entity.jid.toString()).toBe(jid); }); -test("with string resource", async (t) => { +test("with string resource", async () => { const resource = Math.random().toString(); const jid = "foo@bar/" + resource; @@ -48,19 +47,16 @@ test("with string resource", async (t) => { ); const child = await entity.catchOutgoingSet(); - t.deepEqual( - child, - - {resource} - , - ); + expect(child).toEqual( + {resource} + ); await delay(); - t.is(entity.jid.toString(), jid); + expect(entity.jid.toString()).toBe(jid); }); -test("with function resource", async (t) => { +test("with function resource", async () => { const resource = Math.random().toString(); const jid = "foo@bar/" + resource; @@ -68,7 +64,7 @@ test("with function resource", async (t) => { resource: async (bind) => { await delay(); const result = await bind(resource); - t.is(result.toString(), jid); + expect(result.toString()).toBe(jid); }, }); @@ -85,14 +81,11 @@ test("with function resource", async (t) => { ); const child = await entity.catchOutgoingSet(); - t.deepEqual( - child, - - {resource} - , - ); + expect(child).toEqual( + {resource} + ); await delay(); - t.is(entity.jid.toString(), jid); + expect(entity.jid.toString()).toBe(jid); }); diff --git a/packages/sasl/test.js b/packages/sasl/test.js index 86a645eff..071038825 100644 --- a/packages/sasl/test.js +++ b/packages/sasl/test.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const { mockClient, promise } = require("@xmpp/test"); const parse = require("@xmpp/xml/lib/parse.js"); @@ -8,7 +7,7 @@ const username = "foo"; const password = "bar"; const credentials = { username, password }; -test("no compatibles mechanisms", async (t) => { +test("no compatibles mechanisms", async () => { const { entity } = mockClient({ username, password }); entity.mockInput( @@ -20,11 +19,11 @@ test("no compatibles mechanisms", async (t) => { ); const error = await promise(entity, "error"); - t.true(error instanceof Error); - t.is(error.message, "No compatible mechanism"); + expect(error instanceof Error).toBe(true); + expect(error.message).toBe("No compatible mechanism"); }); -test("with object credentials", async (t) => { +test("with object credentials", async () => { const { entity } = mockClient({ credentials }); entity.restart = () => { entity.emit("open"); @@ -39,8 +38,7 @@ test("with object credentials", async (t) => { , ); - t.deepEqual( - await promise(entity, "send"), + expect(await promise(entity, "send")).toEqual( AGZvbwBiYXI= , @@ -51,11 +49,11 @@ test("with object credentials", async (t) => { await promise(entity, "online"); }); -test("with function credentials", async (t) => { +test("with function credentials", async () => { const mech = "PLAIN"; function authenticate(auth, mechanism) { - t.is(mechanism, mech); + expect(mechanism).toBe(mech); return auth(credentials); } @@ -73,8 +71,7 @@ test("with function credentials", async (t) => { , ); - t.deepEqual( - await promise(entity, "send"), + expect(await promise(entity, "send")).toEqual( AGZvbwBiYXI= , @@ -85,7 +82,7 @@ test("with function credentials", async (t) => { await promise(entity, "online"); }); -test("failure", async (t) => { +test("failure", async () => { const { entity } = mockClient({ credentials }); entity.mockInput( @@ -96,8 +93,7 @@ test("failure", async (t) => { , ); - t.deepEqual( - await promise(entity, "send"), + expect(await promise(entity, "send")).toEqual( AGZvbwBiYXI= , @@ -112,13 +108,13 @@ test("failure", async (t) => { entity.mockInput(failure); const error = await promise(entity, "error"); - t.true(error instanceof Error); - t.is(error.name, "SASLError"); - t.is(error.condition, "some-condition"); - t.is(error.element, failure); + expect(error instanceof Error).toBe(true); + expect(error.name).toBe("SASLError"); + expect(error.condition).toBe("some-condition"); + expect(error.element).toBe(failure); }); -test("prefers SCRAM-SHA-1", async (t) => { +test("prefers SCRAM-SHA-1", async () => { const { entity } = mockClient({ credentials }); entity.mockInput( @@ -132,10 +128,10 @@ test("prefers SCRAM-SHA-1", async (t) => { ); const result = await promise(entity, "send"); - t.deepEqual(result.attrs.mechanism, "SCRAM-SHA-1"); + expect(result.attrs.mechanism).toEqual("SCRAM-SHA-1"); }); -test("use ANONYMOUS if username and password are not provided", async (t) => { +test("use ANONYMOUS if username and password are not provided", async () => { const { entity } = mockClient(); entity.mockInput( @@ -149,12 +145,10 @@ test("use ANONYMOUS if username and password are not provided", async (t) => { ); const result = await promise(entity, "send"); - t.deepEqual(result.attrs.mechanism, "ANONYMOUS"); + expect(result.attrs.mechanism).toEqual("ANONYMOUS"); }); -test("with whitespaces", async (t) => { - console.log("truc"); - +test("with whitespaces", async () => { const { entity } = mockClient(); entity.mockInput( @@ -172,5 +166,5 @@ test("with whitespaces", async (t) => { ); const result = await promise(entity, "send"); - t.deepEqual(result.attrs.mechanism, "ANONYMOUS"); + expect(result.attrs.mechanism).toEqual("ANONYMOUS"); }); diff --git a/packages/session-establishment/test.js b/packages/session-establishment/test.js index 220f82fc2..aeac9d073 100644 --- a/packages/session-establishment/test.js +++ b/packages/session-establishment/test.js @@ -1,9 +1,8 @@ "use strict"; -const test = require("ava"); const { mockClient, promise, timeout } = require("@xmpp/test"); -test("mandatory", async (t) => { +test("mandatory", async () => { const { entity } = mockClient(); entity.mockInput( @@ -15,12 +14,12 @@ test("mandatory", async (t) => { entity.scheduleIncomingResult(); const child = await entity.catchOutgoingSet(); - t.deepEqual(child, ); + expect(child).toEqual(); await promise(entity, "online"); }); -test("optional", async (t) => { +test("optional", async () => { const { entity } = mockClient(); entity.mockInput( @@ -36,6 +35,6 @@ test("optional", async (t) => { await promise(entity, "online"); await timeout(promiseSend, 0).catch((err) => { - t.is(err.name, "TimeoutError"); + expect(err.name).toBe("TimeoutError"); }); }); diff --git a/packages/starttls/starttls.test.js b/packages/starttls/starttls.test.js index ea3cc4fb6..0bb11f222 100644 --- a/packages/starttls/starttls.test.js +++ b/packages/starttls/starttls.test.js @@ -1,13 +1,12 @@ "use strict"; -const test = require("ava"); const tls = require("tls"); const { canUpgrade } = require("./starttls"); const net = require("net"); const WebSocket = require("../websocket/lib/Socket"); -test("canUpgrade", (t) => { - t.is(canUpgrade(new WebSocket()), false); - t.is(canUpgrade(new tls.TLSSocket()), false); - t.is(canUpgrade(new net.Socket()), true); +test("canUpgrade", () => { + expect(canUpgrade(new WebSocket())).toBe(false); + expect(canUpgrade(new tls.TLSSocket())).toBe(false); + expect(canUpgrade(new net.Socket())).toBe(true); }); diff --git a/packages/starttls/test.js b/packages/starttls/test.js index 07a5e56be..7fc0b2408 100644 --- a/packages/starttls/test.js +++ b/packages/starttls/test.js @@ -1,7 +1,7 @@ "use strict"; -const { mock, stub } = require("sinon"); -const test = require("ava"); +jest.mock("tls"); + const { mockClient, promise, delay } = require("@xmpp/test"); const tls = require("tls"); const net = require("net"); @@ -13,23 +13,15 @@ function mockSocket() { return socket; } -test("success", async (t) => { +test("success", async () => { const { entity } = mockClient(); entity.socket = mockSocket(); const { socket, options } = entity; options.domain = "foobar"; - const mockTLS = mock(tls); - const expectTLSConnect = mockTLS - .expects("connect") - .once() - .withArgs({ socket, host: "foobar" }) - .callsFake(() => { - return new EventEmitter(); - }); - - stub(entity, "_attachSocket"); - stub(entity, "restart"); + tls.connect.mockImplementation(() => { + return new EventEmitter(); + }); entity.mockInput( @@ -37,8 +29,7 @@ test("success", async (t) => { , ); - t.deepEqual( - await promise(entity, "send"), + expect(await promise(entity, "send")).toEqual( , ); @@ -46,10 +37,11 @@ test("success", async (t) => { await delay(); - expectTLSConnect.verify(); + expect(tls.connect).toHaveBeenCalledTimes(1); + expect(tls.connect).toHaveBeenCalledWith({ socket, host: "foobar" }); }); -test("failure", async (t) => { +test("failure", async () => { const { entity } = mockClient(); entity.socket = mockSocket(); @@ -59,14 +51,13 @@ test("failure", async (t) => { , ); - t.deepEqual( - await promise(entity, "send"), + expect(await promise(entity, "send")).toEqual( , ); entity.mockInput(); const err = await promise(entity, "error"); - t.true(err instanceof Error); - t.is(err.message, "STARTTLS_FAILURE"); + expect(err instanceof Error).toBe(true); + expect(err.message).toBe("STARTTLS_FAILURE"); }); diff --git a/packages/stream-features/test.js b/packages/stream-features/test.js index c044216e4..840b887fa 100644 --- a/packages/stream-features/test.js +++ b/packages/stream-features/test.js @@ -1,10 +1,9 @@ "use strict"; -const test = require("ava"); const streamfeatures = require("."); const { xml } = require("@xmpp/test"); -test.skip("selectFeature", (t) => { +test.skip("selectFeature", () => { const features = []; features.push( { @@ -23,5 +22,5 @@ test.skip("selectFeature", (t) => { features, xml("foo", {}, xml("bind")), ); - t.is(feature.priority, 2000); + expect(feature.priority).toBe(2000); }); diff --git a/packages/stream-management/test.js b/packages/stream-management/test.js index 841998b3d..af706e4bf 100644 --- a/packages/stream-management/test.js +++ b/packages/stream-management/test.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const { mockClient } = require("@xmpp/test"); function tick() { @@ -9,7 +8,7 @@ function tick() { }); } -test("enable - enabled", async (t) => { +test("enable - enabled", async () => { const { entity } = mockClient(); entity.mockInput( @@ -20,16 +19,13 @@ test("enable - enabled", async (t) => { entity.streamManagement.outbound = 45; - t.deepEqual( - await entity.catchOutgoing(), - , - ); + expect(await entity.catchOutgoing()).toEqual(); await tick(); - t.is(entity.streamManagement.outbound, 0); - t.is(entity.streamManagement.enabled, false); - t.is(entity.streamManagement.id, ""); + expect(entity.streamManagement.outbound).toBe(0); + expect(entity.streamManagement.enabled).toBe(false); + expect(entity.streamManagement.id).toBe(""); entity.mockInput( { await tick(); - t.is(entity.streamManagement.id, "some-long-sm-id"); - t.is(entity.streamManagement.enabled, true); + expect(entity.streamManagement.id).toBe("some-long-sm-id"); + expect(entity.streamManagement.enabled).toBe(true); }); -test("enable - send rejects", async (t) => { +test("enable - send rejects", async () => { const { entity } = mockClient(); entity.send = () => Promise.reject(new Error("nope")); @@ -62,10 +58,10 @@ test("enable - send rejects", async (t) => { await tick(); - t.is(entity.streamManagement.enabled, false); + expect(entity.streamManagement.enabled).toBe(false); }); -test("enable - message - enabled", async (t) => { +test("enable - message - enabled", async () => { const { entity } = mockClient(); entity.mockInput( @@ -76,21 +72,18 @@ test("enable - message - enabled", async (t) => { entity.streamManagement.outbound = 45; - t.deepEqual( - await entity.catchOutgoing(), - , - ); + expect(await entity.catchOutgoing()).toEqual(); - t.is(entity.streamManagement.outbound, 0); - t.is(entity.streamManagement.enabled, false); - t.is(entity.streamManagement.id, ""); + expect(entity.streamManagement.outbound).toBe(0); + expect(entity.streamManagement.enabled).toBe(false); + expect(entity.streamManagement.id).toBe(""); await tick(); entity.mockInput(); - t.is(entity.streamManagement.enabled, false); - t.is(entity.streamManagement.inbound, 1); + expect(entity.streamManagement.enabled).toBe(false); + expect(entity.streamManagement.inbound).toBe(1); entity.mockInput( { await tick(); - t.is(entity.streamManagement.id, "some-long-sm-id"); - t.is(entity.streamManagement.enabled, true); + expect(entity.streamManagement.id).toBe("some-long-sm-id"); + expect(entity.streamManagement.enabled).toBe(true); }); -test("enable - failed", async (t) => { +test("enable - failed", async () => { const { entity } = mockClient(); entity.mockInput( @@ -118,12 +111,9 @@ test("enable - failed", async (t) => { entity.streamManagement.outbound = 45; - t.deepEqual( - await entity.catchOutgoing(), - , - ); + expect(await entity.catchOutgoing()).toEqual(); - t.is(entity.streamManagement.outbound, 0); + expect(entity.streamManagement.outbound).toBe(0); entity.streamManagement.enabled = true; await tick(); @@ -132,10 +122,10 @@ test("enable - failed", async (t) => { await tick(); - t.is(entity.streamManagement.enabled, false); + expect(entity.streamManagement.enabled).toBe(false); }); -test("resume - resumed", async (t) => { +test("resume - resumed", async () => { const { entity } = mockClient(); entity.status = "offline"; @@ -149,24 +139,21 @@ test("resume - resumed", async (t) => { entity.streamManagement.outbound = 45; - t.deepEqual( - await entity.catchOutgoing(), - , - ); + expect(await entity.catchOutgoing()).toEqual(); - t.is(entity.streamManagement.enabled, false); + expect(entity.streamManagement.enabled).toBe(false); - t.is(entity.status, "offline"); + expect(entity.status).toBe("offline"); entity.mockInput(); await tick(); - t.is(entity.streamManagement.outbound, 45); - t.is(entity.status, "online"); + expect(entity.streamManagement.outbound).toBe(45); + expect(entity.status).toBe("online"); }); -test("resume - failed", async (t) => { +test("resume - failed", async () => { const { entity } = mockClient(); entity.status = "bar"; @@ -180,17 +167,14 @@ test("resume - failed", async (t) => { , ); - t.deepEqual( - await entity.catchOutgoing(), - , - ); + expect(await entity.catchOutgoing()).toEqual(); entity.mockInput(); await tick(); - t.is(entity.status, "bar"); - t.is(entity.streamManagement.id, ""); - t.is(entity.streamManagement.enabled, false); - t.is(entity.streamManagement.outbound, 0); + expect(entity.status).toBe("bar"); + expect(entity.streamManagement.id).toBe(""); + expect(entity.streamManagement.enabled).toBe(false); + expect(entity.streamManagement.outbound).toBe(0); }); diff --git a/packages/tcp/test.js b/packages/tcp/test.js index 47d7aabb3..3b49cb517 100644 --- a/packages/tcp/test.js +++ b/packages/tcp/test.js @@ -1,17 +1,16 @@ "use strict"; -const test = require("ava"); const ConnectionTCP = require("./lib/Connection"); -test("socketParameters()", (t) => { +test("socketParameters()", () => { let params; params = ConnectionTCP.prototype.socketParameters("xmpp://foo"); - t.is(params.port, 5222); + expect(params.port).toBe(5222); params = ConnectionTCP.prototype.socketParameters("xmpp://foo:1234"); - t.is(params.port, 1234); + expect(params.port).toBe(1234); params = ConnectionTCP.prototype.socketParameters("xmpps://foo:1234"); - t.is(params, undefined); + expect(params).toBe(undefined); }); diff --git a/packages/time/test.js b/packages/time/test.js index 019195b33..ced5edbe6 100644 --- a/packages/time/test.js +++ b/packages/time/test.js @@ -1,27 +1,26 @@ "use strict"; -const test = require("ava"); const time = require("."); const s = "21 Jully 1969 02:56 UTC"; const d = new Date(s); -test("date", (t) => { - t.is(time.date(), time.date(new Date())); - t.is(time.date(d), "1969-07-21"); - t.is(time.date(s), "1969-07-21"); +test("date", () => { + expect(time.date()).toBe(time.date(new Date())); + expect(time.date(d)).toBe("1969-07-21"); + expect(time.date(s)).toBe("1969-07-21"); }); -test("time", (t) => { - t.is(time.time(), time.time(new Date())); - t.is(time.time(d), "02:56:00Z"); - t.is(time.time(s), "02:56:00Z"); +test("time", () => { + expect(time.time()).toBe(time.time(new Date())); + expect(time.time(d)).toBe("02:56:00Z"); + expect(time.time(s)).toBe("02:56:00Z"); }); -test("datetime", (t) => { - t.is(time.datetime(), time.datetime(new Date())); - t.is(time.datetime(d), "1969-07-21T02:56:00Z"); - t.is(time.datetime(s), "1969-07-21T02:56:00Z"); +test("datetime", () => { + expect(time.datetime()).toBe(time.datetime(new Date())); + expect(time.datetime(d)).toBe("1969-07-21T02:56:00Z"); + expect(time.datetime(s)).toBe("1969-07-21T02:56:00Z"); }); function fake(value) { @@ -32,9 +31,9 @@ function fake(value) { }; } -test("offset", (t) => { - t.is(time.offset(fake(120)), "-02:00"); - t.is(time.offset(fake(-120)), "+02:00"); - t.is(time.offset(fake(90)), "-01:30"); - t.is(time.offset(fake(-90)), "+01:30"); +test("offset", () => { + expect(time.offset(fake(120))).toBe("-02:00"); + expect(time.offset(fake(-120))).toBe("+02:00"); + expect(time.offset(fake(90))).toBe("-01:30"); + expect(time.offset(fake(-90))).toBe("+01:30"); }); diff --git a/packages/tls/test.js b/packages/tls/test.js index 31fc0f8e5..e745c2258 100644 --- a/packages/tls/test.js +++ b/packages/tls/test.js @@ -1,35 +1,28 @@ "use strict"; -const test = require("ava"); const ConnectionTLS = require("./lib/Connection"); const tls = require("tls"); const { promise } = require("@xmpp/test"); // eslint-disable-next-line n/no-extraneous-require const selfsigned = require("selfsigned"); -test("socketParameters()", (t) => { - t.deepEqual(ConnectionTLS.prototype.socketParameters("xmpps://foo"), { +test("socketParameters()", () => { + expect(ConnectionTLS.prototype.socketParameters("xmpps://foo")).toEqual({ port: 5223, host: "foo", }); - t.deepEqual(ConnectionTLS.prototype.socketParameters("xmpps://foo:1234"), { + expect(ConnectionTLS.prototype.socketParameters("xmpps://foo:1234")).toEqual({ port: 1234, host: "foo", }); - t.deepEqual( - ConnectionTLS.prototype.socketParameters("xmpp://foo"), - undefined, - ); + expect(ConnectionTLS.prototype.socketParameters("xmpp://foo")).toEqual(undefined); - t.deepEqual( - ConnectionTLS.prototype.socketParameters("xmpp://foo:1234"), - undefined, - ); + expect(ConnectionTLS.prototype.socketParameters("xmpp://foo:1234")).toEqual(undefined); }); -test("rejects expired certificates", async (t) => { +test("rejects expired certificates", async () => { const options = { key: `-----BEGIN PRIVATE KEY----- MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDSyWGs4hf07dd5 @@ -92,13 +85,13 @@ NebQHyTBqa5P7vjSioiWiSRCNOIL4HywMWtN/nZVk0cl8zwlLtMaGt9Tz7ty2OgL conn.connect(`xmpps://localhost:${server.address().port}`).catch(() => {}); const error = await promise(conn, "error"); - t.is(error.message, "certificate has expired"); + expect(error.message).toBe("certificate has expired"); await conn.close().catch(() => {}); server.close(); }); -test("rejects self signed certificates", async (t) => { +test("rejects self signed certificates", async () => { const attrs = [{ name: "commonName", value: "localhost" }]; const pem = selfsigned.generate(attrs, { days: 365, @@ -113,13 +106,13 @@ test("rejects self signed certificates", async (t) => { conn.connect(`xmpps://localhost:${server.address().port}`).catch(() => {}); const error = await promise(conn, "error"); - t.is(error.code, "DEPTH_ZERO_SELF_SIGNED_CERT"); + expect(error.code).toBe("DEPTH_ZERO_SELF_SIGNED_CERT"); await conn.close().catch(() => {}); server.close(); }); -test("waits before emitting connect on tls 1.3", async (t) => { +test("waits before emitting connect on tls 1.3", async () => { const key = `-----BEGIN PRIVATE KEY----- MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDGMXUuq7NZXEt6 fiSSkfTGuXHdpMbM/Bn4YVwaNrEmW0I8ZpROHQsEPo6AA/Dz5XM6zkXc+HZoxVfg @@ -205,17 +198,17 @@ yA== await promise(conn.socket.socket, "secureConnect"); // If connect was emitted immeditaly after secureConnect this would be true - t.is(connect_emitted_on_conn_socket, false); + expect(connect_emitted_on_conn_socket).toBe(false); // Now let's wait for connect to resolve // and assert the right protocol is used await promiseConnect; - t.is(conn.socket.socket.getProtocol(), "TLSv1.3"); + expect(conn.socket.socket.getProtocol()).toBe("TLSv1.3"); // If the previous assertion is false and this one is true // it means `connect` was triggered asynchronously after secureConnect // which is what we want as it delays the sending of the stream header (conn.open) - t.is(connect_emitted_on_conn_socket, true); + expect(connect_emitted_on_conn_socket).toBe(true); await conn.close().catch(() => {}); server.close(); diff --git a/packages/uri/test.js b/packages/uri/test.js index 5cd47903b..5dab6ab14 100644 --- a/packages/uri/test.js +++ b/packages/uri/test.js @@ -1,53 +1,46 @@ "use strict"; -const test = require("ava"); const { parse } = require("."); const jid = require("@xmpp/jid"); -test("parse", (t) => { - t.deepEqual( - parse( - "xmpp://guest@example.com/support@example.com/truc?message;subject=Hello%20World", - ), - { - authority: jid("guest@example.com"), - path: jid("support@example.com/truc"), - query: { - type: "message", - params: { - subject: "Hello World", - }, +test("parse", () => { + expect(parse( + "xmpp://guest@example.com/support@example.com/truc?message;subject=Hello%20World", + )).toEqual({ + authority: jid("guest@example.com"), + path: jid("support@example.com/truc"), + query: { + type: "message", + params: { + subject: "Hello World", }, }, - ); + }); - t.deepEqual(jid("foobar"), jid("foobar")); + expect(jid("foobar")).toEqual(jid("foobar")); - t.deepEqual( - parse( - "xmpp:support@example.com/truc?message;subject=Hello%20World;body=foobar", - ), - { - path: jid("support@example.com/truc"), - query: { - type: "message", - params: { - subject: "Hello World", - body: "foobar", - }, + expect(parse( + "xmpp:support@example.com/truc?message;subject=Hello%20World;body=foobar", + )).toEqual({ + path: jid("support@example.com/truc"), + query: { + type: "message", + params: { + subject: "Hello World", + body: "foobar", }, }, - ); + }); - t.deepEqual(parse("xmpp:support@example.com/truc"), { + expect(parse("xmpp:support@example.com/truc")).toEqual({ path: jid("support@example.com/truc"), }); - t.deepEqual(parse("xmpp:support@example.com/"), { + expect(parse("xmpp:support@example.com/")).toEqual({ path: jid("support@example.com/"), }); - t.deepEqual(parse("xmpp:support@example.com/?foo"), { + expect(parse("xmpp:support@example.com/?foo")).toEqual({ path: jid("support@example.com/"), query: { type: "foo", @@ -55,7 +48,7 @@ test("parse", (t) => { }, }); - t.deepEqual(parse("xmpp:support@example.com?foo"), { + expect(parse("xmpp:support@example.com?foo")).toEqual({ path: jid("support@example.com"), query: { type: "foo", diff --git a/packages/websocket/test/FramedParser.js b/packages/websocket/test/FramedParser.js index 371480e4c..c906417a9 100644 --- a/packages/websocket/test/FramedParser.js +++ b/packages/websocket/test/FramedParser.js @@ -1,25 +1,24 @@ "use strict"; -const test = require("ava"); const Parser = require("../lib/FramedParser"); -test.cb("framed parser", (t) => { +test("framed parser", done => { const parser = new Parser(); - t.plan(4); + expect.assertions(4); parser.on("start", (el) => { - t.is(el.toString(), ''); + expect(el.toString()).toBe(''); }); parser.on("element", (el) => { - t.is(el.parent, null); - t.is(el.toString(), "hello"); + expect(el.parent).toBe(null); + expect(el.toString()).toBe("hello"); }); parser.on("end", (el) => { - t.is(el.toString(), ''); - t.end(); + expect(el.toString()).toBe(''); + done(); }); parser.write( diff --git a/packages/websocket/test/test.js b/packages/websocket/test/test.js index a8f264953..9c22532c9 100644 --- a/packages/websocket/test/test.js +++ b/packages/websocket/test/test.js @@ -1,36 +1,35 @@ "use strict"; -const test = require("ava"); const ConnectionWebSocket = require("../lib/Connection"); const Socket = require("../lib/Socket"); const EventEmitter = require("events"); const xml = require("@xmpp/xml"); -test("send() adds jabber:client xmlns", (t) => { +test("send() adds jabber:client xmlns", () => { const connection = new ConnectionWebSocket(); connection.write = () => {}; const element = xml("presence"); - t.is(element.attrs.xmlns, undefined); + expect(element.attrs.xmlns).toBe(undefined); connection.send(element); - t.is(element.attrs.xmlns, "jabber:client"); + expect(element.attrs.xmlns).toBe("jabber:client"); }); -test("socketParameters()", (t) => { +test("socketParameters()", () => { let params; params = ConnectionWebSocket.prototype.socketParameters("ws://foo"); - t.is(params, "ws://foo"); + expect(params).toBe("ws://foo"); params = ConnectionWebSocket.prototype.socketParameters("wss://foo"); - t.is(params, "wss://foo"); + expect(params).toBe("wss://foo"); params = ConnectionWebSocket.prototype.socketParameters("http://foo"); - t.is(params, undefined); + expect(params).toBe(undefined); }); -test("DOM WebSocket error", (t) => { +test("DOM WebSocket error", () => { const socket = new Socket(); const sock = new EventEmitter(); sock.addEventListener = sock.addListener; @@ -38,16 +37,16 @@ test("DOM WebSocket error", (t) => { socket.url = "ws://foobar"; const evt = {}; socket.on("error", (err) => { - t.is(err.message, "WebSocket ECONNERROR ws://foobar"); - t.is(err.errno, "ECONNERROR"); - t.is(err.code, "ECONNERROR"); - t.is(err.url, "ws://foobar"); - t.is(err.event, evt); + expect(err.message).toBe("WebSocket ECONNERROR ws://foobar"); + expect(err.errno).toBe("ECONNERROR"); + expect(err.code).toBe("ECONNERROR"); + expect(err.url).toBe("ws://foobar"); + expect(err.event).toBe(evt); }); socket.socket.emit("error", evt); }); -test("WS WebSocket error", (t) => { +test("WS WebSocket error", () => { const socket = new Socket(); const sock = new EventEmitter(); sock.addEventListener = sock.addListener; @@ -56,43 +55,43 @@ test("WS WebSocket error", (t) => { const error = {}; const evt = { error }; socket.on("error", (err) => { - t.is(err, error); - t.is(err.event, evt); - t.is(err.url, "ws://foobar"); + expect(err).toBe(error); + expect(err.event).toBe(evt); + expect(err.url).toBe("ws://foobar"); }); socket.socket.emit("error", evt); }); -test("socket close", (t) => { - t.plan(3); +test("socket close", () => { + expect.assertions(3); const socket = new Socket(); + const spy_detachSocket = jest.spyOn(socket, "_detachSocket"); + const sock = new EventEmitter(); sock.addEventListener = sock.addListener; sock.removeEventListener = sock.removeListener; socket._attachSocket(sock); const evt = { wasClean: false }; socket.on("close", (clean, event) => { - t.is(clean, true); - t.is(evt, event); + expect(clean).toBe(true); + expect(evt).toBe(event); + expect(spy_detachSocket).toHaveBeenCalled(); }); - socket._detachSocket = () => { - t.pass(); - }; socket.socket.emit("close", evt); }); -test("sendMany", async (t) => { - t.plan(2); +test("sendMany", async () => { const conn = new ConnectionWebSocket(); - conn.root = xml("root"); const foo = xml("foo"); const bar = xml("bar"); - conn.send = () => { - t.pass(); - }; + const spy_send = (conn.send = jest.fn()); await conn.sendMany([foo, bar]); + + expect(spy_send).toHaveBeenCalledWith(foo); + expect(spy_send).toHaveBeenCalledWith(bar); + expect(spy_send).toHaveBeenCalledTimes(2); }); diff --git a/packages/xml/test/Parser.js b/packages/xml/test/Parser.js index 520b8d773..eca7891ed 100644 --- a/packages/xml/test/Parser.js +++ b/packages/xml/test/Parser.js @@ -1,29 +1,28 @@ "use strict"; -const test = require("ava"); const Parser = require("../lib/Parser"); -test.cb("stream parser", (t) => { +test("stream parser", (done) => { const parser = new Parser(); - t.plan(5); + expect.assertions(5); let startElement; parser.on("start", (el) => { - t.is(el.toString(), ""); + expect(el.toString()).toBe(""); startElement = el; }); parser.on("element", (el) => { - t.is(el.parent, startElement); - t.is(startElement.children.length, 0); - t.is(el.toString(), "hello"); + expect(el.parent).toBe(startElement); + expect(startElement.children).toHaveLength(0); + expect(el.toString()).toBe("hello"); }); parser.on("end", (el) => { - t.is(el.toString(), ""); - t.end(); + expect(el.toString()).toBe(""); + done(); }); parser.write("hello"); diff --git a/packages/xml/test/xml.js b/packages/xml/test/xml.js index 9f4b8c903..083f09d13 100644 --- a/packages/xml/test/xml.js +++ b/packages/xml/test/xml.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const xml = require(".."); const createElement = require("ltx/lib/createElement.js"); const Element = require("ltx/lib/Element.js"); @@ -12,21 +11,21 @@ const { unescapeXMLText, } = require("ltx/lib/escape.js"); -test("exports createElement", (t) => { - t.is(xml.createElement, createElement); +test("exports createElement", () => { + expect(xml.createElement).toBe(createElement); }); -test("exports Parser", (t) => { - t.is(xml.Parser, Parser); +test("exports Parser", () => { + expect(xml.Parser).toBe(Parser); }); -test("exports Element", (t) => { - t.is(xml.Element, Element); +test("exports Element", () => { + expect(xml.Element).toBe(Element); }); -test("exports escape methods", (t) => { - t.is(xml.escapeXML, escapeXML); - t.is(xml.unescapeXML, unescapeXML); - t.is(xml.escapeXMLText, escapeXMLText); - t.is(xml.unescapeXMLText, unescapeXMLText); +test("exports escape methods", () => { + expect(xml.escapeXML).toBe(escapeXML); + expect(xml.unescapeXML).toBe(unescapeXML); + expect(xml.escapeXMLText).toBe(escapeXMLText); + expect(xml.unescapeXMLText).toBe(unescapeXMLText); }); diff --git a/packages/xmpp.js/test.js b/packages/xmpp.js/test.js index 58f216694..c822e8002 100644 --- a/packages/xmpp.js/test.js +++ b/packages/xmpp.js/test.js @@ -1,7 +1,5 @@ "use strict"; -const test = require("ava"); - const fs = require("fs"); const path = require("path"); @@ -11,19 +9,16 @@ const packages = Object.fromEntries( // For some reason there's a "*" file on travis .filter((p) => !["*"].includes(p) && !p.includes(".")) .map((dirname) => { - const { name, version } = require(path.join( - __dirname, - "..", - dirname, - "package.json", - )); + const { name, version } = require( + path.join(__dirname, "..", dirname, "package.json"), + ); return [name, `^${version}`]; }), ); const { dependencies } = require("./package.json"); -test("depends on all other packages", (t) => { - t.is(Object.keys(dependencies).length, Object.keys(packages).length); - t.deepEqual(dependencies, packages); +test("depends on all other packages", () => { + expect(Object.keys(dependencies)).toHaveLength(Object.keys(packages).length); + expect(dependencies).toEqual(packages); }); diff --git a/test/browser.js b/test/browser.js index e3fe36e9e..6323e7d49 100644 --- a/test/browser.js +++ b/test/browser.js @@ -4,13 +4,10 @@ const { JSDOM } = require("jsdom"); const fetch = require("node-fetch"); const { readFileSync } = require("fs"); -const test = require("ava"); const { jid } = require("../packages/client"); const debug = require("../packages/debug"); const server = require("../server"); -process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; - const username = "client"; const password = "foobar"; const credentials = { username, password }; @@ -22,24 +19,30 @@ const xmppjs = readFileSync("./packages/client/dist/xmpp.js", { encoding: "utf8", }); -test.beforeEach((t) => { - const { window } = new JSDOM(``, { runScripts: "dangerously" }); +let window; +let xmpp; + +beforeEach(async () => { + ({ window } = new JSDOM(``, { runScripts: "dangerously" })); window.fetch = fetch; const { document } = window; const scriptEl = document.createElement("script"); scriptEl.textContent = xmppjs; document.body.append(scriptEl); - t.context = window.XMPP.client; - return server.restart(); + await server.restart(); +}); + +afterEach(async () => { + await xmpp?.stop(); }); -test.serial("client ws://", async (t) => { - const xmpp = t.context({ +test("client ws://", async () => { + xmpp = window.XMPP.client({ credentials, service, }); debug(xmpp); const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); diff --git a/test/client.js b/test/client.js index a4790f45e..31f5d3fbc 100644 --- a/test/client.js +++ b/test/client.js @@ -1,57 +1,53 @@ "use strict"; -const test = require("ava"); const { client, xml, jid } = require("../packages/client"); const debug = require("../packages/debug"); const server = require("../server"); -process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; - const username = "client"; const password = "foobar"; const credentials = { username, password }; const domain = "localhost"; const JID = jid(username, domain).toString(); -test.beforeEach(() => { - return server.restart(); +let xmpp; + +beforeEach(async () => { + await server.restart(); }); -test.afterEach((t) => { - if (t.context.xmpp && t.context.xmpp.status === "online") { - return t.context.xmpp.stop(); - } +afterEach(async () => { + await xmpp?.stop(); }); -test.serial("client", async (t) => { - t.plan(6); +test("client", async () => { + expect.assertions(6); - const xmpp = client({ credentials, service: domain }); - t.context.xmpp = xmpp; + xmpp = client({ credentials, service: domain }); debug(xmpp); xmpp.on("connect", () => { - t.pass(); + expect().pass(); }); xmpp.once("open", (el) => { - t.true(el instanceof xml.Element); + expect(el instanceof xml.Element).toBe(true); }); xmpp.on("online", (address) => { - t.true(address instanceof jid.JID); - t.is(address.bare().toString(), JID); + expect(address instanceof jid.JID).toBe(true); + expect(address.bare().toString()).toBe(JID); }); const address = await xmpp.start(); - t.true(address instanceof jid.JID); - t.is(address.bare().toString(), JID); + expect(address instanceof jid.JID).toBe(true); + expect(address.bare().toString()).toBe(JID); }); -test.serial.cb("bad credentials", (t) => { - t.plan(6); +test("bad credentials", async () => { + expect.assertions(6); - const xmpp = client({ + xmpp = client({ service: domain, credentials: { ...credentials, password: "nope" }, }); @@ -59,253 +55,238 @@ test.serial.cb("bad credentials", (t) => { let error; - xmpp.on("connect", () => t.pass()); - xmpp.once("open", () => t.pass()); + xmpp.on("connect", () => { + expect().pass(); + }); + xmpp.once("open", () => { + expect().pass(); + }); - xmpp.on("online", () => t.fail()); + xmpp.on("online", () => { + expect().fail(); + }); xmpp.on("error", (err) => { - t.true(err instanceof Error); - t.is(err.name, "SASLError"); - t.is(err.condition, "not-authorized"); + expect(err).toBeInstanceOf(Error); + expect(err.name).toBe("SASLError"); + expect(err.condition).toBe("not-authorized"); error = err; }); - xmpp - .start() - .then(() => t.fail()) - .catch((err) => { - t.is(err, error); - t.end(); - }); - - t.context.xmpp = xmpp; + await expect(xmpp.start()).rejects.toThrow(error); }); -test.serial.cb("reconnects when server restarts gracefully", (t) => { - t.plan(2); +test("reconnects when server restarts gracefully", (done) => { + expect.assertions(2); let c = 0; - const xmpp = client({ credentials, service: domain }); + xmpp = client({ credentials, service: domain }); debug(xmpp); xmpp.on("error", () => {}); xmpp.on("online", async () => { c++; - t.pass(); + expect().pass(); if (c === 2) { await xmpp.stop(); - t.end(); + done(); } else { await server.restart(); } }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test.serial.cb("reconnects when server restarts non-gracefully", (t) => { - t.plan(2); +test("reconnects when server restarts non-gracefully", (done) => { + expect.assertions(2); let c = 0; - const xmpp = client({ credentials, service: domain }); + xmpp = client({ credentials, service: domain }); debug(xmpp); xmpp.on("error", () => {}); xmpp.on("online", async () => { c++; - t.pass(); + expect().pass(); if (c === 2) { await xmpp.stop(); - t.end(); + done(); } else { await server.restart("SIGKILL"); } }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test.serial.cb("does not reconnect when stop is called", (t) => { - t.plan(2); +test("does not reconnect when stop is called", (done) => { + expect.assertions(2); - const xmpp = client({ service: domain, credentials }); + xmpp = client({ service: domain, credentials }); debug(xmpp); xmpp.on("online", async () => { await xmpp.stop(); server.stop(); - t.end(); + done(); }); - xmpp.on("close", () => t.pass()); + xmpp.on("close", () => { + expect().pass(); + }); - xmpp.on("offline", () => t.pass()); + xmpp.on("offline", () => { + expect().pass(); + }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test.serial.cb("anonymous authentication", (t) => { - t.plan(2); +test("anonymous authentication", (done) => { + expect.assertions(2); - const xmpp = client({ service: domain, domain: "anon." + domain }); + xmpp = client({ service: domain, domain: "anon." + domain }); debug(xmpp); xmpp.on("online", async () => { await xmpp.stop(); await server.stop(); - t.end(); + done(); }); - xmpp.on("close", () => t.pass()); + xmpp.on("close", () => { + expect().pass(); + }); - xmpp.on("offline", () => t.pass()); + xmpp.on("offline", () => { + expect().pass(); + }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test.serial("auto", async (t) => { - const xmpp = client({ credentials, service: domain }); +test("auto", async () => { + xmpp = client({ credentials, service: domain }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("ws IPv4", async (t) => { - const xmpp = client({ +test("ws IPv4", async () => { + xmpp = client({ credentials, service: "ws://127.0.0.1:5280/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("ws IPv6", async (t) => { - const xmpp = client({ +test("ws IPv6", async () => { + xmpp = client({ credentials, service: "ws://[::1]:5280/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("ws domain", async (t) => { - const xmpp = client({ +test("ws domain", async () => { + xmpp = client({ credentials, service: "ws://localhost:5280/xmpp-websocket", }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); // Prosody 404 https://prosody.im/issues/issue/932 -test.serial("wss IPv4", async (t) => { - const xmpp = client({ +test("wss IPv4", async () => { + xmpp = client({ credentials, service: "wss://127.0.0.1:5281/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); // Prosody 404 https://prosody.im/issues/issue/932 -test.serial("wss IPv6", async (t) => { - const xmpp = client({ +test("wss IPv6", async () => { + xmpp = client({ credentials, service: "wss://[::1]:5281/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("wss domain", async (t) => { - const xmpp = client({ +test("wss domain", async () => { + xmpp = client({ credentials, service: "wss://localhost:5281/xmpp-websocket", }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("xmpp IPv4", async (t) => { - const xmpp = client({ +test("xmpp IPv4", async () => { + xmpp = client({ credentials, service: "xmpp://127.0.0.1:5222", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("xmpp IPv6", async (t) => { - const xmpp = client({ credentials, service: "xmpp://[::1]:5222", domain }); +test("xmpp IPv6", async () => { + xmpp = client({ credentials, service: "xmpp://[::1]:5222", domain }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("xmpp domain", async (t) => { - const xmpp = client({ credentials, service: "xmpp://localhost:5222" }); +test("xmpp domain", async () => { + xmpp = client({ credentials, service: "xmpp://localhost:5222" }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("xmpps IPv4", async (t) => { - const xmpp = client({ +test("xmpps IPv4", async () => { + xmpp = client({ credentials, service: "xmpps://127.0.0.1:5223", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("xmpps IPv6", async (t) => { - const xmpp = client({ credentials, service: "xmpps://[::1]:5223", domain }); +test("xmpps IPv6", async () => { + xmpp = client({ credentials, service: "xmpps://[::1]:5223", domain }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); -test.serial("xmpps domain", async (t) => { - const xmpp = client({ credentials, service: "xmpps://localhost:5223" }); +test("xmpps domain", async () => { + xmpp = client({ credentials, service: "xmpps://localhost:5223" }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); diff --git a/test/component.js b/test/component.js index ed5e465aa..54a612adb 100644 --- a/test/component.js +++ b/test/component.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const { component, xml, jid } = require("../packages/component"); const debug = require("../packages/debug"); const server = require("../server"); @@ -10,85 +9,77 @@ const service = "xmpp://localhost:5347"; const domain = "component.localhost"; const options = { password, service, domain }; -test.beforeEach(() => { +let xmpp; + +beforeEach(() => { + xmpp = component(options); + debug(xmpp); return server.restart(); }); -test.afterEach((t) => { - if (t.context.xmpp) { - return t.context.xmpp.stop(); - } +afterEach(async () => { + await xmpp?.stop(); }); -test.serial("component", async (t) => { - t.plan(6); - - const xmpp = component(options); - t.context.xmpp = xmpp; - debug(xmpp); +test("component", async () => { + expect.assertions(6); xmpp.on("connect", () => { - t.pass(); + expect().pass(); }); xmpp.on("open", (el) => { - t.true(el instanceof xml.Element); + expect(el instanceof xml.Element).toBe(true); }); xmpp.on("online", (id) => { - t.true(id instanceof jid.JID); - t.is(id.toString(), "component.localhost"); + expect(id instanceof jid.JID).toBe(true); + expect(id.toString()).toBe("component.localhost"); }); const id = await xmpp.start(); - t.true(id instanceof jid.JID); - t.is(id.toString(), "component.localhost"); + expect(id instanceof jid.JID).toBe(true); + expect(id.toString()).toBe("component.localhost"); await xmpp.stop; }); -test.serial.cb("reconnects when server restarts", (t) => { - t.plan(2); +test("reconnects when server restarts", (done) => { + expect.assertions(2); let c = 0; - const xmpp = component(options); - debug(xmpp); - xmpp.on("error", () => {}); xmpp.on("online", async () => { c++; - t.pass(); + expect().pass(); if (c === 2) { await xmpp.stop(); - t.end(); + done(); } else { server.restart(); } }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test.serial.cb("does not reconnect when stop is called", (t) => { - t.plan(2); - - const xmpp = component(options); - debug(xmpp); +test("does not reconnect when stop is called", (done) => { + expect.assertions(2); xmpp.on("online", async () => { await xmpp.stop(); await server.stop(); - t.end(); + done(); }); - xmpp.on("close", () => t.pass()); + xmpp.on("close", () => { + expect().pass(); + }); - xmpp.on("offline", () => t.pass()); + xmpp.on("offline", () => { + expect().pass(); + }); xmpp.start(); - - t.context.xmpp = xmpp; }); diff --git a/test/see-other-host.js b/test/see-other-host.js index 61d9c000d..0348b5951 100644 --- a/test/see-other-host.js +++ b/test/see-other-host.js @@ -1,29 +1,26 @@ "use strict"; -const test = require("ava"); const { client, jid } = require("../packages/client"); const debug = require("../packages/debug"); const server = require("../server"); -process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; - const username = "client"; const password = "foobar"; const credentials = { username, password }; const domain = "localhost"; const JID = jid(username, domain).toString(); -test.beforeEach(() => { +let xmpp; + +beforeEach(() => { return server.restart(); }); -test.afterEach((t) => { - if (t.context.xmpp && t.context.xmpp.status === "online") { - return t.context.xmpp.stop(); - } +afterEach(async () => { + await xmpp?.stop(); }); -test.serial("see-other-host", async (t) => { +test("see-other-host", async () => { const net = require("net"); const Connection = require("../packages/connection-tcp"); const { promise } = require("../packages/events"); @@ -46,9 +43,8 @@ test.serial("see-other-host", async (t) => { seeOtherHostServer.listen(5486); await promise(seeOtherHostServer, "listening"); - const xmpp = client({ credentials, service: "xmpp://localhost:5486" }); + xmpp = client({ credentials, service: "xmpp://localhost:5486" }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); });