From bb59083cd670c185afac011f233ef968e32d2db2 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 11:37:48 +0100 Subject: [PATCH 01/17] Move to ESM --- Makefile | 2 +- ava.config.js | 43 +- babel.config.cjs | 33 + babel.config.js | 20 - bundle.cjs | 45 + bundle.js | 40 - eslint.config.mjs => eslint.config.js | 6 +- package-lock.json | 1689 +++++++++---------- package.json | 8 +- packages/base64/package.json | 1 + packages/client-core/package.json | 1 + packages/client/browser.js | 37 +- packages/client/example.js | 8 +- packages/client/index.js | 45 +- packages/client/lib/getDomain.js | 6 +- packages/client/package.json | 1 + packages/client/react-native.js | 37 +- packages/client/test/getDomain.js | 6 +- packages/component-core/package.json | 1 + packages/component/package.json | 1 + packages/connection-tcp/package.json | 1 + packages/connection/package.json | 1 + packages/debug/package.json | 1 + packages/error/package.json | 1 + packages/events/package.json | 1 + packages/id/package.json | 1 + packages/iq/package.json | 1 + packages/jid/package.json | 1 + packages/middleware/package.json | 1 + packages/reconnect/package.json | 1 + packages/resolve/package.json | 1 + packages/resource-binding/package.json | 1 + packages/sasl-anonymous/package.json | 1 + packages/sasl-plain/package.json | 1 + packages/sasl-scram-sha-1/package.json | 1 + packages/sasl/package.json | 1 + packages/session-establishment/package.json | 1 + packages/starttls/package.json | 1 + packages/stream-features/package.json | 1 + packages/stream-management/package.json | 1 + packages/tcp/package.json | 1 + packages/test/package.json | 1 + packages/time/package.json | 1 + packages/tls/package.json | 1 + packages/uri/package.json | 1 + packages/websocket/package.json | 1 + packages/xml/package.json | 1 + packages/xmpp.js/package.json | 1 + prettier.config.js | 4 +- 49 files changed, 970 insertions(+), 1092 deletions(-) create mode 100644 babel.config.cjs delete mode 100644 babel.config.js create mode 100755 bundle.cjs delete mode 100755 bundle.js rename eslint.config.mjs => eslint.config.js (95%) diff --git a/Makefile b/Makefile index 61388dbab..75c3748db 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ bundlesize: ./node_modules/.bin/bundlesize bundle: - node bundle.js + node bundle.cjs size: make bundle diff --git a/ava.config.js b/ava.config.js index 5e725f616..f53eb169b 100644 --- a/ava.config.js +++ b/ava.config.js @@ -1,25 +1,26 @@ 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", - }, - ], - ], - }, - }, + // babel: { + // testOptions: { + // babelrc: false, + // plugins: [ + // [ + // "@babel/plugin-transform-react-jsx", + // { + // pragma: "xml", + // throwIfNamespace: false, + // }, + // ], + // [ + // "babel-plugin-jsx-pragmatic", + // { + // module: "@xmpp/xml", + // import: "xml", + // }, + // ], + // ], + // }, + // }, + // nodeArguments: ["--loader=babel-register-esm"], files: [ "packages/**/test.js", "packages/**/test/*.js", diff --git a/babel.config.cjs b/babel.config.cjs new file mode 100644 index 000000000..1e862e36d --- /dev/null +++ b/babel.config.cjs @@ -0,0 +1,33 @@ +module.exports = { + presets: [ + [ + "@babel/preset-env", + { + targets: { + ie: "11", + }, + loose: true, + }, + ], + ], + plugins: [ + "@babel/plugin-transform-runtime", + "babel-plugin-transform-async-to-promises", + "@babel/plugin-proposal-object-rest-spread", + + // [ + // "@babel/plugin-transform-react-jsx", + // { + // pragma: "xml", + // throwIfNamespace: false, + // }, + // ], + // [ + // "babel-plugin-jsx-pragmatic", + // { + // module: "@xmpp/xml", + // import: "xml", + // }, + // ], + ], +}; diff --git a/babel.config.js b/babel.config.js deleted file mode 100644 index c705ac4e8..000000000 --- a/babel.config.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -module.exports = { - presets: [ - [ - "@babel/preset-env", - { - targets: { - ie: "10", - }, - loose: true, - }, - ], - ], - plugins: [ - "@babel/plugin-transform-runtime", - "babel-plugin-transform-async-to-promises", - "@babel/plugin-proposal-object-rest-spread", - ], -}; diff --git a/bundle.cjs b/bundle.cjs new file mode 100755 index 000000000..0b6f3a559 --- /dev/null +++ b/bundle.cjs @@ -0,0 +1,45 @@ +#!/usr/bin/env node + +/* eslint-disable no-console */ + +"use strict"; + +const fs = require("fs"); +const path = require("path"); +const browserify = require("browserify"); +const commonShake = require("common-shakeify"); +const packFlat = require("browser-pack-flat"); +const exorcist = require("exorcist"); +const { minify } = require("uglify-js"); + +const dist = path.join(__dirname, "packages/client/dist"); + +browserify(path.join(__dirname, "packages/client/"), { + debug: true, + standalone: "XMPP", +}) + .transform("babelify", { global: true }) + .plugin(commonShake) + .plugin(packFlat) + // .on('dep', dep => { + // console.log(dep.file) + // }) + .bundle() + .pipe(exorcist(path.join(dist, "xmpp.js.map"))) + .pipe(fs.createWriteStream(path.join(dist, "xmpp.js"))) + .on("finish", () => { + const bundled = fs.readFileSync(path.join(dist, "xmpp.js")).toString(); + const sourceMap = fs + .readFileSync(path.join(dist, "xmpp.js.map")) + .toString(); + const { code, map, error } = minify(bundled, { + sourceMap: { + content: sourceMap, + url: "xmpp.min.js.map", + filename: "xmpp.min.js", + }, + }); + if (error) return console.error(error); + fs.writeFileSync(path.join(dist, "xmpp.min.js"), code); + fs.writeFileSync(path.join(dist, "xmpp.min.js.map"), map); + }); diff --git a/bundle.js b/bundle.js deleted file mode 100755 index 2a35ef659..000000000 --- a/bundle.js +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env node - -/* eslint-disable no-console */ - -'use strict' // eslint-disable-line node/shebang - -const fs = require('fs') -const path = require('path') -const browserify = require('browserify') -const commonShake = require('common-shakeify') -const packFlat = require('browser-pack-flat') -const exorcist = require('exorcist') -const {minify} = require('uglify-js') - -const dist = path.join(__dirname, 'packages/client/dist') - -browserify(path.join(__dirname, 'packages/client/'), {debug: true, standalone: 'XMPP'}) - .transform('babelify', {global: true}) - .plugin(commonShake) - .plugin(packFlat) - // .on('dep', dep => { - // console.log(dep.file) - // }) - .bundle() - .pipe(exorcist(path.join(dist, 'xmpp.js.map'))) - .pipe(fs.createWriteStream(path.join(dist, 'xmpp.js'))) - .on('finish', () => { - const bundled = fs.readFileSync(path.join(dist, 'xmpp.js')).toString() - const sourceMap = fs.readFileSync(path.join(dist, 'xmpp.js.map')).toString() - const {code, map, error} = minify(bundled, { - sourceMap: { - content: sourceMap, - url: 'xmpp.min.js.map', - filename: 'xmpp.min.js', - }, - }) - if (error) return console.error(error) - fs.writeFileSync(path.join(dist, 'xmpp.min.js'), code) - fs.writeFileSync(path.join(dist, 'xmpp.min.js.map'), map) - }) diff --git a/eslint.config.mjs b/eslint.config.js similarity index 95% rename from eslint.config.mjs rename to eslint.config.js index 9f73dd2b7..8b9f855f6 100644 --- a/eslint.config.mjs +++ b/eslint.config.js @@ -32,7 +32,7 @@ export default [ jsx: true, }, }, - sourceType: "script", + sourceType: "module", }, rules: { @@ -65,6 +65,10 @@ export default [ "error", { allowModules: ["ava", "sinon", "@xmpp/test"] }, ], + "n/no-extraneous-import": [ + "error", + { allowModules: ["ava", "sinon", "@xmpp/test"] }, + ], // promise // https://github.com/xjamundx/eslint-plugin-promise diff --git a/package-lock.json b/package-lock.json index 0ee1d65fd..8a47cfefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,9 +18,10 @@ "@babel/plugin-transform-runtime": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", - "ava": "^3.15.0", + "ava": "^4.3.3", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", + "babel-register-esm": "^1.2.5", "babelify": "^10.0.0", "babylon": "^6.18.0", "browser-pack-flat": "^3.5.0", @@ -272,7 +273,8 @@ }, "node_modules/@babel/core": { "version": "7.26.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.26.0", @@ -1852,25 +1854,6 @@ "node": ">=6.9.0" } }, - "node_modules/@concordance/react": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@emnapi/core": { "version": "1.3.1", "dev": true, @@ -2374,20 +2357,6 @@ "dev": true, "license": "Python-2.0" }, - "node_modules/@lerna/create/node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/@lerna/create/node_modules/cliui": { "version": "8.0.1", "dev": true, @@ -3601,14 +3570,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "dev": true, @@ -3648,17 +3609,6 @@ "dev": true, "license": "(Unlicense OR Apache-2.0)" }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "dev": true, @@ -3968,9 +3918,13 @@ } }, "node_modules/acorn-walk": { - "version": "8.1.1", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "dev": true, - "license": "MIT", + "dependencies": { + "acorn": "^8.11.0" + }, "engines": { "node": ">=0.4.0" } @@ -4015,14 +3969,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-align": { - "version": "3.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.1.0" - } - }, "node_modules/ansi-colors": { "version": "4.1.3", "dev": true, @@ -4186,14 +4132,6 @@ "inherits": "2.0.1" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/async": { "version": "3.2.6", "dev": true, @@ -4205,227 +4143,585 @@ "license": "MIT" }, "node_modules/ava": { - "version": "3.15.0", + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/ava/-/ava-4.3.3.tgz", + "integrity": "sha512-9Egq/d9R74ExrWohHeqUlexjDbgZJX5jA1Wq4KCTqc3wIfpGEK79zVy4rBtofJ9YKIxs4PzhJ8BgbW5PlAYe6w==", "dev": true, - "license": "MIT", "dependencies": { - "@concordance/react": "^2.0.0", - "acorn": "^8.0.4", - "acorn-walk": "^8.0.0", - "ansi-styles": "^5.0.0", + "acorn": "^8.7.1", + "acorn-walk": "^8.2.0", + "ansi-styles": "^6.1.0", "arrgv": "^1.0.2", - "arrify": "^2.0.1", - "callsites": "^3.1.0", - "chalk": "^4.1.0", - "chokidar": "^3.4.3", + "arrify": "^3.0.0", + "callsites": "^4.0.0", + "cbor": "^8.1.0", + "chalk": "^5.0.1", + "chokidar": "^3.5.3", "chunkd": "^2.0.1", - "ci-info": "^2.0.0", + "ci-info": "^3.3.1", "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", + "cli-truncate": "^3.1.0", + "code-excerpt": "^4.0.0", "common-path-prefix": "^3.0.0", - "concordance": "^5.0.1", - "convert-source-map": "^1.7.0", + "concordance": "^5.0.4", "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", + "debug": "^4.3.4", + "del": "^6.1.1", + "emittery": "^0.11.0", + "figures": "^4.0.1", + "globby": "^13.1.1", + "ignore-by-default": "^2.1.0", + "indent-string": "^5.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", + "matcher": "^5.0.0", + "mem": "^9.0.2", "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", + "p-event": "^5.0.1", + "p-map": "^5.4.0", + "picomatch": "^2.3.1", + "pkg-conf": "^4.0.0", + "plur": "^5.1.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", + "stack-utils": "^2.0.5", + "strip-ansi": "^7.0.1", + "supertap": "^3.0.1", "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" + "write-file-atomic": "^4.0.1", + "yargs": "^17.5.1" }, "bin": { - "ava": "cli.js" + "ava": "entrypoints/cli.mjs" }, "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0 <15 || >=15" + "node": ">=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=18" + }, + "peerDependencies": { + "@ava/typescript": "*" + }, + "peerDependenciesMeta": { + "@ava/typescript": { + "optional": true + } } }, - "node_modules/ava/node_modules/chalk": { - "version": "4.1.2", + "node_modules/ava/node_modules/aggregate-error": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", + "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", "dev": true, - "license": "MIT", "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "clean-stack": "^4.0.0", + "indent-string": "^5.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ava/node_modules/chalk/node_modules/ansi-styles": { - "version": "4.3.0", + "node_modules/ava/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", - "dependencies": { - "color-convert": "^2.0.1" + "engines": { + "node": ">=12" }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ava/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, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/available-typed-arrays": { - "version": "1.0.4", + "node_modules/ava/node_modules/arrify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", + "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 0.4" + "node": ">=12" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/axios": { - "version": "1.7.9", + "node_modules/ava/node_modules/callsites": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.2.0.tgz", + "integrity": "sha512-kfzR4zzQtAE9PC7CzZsjl3aBNbXWuXiSeOCdLcPpBfGW8YuCqQHcRPFDbr/BPVmd3EEPVpuFzLyuT/cUhPr4OQ==", "dev": true, - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/babel-plugin-espower": { - "version": "3.0.1", + "node_modules/ava/node_modules/chalk": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.0.tgz", + "integrity": "sha512-ZkD35Mx92acjB2yNJgziGqT9oKHEOxjTBTDRpOsRWtdecL/0jM3z5kM/CTzHWvHIen1GvkM85p6TuFfDGfc8/Q==", "dev": true, - "license": "MIT", - "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" + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/babel-plugin-jsx-pragmatic": { - "version": "1.0.2", - "license": "MIT", + "node_modules/ava/node_modules/clean-stack": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", + "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", + "dev": true, "dependencies": { - "babel-plugin-syntax-jsx": "^6.0.0" + "escape-string-regexp": "5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.4.12", + "node_modules/ava/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, - "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.22.6", - "@babel/helper-define-polyfill-provider": "^0.6.3", - "semver": "^6.3.1" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + "engines": { + "node": ">=12" } }, - "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { - "version": "6.3.1", + "node_modules/ava/node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "engines": { + "node": ">=8" } }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.10.6", + "node_modules/ava/node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.2", - "core-js-compat": "^3.38.0" + "ansi-regex": "^5.0.1" }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + "engines": { + "node": ">=8" } }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.6.3", + "node_modules/ava/node_modules/figures": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/figures/-/figures-4.0.1.tgz", + "integrity": "sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w==", "dev": true, - "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.6.3" + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" }, - "peerDependencies": { - "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/babel-plugin-syntax-jsx": { - "version": "6.18.0", - "license": "MIT" - }, - "node_modules/babel-plugin-transform-async-to-promises": { - "version": "0.8.18", + "node_modules/ava/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", "dev": true, - "license": "MIT" + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/babelify": { - "version": "10.0.0", + "node_modules/ava/node_modules/globby": { + "version": "13.2.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", + "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", "dev": true, - "license": "MIT", + "dependencies": { + "dir-glob": "^3.0.1", + "fast-glob": "^3.3.0", + "ignore": "^5.2.4", + "merge2": "^1.4.1", + "slash": "^4.0.0" + }, "engines": { - "node": ">=6.9.0" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, - "peerDependencies": { - "@babel/core": "^7.0.0" + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/babylon": { - "version": "6.18.0", + "node_modules/ava/node_modules/globby/node_modules/slash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", + "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", "dev": true, - "license": "MIT", - "bin": { - "babylon": "bin/babylon.js" + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/balanced-match": { - "version": "1.0.2", - "license": "MIT" - }, - "node_modules/base-64": { - "version": "1.0.0", - "license": "MIT" - }, - "node_modules/base64-js": { - "version": "1.5.1", + "node_modules/ava/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/node_modules/load-json-file": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", + "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/node_modules/p-map": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", + "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", + "dev": true, + "dependencies": { + "aggregate-error": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/ava/node_modules/pkg-conf": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz", + "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==", + "dev": true, + "dependencies": { + "find-up": "^6.0.0", + "load-json-file": "^7.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ava/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, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/ava/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/ava/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/ava/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/ava/node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.4", + "dev": true, + "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", + "dev": true, + "license": "MIT", + "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" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.4.12", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.6.3", + "semver": "^6.3.1" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.10.6", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.2", + "core-js-compat": "^3.38.0" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.6.3", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.6.3" + }, + "peerDependencies": { + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" + } + }, + "node_modules/babel-plugin-syntax-jsx": { + "version": "6.18.0", + "license": "MIT" + }, + "node_modules/babel-plugin-transform-async-to-promises": { + "version": "0.8.18", + "dev": true, + "license": "MIT" + }, + "node_modules/babel-register-esm": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/babel-register-esm/-/babel-register-esm-1.2.5.tgz", + "integrity": "sha512-WaVd3Rm42kndYnufn8u1SbUUwuCxL2GAQX/7QXUL3w/7PffB+HcXrzmAqk1x01TjhFh/npSZ9Z3MNBc6dDb6Uw==", + "dev": true, + "engines": { + "node": ">=12.17.0" + }, + "peerDependencies": { + "@babel/core": "*" + } + }, + "node_modules/babelify": { + "version": "10.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babylon": { + "version": "6.18.0", + "dev": true, + "license": "MIT", + "bin": { + "babylon": "bin/babylon.js" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/base-64": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", "dev": true, "funding": [ { @@ -4549,78 +4845,6 @@ "dev": true, "license": "MIT" }, - "node_modules/boxen": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-align": "^3.0.0", - "camelcase": "^6.2.0", - "chalk": "^4.1.0", - "cli-boxes": "^2.2.1", - "string-width": "^4.2.0", - "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/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/boxen/node_modules/camelcase": { - "version": "6.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "license": "MIT", @@ -5031,53 +5255,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/cacheable-request/node_modules/normalize-url": { - "version": "4.5.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cached-path-relative": { "version": "1.0.2", "dev": true, @@ -5193,6 +5370,18 @@ ], "license": "CC-BY-4.0" }, + "node_modules/cbor": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", + "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", + "dev": true, + "dependencies": { + "nofilter": "^3.1.0" + }, + "engines": { + "node": ">=12.19" + } + }, "node_modules/chalk": { "version": "4.1.0", "dev": true, @@ -5269,9 +5458,19 @@ "license": "MIT" }, "node_modules/ci-info": { - "version": "2.0.0", + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true, - "license": "MIT" + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } }, "node_modules/ci-parallel-vars": { "version": "1.0.1", @@ -5321,17 +5520,6 @@ "node": ">=0.10.0" } }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "dev": true, @@ -5355,20 +5543,71 @@ } }, "node_modules/cli-truncate": { - "version": "2.1.0", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", + "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", "dev": true, - "license": "MIT", "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" + "slice-ansi": "^5.0.0", + "string-width": "^5.0.0" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "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, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cli-truncate/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/cli-truncate/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "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, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, "node_modules/cli-width": { "version": "3.0.0", "dev": true, @@ -5417,22 +5656,6 @@ "node": ">=0.10.0" } }, - "node_modules/clone-response": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - } - }, - "node_modules/clone-response/node_modules/mimic-response": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/cmd-shim": { "version": "6.0.3", "dev": true, @@ -5442,14 +5665,15 @@ } }, "node_modules/code-excerpt": { - "version": "3.0.0", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", + "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==", "dev": true, - "license": "MIT", "dependencies": { - "convert-to-spaces": "^1.0.1" + "convert-to-spaces": "^2.0.1" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/code-point-at": { @@ -5618,22 +5842,6 @@ "node": ">=10" } }, - "node_modules/configstore": { - "version": "5.0.1", - "dev": true, - "license": "BSD-2-Clause", - "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 @@ -5988,11 +6196,12 @@ "license": "MIT" }, "node_modules/convert-to-spaces": { - "version": "1.0.2", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz", + "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==", "dev": true, - "license": "MIT", "engines": { - "node": ">= 4" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, "node_modules/core-js": { @@ -6110,14 +6319,6 @@ "node": "*" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cssesc": { "version": "3.0.0", "dev": true, @@ -6308,11 +6509,6 @@ "clone": "^1.0.2" } }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, "node_modules/define-lazy-prop": { "version": "2.0.0", "dev": true, @@ -6337,9 +6533,10 @@ "license": "MIT" }, "node_modules/del": { - "version": "6.0.0", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz", + "integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==", "dev": true, - "license": "MIT", "dependencies": { "globby": "^11.0.1", "graceful-fs": "^4.2.4", @@ -6533,11 +6730,6 @@ "readable-stream": "^2.0.2" } }, - "node_modules/duplexer3": { - "version": "0.1.4", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/eastasianwidth": { "version": "0.2.0", "dev": true, @@ -6581,11 +6773,12 @@ "license": "MIT" }, "node_modules/emittery": { - "version": "0.8.1", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.11.0.tgz", + "integrity": "sha512-S/7tzL6v5i+4iJd627Nhv9cLFIo5weAIlGccqJFpnBoDB8U1TF2k5tez4J/QNuxyyhWuFqHg1L84Kd3m7iXg6g==", "dev": true, - "license": "MIT", "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -6696,14 +6889,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/equal-length": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/err-code": { "version": "2.0.3", "dev": true, @@ -6847,20 +7032,16 @@ "node": ">=6" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/escape-string-regexp": { - "version": "2.0.0", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", "dev": true, - "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/escope": { @@ -8212,28 +8393,6 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "11.12.0", "license": "MIT", @@ -8260,57 +8419,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got": { - "version": "9.6.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/got/node_modules/get-stream": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/got/node_modules/mimic-response": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "dev": true, @@ -8436,14 +8544,6 @@ "dev": true, "license": "ISC" }, - "node_modules/has-yarn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/hash-base": { "version": "3.1.0", "license": "MIT", @@ -8661,9 +8761,10 @@ } }, "node_modules/ignore-by-default": { - "version": "2.0.0", + "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, - "license": "ISC", "engines": { "node": ">=10 <11 || >=12 <13 || >=14" } @@ -8726,14 +8827,6 @@ "node": ">=4" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/import-local": { "version": "3.1.0", "dev": true, @@ -8953,9 +9046,10 @@ "license": "Unlicense" }, "node_modules/irregular-plurals": { - "version": "3.3.0", + "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, - "license": "MIT", "engines": { "node": ">=8" } @@ -9044,17 +9138,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, "node_modules/is-core-module": { "version": "2.6.0", "dev": true, @@ -9147,21 +9230,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "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, @@ -9185,17 +9253,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-npm": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "devOptional": true, @@ -9227,16 +9284,18 @@ }, "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, - "license": "MIT", "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, - "license": "MIT", "engines": { "node": ">=8" } @@ -9392,11 +9451,6 @@ "node": ">=8" } }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "dev": true, - "license": "MIT" - }, "node_modules/isarray": { "version": "1.0.0", "dev": true, @@ -9545,11 +9599,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "dev": true, @@ -9647,14 +9696,6 @@ "dev": true, "license": "MIT" }, - "node_modules/keyv": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "license": "MIT", @@ -9675,17 +9716,6 @@ "stream-splicer": "^2.0.0" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lerna": { "version": "8.1.9", "dev": true, @@ -9785,20 +9815,6 @@ "dev": true, "license": "Python-2.0" }, - "node_modules/lerna/node_modules/ci-info": { - "version": "3.9.0", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/sibiraj-s" - } - ], - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/lerna/node_modules/cliui": { "version": "8.0.1", "dev": true, @@ -10324,17 +10340,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lint-staged/node_modules/mimic-fn": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/lint-staged/node_modules/npm-run-path": { "version": "5.3.0", "dev": true, @@ -10454,32 +10459,6 @@ "dev": true, "license": "MIT" }, - "node_modules/listr2/node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/listr2/node_modules/slice-ansi": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, "node_modules/listr2/node_modules/string-width": { "version": "7.2.0", "dev": true, @@ -10843,14 +10822,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "dev": true, @@ -10878,20 +10849,6 @@ "sourcemap-codec": "^1.4.1" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "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, @@ -10916,8 +10873,9 @@ }, "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==", "dev": true, - "license": "MIT", "dependencies": { "p-defer": "^1.0.0" }, @@ -10937,22 +10895,15 @@ } }, "node_modules/matcher": { - "version": "3.0.0", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz", + "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==", "dev": true, - "license": "MIT", "dependencies": { - "escape-string-regexp": "^4.0.0" + "escape-string-regexp": "^5.0.0" }, "engines": { - "node": ">=10" - } - }, - "node_modules/matcher/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -10979,15 +10930,16 @@ } }, "node_modules/mem": { - "version": "8.1.1", + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", + "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", "dev": true, - "license": "MIT", "dependencies": { "map-age-cleaner": "^0.1.3", - "mimic-fn": "^3.1.0" + "mimic-fn": "^4.0.0" }, "engines": { - "node": ">=10" + "node": ">=12.20" }, "funding": { "url": "https://github.com/sindresorhus/mem?sponsor=1" @@ -11134,11 +11086,15 @@ } }, "node_modules/mimic-fn": { - "version": "3.1.0", + "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": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/mimic-function": { @@ -11743,6 +11699,15 @@ "version": "2.0.19", "license": "MIT" }, + "node_modules/nofilter": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", + "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", + "dev": true, + "engines": { + "node": ">=12.19" + } + }, "node_modules/noop-logger": { "version": "0.1.1", "dev": true, @@ -12311,31 +12276,37 @@ "node": ">=0.10.0" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "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, - "license": "MIT", "engines": { "node": ">=4" } }, "node_modules/p-event": { - "version": "4.2.0", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz", + "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==", "dev": true, - "license": "MIT", "dependencies": { - "p-timeout": "^3.1.0" + "p-timeout": "^5.0.2" }, "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-event/node_modules/p-timeout": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", + "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", + "dev": true, + "engines": { + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12480,20 +12451,6 @@ "node": ">=8" } }, - "node_modules/package-json": { - "version": "6.5.0", - "dev": true, - "license": "MIT", - "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, @@ -12915,14 +12872,15 @@ } }, "node_modules/plur": { - "version": "4.0.0", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", + "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==", "dev": true, - "license": "MIT", "dependencies": { - "irregular-plurals": "^3.2.0" + "irregular-plurals": "^3.3.0" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12984,14 +12942,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { "version": "3.4.2", "dev": true, @@ -13228,17 +13178,6 @@ "dev": true, "license": "MIT" }, - "node_modules/pupa": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/querystring": { "version": "0.2.0", "dev": true, @@ -13615,28 +13554,6 @@ "regjsparser": "bin/parser" } }, - "node_modules/registry-auth-token": { - "version": "4.2.1", - "dev": true, - "license": "MIT", - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/regjsgen": { "version": "0.8.0", "dev": true, @@ -13726,14 +13643,6 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/responselike": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, "node_modules/restore-cursor": { "version": "3.1.0", "dev": true, @@ -13770,8 +13679,10 @@ }, "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, - "license": "ISC", "dependencies": { "glob": "^7.1.3" }, @@ -13928,21 +13839,11 @@ "semver": "bin/semver.js" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "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, - "license": "MIT", "dependencies": { "type-fest": "^0.13.1" }, @@ -13955,8 +13856,9 @@ }, "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, - "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -14110,32 +14012,45 @@ } }, "node_modules/slice-ansi": { - "version": "3.0.0", + "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": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", + "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", - "dependencies": { - "color-convert": "^2.0.1" - }, "engines": { - "node": ">=8" + "node": ">=12" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "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, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/smart-buffer": { "version": "4.2.0", "dev": true, @@ -14287,9 +14202,10 @@ } }, "node_modules/stack-utils": { - "version": "2.0.3", + "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" }, @@ -14297,6 +14213,15 @@ "node": ">=10" } }, + "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, + "engines": { + "node": ">=8" + } + }, "node_modules/stream-browserify": { "version": "3.0.0", "dev": true, @@ -14531,18 +14456,57 @@ } }, "node_modules/supertap": { - "version": "2.0.0", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz", + "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==", "dev": true, - "license": "MIT", "dependencies": { - "arrify": "^2.0.1", - "indent-string": "^4.0.0", - "js-yaml": "^3.14.0", + "indent-string": "^5.0.0", + "js-yaml": "^3.14.1", "serialize-error": "^7.0.1", - "strip-ansi": "^6.0.0" + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">=10" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/supertap/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, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/supertap/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supertap/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, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, "node_modules/supports-color": { @@ -14739,14 +14703,6 @@ "node": ">=14.14" } }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "devOptional": true, @@ -14840,14 +14796,6 @@ "node": ">=8" } }, - "node_modules/trim-off-newlines": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/tsconfig-paths": { "version": "4.2.0", "dev": true, @@ -15073,17 +15021,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/unique-string": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/universal-user-agent": { "version": "6.0.1", "dev": true, @@ -15134,76 +15071,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "dev": true, - "license": "BSD-2-Clause", - "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/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/update-notifier/node_modules/chalk": { - "version": "4.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/update-notifier/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/uri-js": { "version": "4.4.1", "dev": true, @@ -15229,17 +15096,6 @@ "querystring": "0.2.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "dev": true, @@ -15448,17 +15304,6 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "dev": true, @@ -15647,14 +15492,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/xml-name-validator": { "version": "5.0.0", "dev": true, diff --git a/package.json b/package.json index ff5909d30..8c7f74bf6 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,20 @@ { "private": true, + "type": "module", "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-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", + "ava": "^4.3.3", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", + "babel-register-esm": "^1.2.5", "babelify": "^10.0.0", "babylon": "^6.18.0", "browser-pack-flat": "^3.5.0", @@ -43,12 +44,13 @@ "preversion": "make bundle" }, "engines": { - "node": ">= 12.4", + "node": ">= 14", "npm": ">= 7" }, "workspaces": [ "packages/*" ], + "browserslist": "> 0.25%, not dead", "bundlesize": [ { "path": "./packages/client/dist/xmpp.min.js", diff --git a/packages/base64/package.json b/packages/base64/package.json index 3d87aa032..228094b60 100644 --- a/packages/base64/package.json +++ b/packages/base64/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "base64" diff --git a/packages/client-core/package.json b/packages/client-core/package.json index 9c5d6b87b..203a496a9 100644 --- a/packages/client-core/package.json +++ b/packages/client-core/package.json @@ -5,6 +5,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "dependencies": { "@xmpp/connection": "^0.13.2", "@xmpp/jid": "^0.13.2", diff --git a/packages/client/browser.js b/packages/client/browser.js index 8751aea7c..e4c7f84b9 100644 --- a/packages/client/browser.js +++ b/packages/client/browser.js @@ -1,25 +1,23 @@ -"use strict"; +import { xml, jid, Client } from "@xmpp/client-core"; +import getDomain from "./lib/getDomain.js"; -const { xml, jid, Client } = require("@xmpp/client-core"); -const getDomain = require("./lib/getDomain"); - -const _reconnect = require("@xmpp/reconnect"); -const _websocket = require("@xmpp/websocket"); -const _middleware = require("@xmpp/middleware"); -const _streamFeatures = require("@xmpp/stream-features"); -const _iqCaller = require("@xmpp/iq/caller"); -const _iqCallee = require("@xmpp/iq/callee"); -const _resolve = require("@xmpp/resolve"); +import _reconnect from "@xmpp/reconnect"; +import _websocket from "@xmpp/websocket"; +import _middleware from "@xmpp/middleware"; +import _streamFeatures from "@xmpp/stream-features"; +import _iqCaller from "@xmpp/iq/caller.js"; +import _iqCallee from "@xmpp/iq/callee.js"; +import _resolve from "@xmpp/resolve"; // Stream features - order matters and define priority -const _sasl = require("@xmpp/sasl"); -const _resourceBinding = require("@xmpp/resource-binding"); -const _sessionEstablishment = require("@xmpp/session-establishment"); -const _streamManagement = require("@xmpp/stream-management"); +import _sasl from "@xmpp/sasl"; +import _resourceBinding from "@xmpp/resource-binding"; +import _sessionEstablishment from "@xmpp/session-establishment"; +import _streamManagement from "@xmpp/stream-management"; // SASL mechanisms - order matters and define priority -const anonymous = require("@xmpp/sasl-anonymous"); -const plain = require("@xmpp/sasl-plain"); +import plain from "@xmpp/sasl-plain"; +import anonymous from "@xmpp/sasl-anonymous"; function client(options = {}) { const { resource, credentials, username, password, ...params } = options; @@ -76,6 +74,5 @@ function client(options = {}) { }); } -module.exports.xml = xml; -module.exports.jid = jid; -module.exports.client = client; +// eslint-disable-next-line unicorn/prefer-export-from +export { xml, jid, client }; diff --git a/packages/client/example.js b/packages/client/example.js index 9bd532aaa..59abc50d9 100644 --- a/packages/client/example.js +++ b/packages/client/example.js @@ -1,9 +1,7 @@ -/* eslint-disable n/no-extraneous-require */ +import { client, xml } from "@xmpp/client"; -"use strict"; - -const { client, xml } = require("@xmpp/client"); -const debug = require("@xmpp/debug"); +// eslint-disable-next-line n/no-extraneous-import +import debug from "@xmpp/debug"; // Insecure! // process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; diff --git a/packages/client/index.js b/packages/client/index.js index 1f1d46b01..cd342425c 100644 --- a/packages/client/index.js +++ b/packages/client/index.js @@ -1,29 +1,27 @@ -"use strict"; +import { xml, jid, Client } from "@xmpp/client-core"; +import getDomain from "./lib/getDomain.js"; -const { xml, jid, Client } = require("@xmpp/client-core"); -const getDomain = require("./lib/getDomain"); - -const _reconnect = require("@xmpp/reconnect"); -const _websocket = require("@xmpp/websocket"); -const _tcp = require("@xmpp/tcp"); -const _tls = require("@xmpp/tls"); -const _middleware = require("@xmpp/middleware"); -const _streamFeatures = require("@xmpp/stream-features"); -const _iqCaller = require("@xmpp/iq/caller"); -const _iqCallee = require("@xmpp/iq/callee"); -const _resolve = require("@xmpp/resolve"); +import _reconnect from "@xmpp/reconnect"; +import _websocket from "@xmpp/websocket"; +import _tcp from "@xmpp/tcp"; +import _tls from "@xmpp/tls"; +import _middleware from "@xmpp/middleware"; +import _streamFeatures from "@xmpp/stream-features"; +import _iqCaller from "@xmpp/iq/caller.js"; +import _iqCallee from "@xmpp/iq/callee.js"; +import _resolve from "@xmpp/resolve"; // Stream features - order matters and define priority -const _starttls = require("@xmpp/starttls/client"); -const _sasl = require("@xmpp/sasl"); -const _resourceBinding = require("@xmpp/resource-binding"); -const _sessionEstablishment = require("@xmpp/session-establishment"); -const _streamManagement = require("@xmpp/stream-management"); +import _starttls from "@xmpp/starttls/client.js"; +import _sasl from "@xmpp/sasl"; +import _resourceBinding from "@xmpp/resource-binding"; +import _sessionEstablishment from "@xmpp/session-establishment"; +import _streamManagement from "@xmpp/stream-management"; // SASL mechanisms - order matters and define priority -const scramsha1 = require("@xmpp/sasl-scram-sha-1"); -const plain = require("@xmpp/sasl-plain"); -const anonymous = require("@xmpp/sasl-anonymous"); +import scramsha1 from "@xmpp/sasl-scram-sha-1"; +import plain from "@xmpp/sasl-plain"; +import anonymous from "@xmpp/sasl-anonymous"; function client(options = {}) { const { resource, credentials, username, password, ...params } = options; @@ -88,6 +86,5 @@ function client(options = {}) { }); } -module.exports.xml = xml; -module.exports.jid = jid; -module.exports.client = client; +// eslint-disable-next-line unicorn/prefer-export-from +export { xml, jid, client }; diff --git a/packages/client/lib/getDomain.js b/packages/client/lib/getDomain.js index aecd8088b..bc0f67884 100644 --- a/packages/client/lib/getDomain.js +++ b/packages/client/lib/getDomain.js @@ -1,6 +1,4 @@ -"use strict"; - -module.exports = function getDomain(service) { +export default function getDomain(service) { const domain = service.split("://")[1] || service; return domain.split(":")[0].split("/")[0]; -}; +} diff --git a/packages/client/package.json b/packages/client/package.json index 6b6a44762..3539c03fc 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -5,6 +5,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "module", "dependencies": { "@babel/cli": "^7.26.4", "@babel/core": "^7.26.0", diff --git a/packages/client/react-native.js b/packages/client/react-native.js index 8751aea7c..e4c7f84b9 100644 --- a/packages/client/react-native.js +++ b/packages/client/react-native.js @@ -1,25 +1,23 @@ -"use strict"; +import { xml, jid, Client } from "@xmpp/client-core"; +import getDomain from "./lib/getDomain.js"; -const { xml, jid, Client } = require("@xmpp/client-core"); -const getDomain = require("./lib/getDomain"); - -const _reconnect = require("@xmpp/reconnect"); -const _websocket = require("@xmpp/websocket"); -const _middleware = require("@xmpp/middleware"); -const _streamFeatures = require("@xmpp/stream-features"); -const _iqCaller = require("@xmpp/iq/caller"); -const _iqCallee = require("@xmpp/iq/callee"); -const _resolve = require("@xmpp/resolve"); +import _reconnect from "@xmpp/reconnect"; +import _websocket from "@xmpp/websocket"; +import _middleware from "@xmpp/middleware"; +import _streamFeatures from "@xmpp/stream-features"; +import _iqCaller from "@xmpp/iq/caller.js"; +import _iqCallee from "@xmpp/iq/callee.js"; +import _resolve from "@xmpp/resolve"; // Stream features - order matters and define priority -const _sasl = require("@xmpp/sasl"); -const _resourceBinding = require("@xmpp/resource-binding"); -const _sessionEstablishment = require("@xmpp/session-establishment"); -const _streamManagement = require("@xmpp/stream-management"); +import _sasl from "@xmpp/sasl"; +import _resourceBinding from "@xmpp/resource-binding"; +import _sessionEstablishment from "@xmpp/session-establishment"; +import _streamManagement from "@xmpp/stream-management"; // SASL mechanisms - order matters and define priority -const anonymous = require("@xmpp/sasl-anonymous"); -const plain = require("@xmpp/sasl-plain"); +import plain from "@xmpp/sasl-plain"; +import anonymous from "@xmpp/sasl-anonymous"; function client(options = {}) { const { resource, credentials, username, password, ...params } = options; @@ -76,6 +74,5 @@ function client(options = {}) { }); } -module.exports.xml = xml; -module.exports.jid = jid; -module.exports.client = client; +// eslint-disable-next-line unicorn/prefer-export-from +export { xml, jid, client }; diff --git a/packages/client/test/getDomain.js b/packages/client/test/getDomain.js index d7d5d919a..97079d71e 100644 --- a/packages/client/test/getDomain.js +++ b/packages/client/test/getDomain.js @@ -1,7 +1,5 @@ -"use strict"; - -const test = require("ava"); -const getDomain = require("../lib/getDomain"); +import test from "ava"; +import getDomain from "../lib/getDomain.js"; test("getDomain", (t) => { t.is(getDomain("ws://foo:123/foobar"), "foo"); diff --git a/packages/component-core/package.json b/packages/component-core/package.json index 2685d5f6d..b2105b20b 100644 --- a/packages/component-core/package.json +++ b/packages/component-core/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "component", diff --git a/packages/component/package.json b/packages/component/package.json index 573a4e018..a1e63f475 100644 --- a/packages/component/package.json +++ b/packages/component/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "component" diff --git a/packages/connection-tcp/package.json b/packages/connection-tcp/package.json index 7a8d1fb4e..11881687b 100644 --- a/packages/connection-tcp/package.json +++ b/packages/connection-tcp/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "connection", diff --git a/packages/connection/package.json b/packages/connection/package.json index 08e0eb719..cf42e6b0a 100644 --- a/packages/connection/package.json +++ b/packages/connection/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "connection" diff --git a/packages/debug/package.json b/packages/debug/package.json index 94bc2a2c4..ac4006974 100644 --- a/packages/debug/package.json +++ b/packages/debug/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "debug" diff --git a/packages/error/package.json b/packages/error/package.json index 9154e92c3..fa22d787c 100644 --- a/packages/error/package.json +++ b/packages/error/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "xmpp", "error" diff --git a/packages/events/package.json b/packages/events/package.json index a367e6892..1685c1556 100644 --- a/packages/events/package.json +++ b/packages/events/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "event", "events", diff --git a/packages/id/package.json b/packages/id/package.json index 3ad7058d3..6516eb637 100644 --- a/packages/id/package.json +++ b/packages/id/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "id" diff --git a/packages/iq/package.json b/packages/iq/package.json index 3e2eecb20..36cec3bf8 100644 --- a/packages/iq/package.json +++ b/packages/iq/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "iq", diff --git a/packages/jid/package.json b/packages/jid/package.json index 855c9a1d8..933aa79e6 100644 --- a/packages/jid/package.json +++ b/packages/jid/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "JID" diff --git a/packages/middleware/package.json b/packages/middleware/package.json index 98c22f952..cb8d4c508 100644 --- a/packages/middleware/package.json +++ b/packages/middleware/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "middleware" diff --git a/packages/reconnect/package.json b/packages/reconnect/package.json index 1c1b268c9..0a11b8274 100644 --- a/packages/reconnect/package.json +++ b/packages/reconnect/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "reconnect" diff --git a/packages/resolve/package.json b/packages/resolve/package.json index 5b31a914b..a65ad6ca2 100644 --- a/packages/resolve/package.json +++ b/packages/resolve/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "dns", diff --git a/packages/resource-binding/package.json b/packages/resource-binding/package.json index 606caa67a..3f9080fb1 100644 --- a/packages/resource-binding/package.json +++ b/packages/resource-binding/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "bind", diff --git a/packages/sasl-anonymous/package.json b/packages/sasl-anonymous/package.json index e2f0762d0..ca786f89f 100644 --- a/packages/sasl-anonymous/package.json +++ b/packages/sasl-anonymous/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "sasl", diff --git a/packages/sasl-plain/package.json b/packages/sasl-plain/package.json index c2946438a..b8ac7f6d1 100644 --- a/packages/sasl-plain/package.json +++ b/packages/sasl-plain/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "sasl", diff --git a/packages/sasl-scram-sha-1/package.json b/packages/sasl-scram-sha-1/package.json index fcb269f76..c7debced6 100644 --- a/packages/sasl-scram-sha-1/package.json +++ b/packages/sasl-scram-sha-1/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "sasl", diff --git a/packages/sasl/package.json b/packages/sasl/package.json index 4a336e3be..9632031f4 100644 --- a/packages/sasl/package.json +++ b/packages/sasl/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "sasl" diff --git a/packages/session-establishment/package.json b/packages/session-establishment/package.json index fdd45d71e..f7af8fd87 100644 --- a/packages/session-establishment/package.json +++ b/packages/session-establishment/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "session", diff --git a/packages/starttls/package.json b/packages/starttls/package.json index 91cc7de60..31c829447 100644 --- a/packages/starttls/package.json +++ b/packages/starttls/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "STARTTLS" diff --git a/packages/stream-features/package.json b/packages/stream-features/package.json index ed65c6d14..715a562ef 100644 --- a/packages/stream-features/package.json +++ b/packages/stream-features/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "stream", diff --git a/packages/stream-management/package.json b/packages/stream-management/package.json index f52a4327d..6d8f985bc 100644 --- a/packages/stream-management/package.json +++ b/packages/stream-management/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "stream", diff --git a/packages/tcp/package.json b/packages/tcp/package.json index 37a36e5f6..7ec589774 100644 --- a/packages/tcp/package.json +++ b/packages/tcp/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "dependencies": { "@xmpp/connection-tcp": "^0.13.2" }, diff --git a/packages/test/package.json b/packages/test/package.json index e43570e5d..de0128b37 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "test" diff --git a/packages/time/package.json b/packages/time/package.json index 2b6dae6b2..7bb410496 100644 --- a/packages/time/package.json +++ b/packages/time/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "time", diff --git a/packages/tls/package.json b/packages/tls/package.json index cb43d8fc0..662d88198 100644 --- a/packages/tls/package.json +++ b/packages/tls/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "dependencies": { "@xmpp/connection": "^0.13.2", "@xmpp/connection-tcp": "^0.13.2" diff --git a/packages/uri/package.json b/packages/uri/package.json index ea951f3ce..41d9cbe41 100644 --- a/packages/uri/package.json +++ b/packages/uri/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "URI" diff --git a/packages/websocket/package.json b/packages/websocket/package.json index 86eedfac5..33240f065 100644 --- a/packages/websocket/package.json +++ b/packages/websocket/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "dependencies": { "@xmpp/connection": "^0.13.2", "@xmpp/xml": "^0.13.2", diff --git a/packages/xml/package.json b/packages/xml/package.json index 475e9ced2..8559c552a 100644 --- a/packages/xml/package.json +++ b/packages/xml/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "stanza", diff --git a/packages/xmpp.js/package.json b/packages/xmpp.js/package.json index 5f91fbeb5..cc0733ca2 100644 --- a/packages/xmpp.js/package.json +++ b/packages/xmpp.js/package.json @@ -6,6 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", + "type": "commonjs", "keywords": [ "XMPP", "jabber", diff --git a/prettier.config.js b/prettier.config.js index a6eb9fc83..061f3b6f6 100644 --- a/prettier.config.js +++ b/prettier.config.js @@ -1,5 +1,3 @@ -"use strict"; - -module.exports = { +export default { trailingComma: "all", }; From 02a155d6f540f838b049f45cc29399db1cc390af Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 12:24:53 +0100 Subject: [PATCH 02/17] cool stuff --- ava.config.js | 2 + babel.config.cjs | 33 --- babel.config.js | 36 +++ package-lock.json | 512 +-------------------------------- packages/sasl/lib/SASLError.js | 6 +- packages/sasl/package.json | 2 +- packages/sasl/test.js | 8 +- 7 files changed, 45 insertions(+), 554 deletions(-) delete mode 100644 babel.config.cjs create mode 100644 babel.config.js diff --git a/ava.config.js b/ava.config.js index f53eb169b..cf7802fa3 100644 --- a/ava.config.js +++ b/ava.config.js @@ -20,6 +20,8 @@ export default { // ], // }, // }, + require: ["@babel/register/experimental-worker"], + // workerThreads: false, // nodeArguments: ["--loader=babel-register-esm"], files: [ "packages/**/test.js", diff --git a/babel.config.cjs b/babel.config.cjs deleted file mode 100644 index 1e862e36d..000000000 --- a/babel.config.cjs +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = { - presets: [ - [ - "@babel/preset-env", - { - targets: { - ie: "11", - }, - loose: true, - }, - ], - ], - plugins: [ - "@babel/plugin-transform-runtime", - "babel-plugin-transform-async-to-promises", - "@babel/plugin-proposal-object-rest-spread", - - // [ - // "@babel/plugin-transform-react-jsx", - // { - // pragma: "xml", - // throwIfNamespace: false, - // }, - // ], - // [ - // "babel-plugin-jsx-pragmatic", - // { - // module: "@xmpp/xml", - // import: "xml", - // }, - // ], - ], -}; diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 000000000..e8921951e --- /dev/null +++ b/babel.config.js @@ -0,0 +1,36 @@ +console.log("YEAH LA PECHE"); + +export default { + // presets: [ + // [ + // "@babel/preset-env", + // { + // targets: { + // ie: "11", + // }, + // loose: true, + // }, + // ], + // ], + plugins: [ + // "@babel/plugin-transform-runtime", + // "babel-plugin-transform-async-to-promises", + // "@babel/plugin-proposal-object-rest-spread", + + [ + "@babel/plugin-transform-react-jsx", + { + pragma: "xml", + throwIfNamespace: false, + useBuiltIns: true, + }, + ], + [ + "babel-plugin-jsx-pragmatic", + { + module: "@xmpp/xml", + import: "xml", + }, + ], + ], +}; diff --git a/package-lock.json b/package-lock.json index 8a47cfefd..f305d91c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "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-react-jsx": "^7.25.9", @@ -46,7 +45,7 @@ "uglify-js": "^3.19.3" }, "engines": { - "node": ">= 12.4", + "node": ">= 14", "npm": ">= 7" } }, @@ -61,127 +60,6 @@ "node": ">=6.0.0" } }, - "node_modules/@ava/babel": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "is-obj": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ava/babel/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@ava/babel/node_modules/find-up": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/@babel/cli": { "version": "7.26.4", "license": "MIT", @@ -703,36 +581,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.16.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.16.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.5", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.16.5", "dev": true, @@ -751,22 +599,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.16.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.16.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.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", "dev": true, @@ -778,17 +610,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.26.0", "dev": true, @@ -830,17 +651,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "dev": true, @@ -852,17 +662,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "dev": true, @@ -4607,20 +4406,6 @@ "proxy-from-env": "^1.1.0" } }, - "node_modules/babel-plugin-espower": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "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", @@ -5271,25 +5056,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/call-matcher": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" - } - }, - "node_modules/call-signature": { - "version": "0.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/caller-callsite": { "version": "2.0.0", "dev": true, @@ -6204,12 +5970,6 @@ "node": "^12.20.0 || ^14.13.1 || >=16.0.0" } }, - "node_modules/core-js": { - "version": "2.6.12", - "dev": true, - "hasInstallScript": true, - "license": "MIT" - }, "node_modules/core-js-compat": { "version": "3.39.0", "dev": true, @@ -6472,22 +6232,6 @@ "dev": true, "license": "MIT" }, - "node_modules/deep-equal": { - "version": "1.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-extend": { "version": "0.6.0", "dev": true, @@ -6789,15 +6533,6 @@ "dev": true, "license": "MIT" }, - "node_modules/empower-core": { - "version": "1.2.0", - "dev": true, - "license": "MIT", - "dependencies": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, "node_modules/encoding": { "version": "0.1.13", "license": "MIT", @@ -6956,11 +6691,6 @@ "next-tick": "~1.0.0" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, "node_modules/es6-iterator": { "version": "2.0.3", "dev": true, @@ -7526,17 +7256,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/espower-location-detector": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "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, @@ -7565,14 +7284,6 @@ "node": ">=4" } }, - "node_modules/espurify": { - "version": "1.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "core-js": "^2.0.0" - } - }, "node_modules/esquery": { "version": "1.6.0", "dev": true, @@ -8577,29 +8288,6 @@ "minimalistic-assert": "^1.0.1" } }, - "node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/hasown": { "version": "2.0.2", "dev": true, @@ -9414,11 +9102,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "dev": true, @@ -9430,16 +9113,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-url": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/is-wsl": { "version": "2.2.0", "dev": true, @@ -10565,11 +10238,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.get": { "version": "4.4.2", "dev": true, @@ -12098,21 +11766,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object-keys": { "version": "1.1.1", "license": "MIT", @@ -12437,20 +12090,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "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-from-dist": { "version": "1.0.1", "dev": true, @@ -12730,99 +12369,6 @@ "node": ">= 6" } }, - "node_modules/pkg-conf": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/load-json-file": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/pify": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/type-fest": { - "version": "0.3.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=6" - } - }, "node_modules/pkg-dir": { "version": "3.0.0", "license": "MIT", @@ -13490,21 +13036,6 @@ "regexp-tree": "bin/regexp-tree" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.3.1", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/regexpp": { "version": "3.2.0", "dev": true, @@ -13577,17 +13108,6 @@ "jsesc": "bin/jsesc" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -14390,17 +13910,6 @@ "node": ">=8" } }, - "node_modules/strip-bom-buf": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-utf8": "^0.2.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-final-newline": { "version": "2.0.0", "dev": true, @@ -14891,14 +14400,6 @@ "dev": true, "license": "MIT" }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.7.2", "dev": true, @@ -15387,17 +14888,6 @@ "version": "1.0.2", "license": "ISC" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "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, diff --git a/packages/sasl/lib/SASLError.js b/packages/sasl/lib/SASLError.js index d7f17efbe..acb73194d 100644 --- a/packages/sasl/lib/SASLError.js +++ b/packages/sasl/lib/SASLError.js @@ -1,6 +1,4 @@ -"use strict"; - -const XMPPError = require("@xmpp/error"); +import XMPPError from "@xmpp/error"; // https://xmpp.org/rfcs/rfc6120.html#sasl-errors @@ -11,4 +9,4 @@ class SASLError extends XMPPError { } } -module.exports = SASLError; +export default SASLError; diff --git a/packages/sasl/package.json b/packages/sasl/package.json index 9632031f4..a9fa2b4aa 100644 --- a/packages/sasl/package.json +++ b/packages/sasl/package.json @@ -6,7 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", - "type": "commonjs", + "type": "module", "keywords": [ "XMPP", "sasl" diff --git a/packages/sasl/test.js b/packages/sasl/test.js index 86a645eff..cd3910002 100644 --- a/packages/sasl/test.js +++ b/packages/sasl/test.js @@ -1,8 +1,6 @@ -"use strict"; - -const test = require("ava"); -const { mockClient, promise } = require("@xmpp/test"); -const parse = require("@xmpp/xml/lib/parse.js"); +import test from "ava"; +import { mockClient, promise } from "@xmpp/test"; +import parse from "@xmpp/xml/lib/parse.js"; const username = "foo"; const password = "bar"; From 76a7411559162d8186ae9a800059c57c1a4ba7fb Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 12:51:34 +0100 Subject: [PATCH 03/17] foo --- ava.config.js | 45 +- babel.config.js | 58 +- bundle.cjs | 45 - eslint.config.js => eslint.config.mjs | 2 +- package-lock.json | 2209 +++++++++++++++------ package.json | 5 +- packages/sasl/lib/SASLError.js | 6 +- packages/sasl/package.json | 2 +- packages/sasl/test.js | 8 +- prettier.config.js => prettier.config.mjs | 0 10 files changed, 1641 insertions(+), 739 deletions(-) delete mode 100755 bundle.cjs rename eslint.config.js => eslint.config.mjs (98%) rename prettier.config.js => prettier.config.mjs (100%) diff --git a/ava.config.js b/ava.config.js index cf7802fa3..b3d84b489 100644 --- a/ava.config.js +++ b/ava.config.js @@ -1,28 +1,29 @@ 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", - // }, - // ], - // ], - // }, - // }, - require: ["@babel/register/experimental-worker"], + babel: { + testOptions: { + babelrc: false, + plugins: [ + [ + "@babel/plugin-transform-react-jsx", + { + pragma: "xml", + throwIfNamespace: false, + }, + ], + [ + "babel-plugin-jsx-pragmatic", + { + module: "@xmpp/xml", + import: "xml", + }, + ], + ], + }, + }, + // require: ["@babel/register/experimental-worker.js"], // workerThreads: false, // nodeArguments: ["--loader=babel-register-esm"], + nodeArguments: ["--experimental-require-module"], files: [ "packages/**/test.js", "packages/**/test/*.js", diff --git a/babel.config.js b/babel.config.js index e8921951e..28ce909e1 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,36 +1,34 @@ -console.log("YEAH LA PECHE"); - -export default { - // presets: [ - // [ - // "@babel/preset-env", - // { - // targets: { - // ie: "11", - // }, - // loose: true, - // }, - // ], - // ], - plugins: [ - // "@babel/plugin-transform-runtime", - // "babel-plugin-transform-async-to-promises", - // "@babel/plugin-proposal-object-rest-spread", - - [ - "@babel/plugin-transform-react-jsx", - { - pragma: "xml", - throwIfNamespace: false, - useBuiltIns: true, - }, - ], +module.exports = { + presets: [ [ - "babel-plugin-jsx-pragmatic", + "@babel/preset-env", { - module: "@xmpp/xml", - import: "xml", + targets: { + ie: "11", + }, + loose: true, }, ], ], + plugins: [ + "@babel/plugin-transform-runtime", + "babel-plugin-transform-async-to-promises", + "@babel/plugin-proposal-object-rest-spread", + + // [ + // "@babel/plugin-transform-react-jsx", + // { + // pragma: "xml", + // throwIfNamespace: false, + // useBuiltIns: true, + // }, + // ], + // [ + // "babel-plugin-jsx-pragmatic", + // { + // module: "@xmpp/xml", + // import: "xml", + // }, + // ], + ], }; diff --git a/bundle.cjs b/bundle.cjs deleted file mode 100755 index 0b6f3a559..000000000 --- a/bundle.cjs +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env node - -/* eslint-disable no-console */ - -"use strict"; - -const fs = require("fs"); -const path = require("path"); -const browserify = require("browserify"); -const commonShake = require("common-shakeify"); -const packFlat = require("browser-pack-flat"); -const exorcist = require("exorcist"); -const { minify } = require("uglify-js"); - -const dist = path.join(__dirname, "packages/client/dist"); - -browserify(path.join(__dirname, "packages/client/"), { - debug: true, - standalone: "XMPP", -}) - .transform("babelify", { global: true }) - .plugin(commonShake) - .plugin(packFlat) - // .on('dep', dep => { - // console.log(dep.file) - // }) - .bundle() - .pipe(exorcist(path.join(dist, "xmpp.js.map"))) - .pipe(fs.createWriteStream(path.join(dist, "xmpp.js"))) - .on("finish", () => { - const bundled = fs.readFileSync(path.join(dist, "xmpp.js")).toString(); - const sourceMap = fs - .readFileSync(path.join(dist, "xmpp.js.map")) - .toString(); - const { code, map, error } = minify(bundled, { - sourceMap: { - content: sourceMap, - url: "xmpp.min.js.map", - filename: "xmpp.min.js", - }, - }); - if (error) return console.error(error); - fs.writeFileSync(path.join(dist, "xmpp.min.js"), code); - fs.writeFileSync(path.join(dist, "xmpp.min.js.map"), map); - }); diff --git a/eslint.config.js b/eslint.config.mjs similarity index 98% rename from eslint.config.js rename to eslint.config.mjs index 8b9f855f6..7a147184e 100644 --- a/eslint.config.js +++ b/eslint.config.mjs @@ -36,7 +36,7 @@ export default [ }, rules: { - strict: ["error", "global"], + // strict: ["error", "global"], "no-empty": ["error", { allowEmptyCatch: true }], // "no-multi-assign": 0, "func-names": ["error", "as-needed"], diff --git a/package-lock.json b/package-lock.json index f305d91c8..d19e11510 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,13 +11,14 @@ "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-react-jsx": "^7.25.9", "@babel/plugin-transform-runtime": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", - "ava": "^4.3.3", + "ava": "^3.0.15", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", "babel-register-esm": "^1.2.5", @@ -60,6 +61,123 @@ "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", @@ -581,6 +699,40 @@ "@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.", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@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.", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.18.6", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.16.5", "dev": true, @@ -599,6 +751,24 @@ "@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.", + "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" + }, + "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", "dev": true, @@ -610,6 +780,18 @@ "@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==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.26.0", "dev": true, @@ -651,6 +833,18 @@ "@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "dev": true, @@ -662,6 +856,18 @@ "@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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", "dev": true, @@ -1653,6 +1859,27 @@ "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/@emnapi/core": { "version": "1.3.1", "dev": true, @@ -3369,6 +3596,15 @@ "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, @@ -3408,6 +3644,18 @@ "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, @@ -3768,6 +4016,15 @@ "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, @@ -3931,6 +4188,15 @@ "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, @@ -3942,473 +4208,165 @@ "license": "MIT" }, "node_modules/ava": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/ava/-/ava-4.3.3.tgz", - "integrity": "sha512-9Egq/d9R74ExrWohHeqUlexjDbgZJX5jA1Wq4KCTqc3wIfpGEK79zVy4rBtofJ9YKIxs4PzhJ8BgbW5PlAYe6w==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/ava/-/ava-3.15.0.tgz", + "integrity": "sha512-HGAnk1SHPk4Sx6plFAUkzV/XC1j9+iQhOzt4vBly18/yo0AV8Oytx7mtJd/CR8igCJ5p160N/Oo/cNJi2uSeWA==", "dev": true, "dependencies": { - "acorn": "^8.7.1", - "acorn-walk": "^8.2.0", - "ansi-styles": "^6.1.0", + "@concordance/react": "^2.0.0", + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "ansi-styles": "^5.0.0", "arrgv": "^1.0.2", - "arrify": "^3.0.0", - "callsites": "^4.0.0", - "cbor": "^8.1.0", - "chalk": "^5.0.1", - "chokidar": "^3.5.3", + "arrify": "^2.0.1", + "callsites": "^3.1.0", + "chalk": "^4.1.0", + "chokidar": "^3.4.3", "chunkd": "^2.0.1", - "ci-info": "^3.3.1", + "ci-info": "^2.0.0", "ci-parallel-vars": "^1.0.1", "clean-yaml-object": "^0.1.0", - "cli-truncate": "^3.1.0", - "code-excerpt": "^4.0.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.4", + "concordance": "^5.0.1", + "convert-source-map": "^1.7.0", "currently-unhandled": "^0.4.1", - "debug": "^4.3.4", - "del": "^6.1.1", - "emittery": "^0.11.0", - "figures": "^4.0.1", - "globby": "^13.1.1", - "ignore-by-default": "^2.1.0", - "indent-string": "^5.0.0", + "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", - "matcher": "^5.0.0", - "mem": "^9.0.2", + "lodash": "^4.17.20", + "matcher": "^3.0.0", + "md5-hex": "^3.0.1", + "mem": "^8.0.0", "ms": "^2.1.3", - "p-event": "^5.0.1", - "p-map": "^5.4.0", - "picomatch": "^2.3.1", - "pkg-conf": "^4.0.0", - "plur": "^5.1.0", + "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", - "stack-utils": "^2.0.5", - "strip-ansi": "^7.0.1", - "supertap": "^3.0.1", + "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", - "write-file-atomic": "^4.0.1", - "yargs": "^17.5.1" + "trim-off-newlines": "^1.0.1", + "update-notifier": "^5.0.1", + "write-file-atomic": "^3.0.3", + "yargs": "^16.2.0" }, "bin": { - "ava": "entrypoints/cli.mjs" + "ava": "cli.js" }, "engines": { - "node": ">=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=18" - }, - "peerDependencies": { - "@ava/typescript": "*" - }, - "peerDependenciesMeta": { - "@ava/typescript": { - "optional": true - } + "node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0 <15 || >=15" } }, - "node_modules/ava/node_modules/aggregate-error": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz", - "integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==", + "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/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==", "dev": true, "dependencies": { - "clean-stack": "^4.0.0", - "indent-string": "^5.0.0" + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" }, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ava/node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "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==", "dev": true, - "engines": { - "node": ">=12" + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" + "engines": { + "node": ">=8" } }, - "node_modules/ava/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==", + "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==", "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/ava/node_modules/arrify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz", - "integrity": "sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==", + "node_modules/available-typed-arrays": { + "version": "1.0.4", "dev": true, + "license": "MIT", "engines": { - "node": ">=12" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/ava/node_modules/callsites": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-4.2.0.tgz", - "integrity": "sha512-kfzR4zzQtAE9PC7CzZsjl3aBNbXWuXiSeOCdLcPpBfGW8YuCqQHcRPFDbr/BPVmd3EEPVpuFzLyuT/cUhPr4OQ==", + "node_modules/axios": { + "version": "1.7.9", "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, - "node_modules/ava/node_modules/chalk": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.0.tgz", - "integrity": "sha512-ZkD35Mx92acjB2yNJgziGqT9oKHEOxjTBTDRpOsRWtdecL/0jM3z5kM/CTzHWvHIen1GvkM85p6TuFfDGfc8/Q==", + "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, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "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/ava/node_modules/clean-stack": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz", - "integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "5.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/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/ava/node_modules/cliui/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/cliui/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/figures": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/figures/-/figures-4.0.1.tgz", - "integrity": "sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^5.0.0", - "is-unicode-supported": "^1.2.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/find-up": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", - "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", - "dev": true, - "dependencies": { - "locate-path": "^7.1.0", - "path-exists": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/globby": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/globby/-/globby-13.2.2.tgz", - "integrity": "sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==", - "dev": true, - "dependencies": { - "dir-glob": "^3.0.1", - "fast-glob": "^3.3.0", - "ignore": "^5.2.4", - "merge2": "^1.4.1", - "slash": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/globby/node_modules/slash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz", - "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/is-unicode-supported": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", - "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/load-json-file": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-7.0.1.tgz", - "integrity": "sha512-Gnxj3ev3mB5TkVBGad0JM6dmLiQL+o0t23JPBZ9sd+yvSLk05mFoqKBw5N8gbbkU4TNXyqCgIrl/VM17OgUIgQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/locate-path": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", - "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", - "dev": true, - "dependencies": { - "p-locate": "^6.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/p-limit": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", - "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^1.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/p-locate": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", - "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", - "dev": true, - "dependencies": { - "p-limit": "^4.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/p-map": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz", - "integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==", - "dev": true, - "dependencies": { - "aggregate-error": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/path-exists": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", - "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", - "dev": true, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/ava/node_modules/pkg-conf": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-4.0.0.tgz", - "integrity": "sha512-7dmgi4UY4qk+4mj5Cd8v/GExPo0K+SlY+hulOSdfZ/T6jVH6//y7NtzZo5WrfhDBxuQ0jCa7fLZmNaNh7EWL/w==", - "dev": true, - "dependencies": { - "find-up": "^6.0.0", - "load-json-file": "^7.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/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, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, - "node_modules/ava/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/ava/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/ava/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/ava/node_modules/yocto-queue": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", - "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", - "dev": true, - "engines": { - "node": ">=12.20" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.4", - "dev": true, - "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-jsx-pragmatic": { - "version": "1.0.2", - "license": "MIT", + "node_modules/babel-plugin-jsx-pragmatic": { + "version": "1.0.2", + "license": "MIT", "dependencies": { "babel-plugin-syntax-jsx": "^6.0.0" } @@ -4630,6 +4588,52 @@ "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", @@ -5040,22 +5044,103 @@ "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, "license": "MIT" }, "node_modules/call-bind": { - "version": "1.0.2", - "license": "MIT", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "call-bind-apply-helpers": "^1.0.0", + "es-define-property": "^1.0.0", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "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==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "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==", + "dev": true, + "dependencies": { + "core-js": "^2.0.0", + "deep-equal": "^1.0.0", + "espurify": "^1.6.0", + "estraverse": "^4.0.0" + } + }, + "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==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/caller-callsite": { "version": "2.0.0", "dev": true, @@ -5136,18 +5221,6 @@ ], "license": "CC-BY-4.0" }, - "node_modules/cbor": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-8.1.0.tgz", - "integrity": "sha512-DwGjNW9omn6EwP70aXsn7FQJx5kO12tX0bZkaTjzdVFM6/7nhA4t0EENocKGx6D2Bch9PE2KzCUf5SceBdeijg==", - "dev": true, - "dependencies": { - "nofilter": "^3.1.0" - }, - "engines": { - "node": ">=12.19" - } - }, "node_modules/chalk": { "version": "4.1.0", "dev": true, @@ -5280,12 +5353,25 @@ }, "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, - "license": "MIT", "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, @@ -5309,16 +5395,16 @@ } }, "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, "dependencies": { "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" + "string-width": "^7.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5337,23 +5423,23 @@ } }, "node_modules/cli-truncate/node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "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 }, "node_modules/cli-truncate/node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "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, "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=12" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -5419,7 +5505,28 @@ "isobject": "^3.0.1" }, "engines": { - "node": ">=0.10.0" + "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": { @@ -5431,15 +5538,15 @@ } }, "node_modules/code-excerpt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz", - "integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz", + "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==", "dev": true, "dependencies": { - "convert-to-spaces": "^2.0.1" + "convert-to-spaces": "^1.0.1" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=10" } }, "node_modules/code-point-at": { @@ -5608,6 +5715,23 @@ "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 @@ -5962,14 +6086,22 @@ "license": "MIT" }, "node_modules/convert-to-spaces": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz", - "integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==", + "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": "^12.20.0 || ^14.13.1 || >=16.0.0" + "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", "dev": true, @@ -6079,6 +6211,15 @@ "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, @@ -6232,6 +6373,26 @@ "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==", + "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" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/deep-extend": { "version": "0.6.0", "dev": true, @@ -6253,6 +6414,28 @@ "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==", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "dev": true, @@ -6262,13 +6445,19 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", - "license": "MIT", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dependencies": { - "object-keys": "^1.0.12" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/defined": { @@ -6461,6 +6650,19 @@ "url": "https://dotenvx.com" } }, + "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==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/duplexer": { "version": "0.1.2", "dev": true, @@ -6474,6 +6676,12 @@ "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, @@ -6517,12 +6725,12 @@ "license": "MIT" }, "node_modules/emittery": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.11.0.tgz", - "integrity": "sha512-S/7tzL6v5i+4iJd627Nhv9cLFIo5weAIlGccqJFpnBoDB8U1TF2k5tez4J/QNuxyyhWuFqHg1L84Kd3m7iXg6g==", + "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": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/sindresorhus/emittery?sponsor=1" @@ -6533,6 +6741,16 @@ "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", @@ -6624,6 +6842,15 @@ "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, @@ -6666,6 +6893,33 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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==", + "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==", + "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==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "license": "MIT", @@ -6691,6 +6945,12 @@ "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, @@ -6762,13 +7022,22 @@ "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": "5.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", - "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">=12" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -7177,17 +7446,6 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/find-up": { "version": "5.0.0", "dev": true, @@ -7256,6 +7514,18 @@ "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, @@ -7284,6 +7554,15 @@ "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, @@ -7798,6 +8077,15 @@ "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==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gauge": { "version": "2.7.4", "dev": true, @@ -7893,12 +8181,23 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" + "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==", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "function-bind": "^1.1.2", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -8104,6 +8403,30 @@ "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", @@ -8130,6 +8453,72 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "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==", + "dev": true, + "dependencies": { + "mimic-response": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/got/node_modules/get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "dependencies": { + "pump": "^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, @@ -8227,9 +8616,21 @@ "node": ">=8" } }, - "node_modules/has-symbols": { + "node_modules/has-property-descriptors": { "version": "1.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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==", "engines": { "node": ">= 0.4" }, @@ -8255,6 +8656,15 @@ "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", @@ -8288,9 +8698,33 @@ "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", - "dev": true, "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -8515,6 +8949,15 @@ "node": ">=4" } }, + "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==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/import-local": { "version": "3.1.0", "dev": true, @@ -8826,6 +9269,24 @@ "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, @@ -8874,8 +9335,9 @@ }, "node_modules/is-error": { "version": "2.2.2", - "dev": true, - "license": "MIT" + "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", @@ -8918,6 +9380,22 @@ "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, @@ -8941,6 +9419,18 @@ "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, @@ -9102,6 +9592,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "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", "dev": true, @@ -9113,6 +9609,18 @@ "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", "dev": true, @@ -9124,6 +9632,12 @@ "node": ">=8" } }, + "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, @@ -9272,6 +9786,12 @@ "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, @@ -9369,6 +9889,15 @@ "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", @@ -9389,6 +9918,18 @@ "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, @@ -10112,21 +10653,6 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/listr2/node_modules/cli-truncate": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^7.0.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/listr2/node_modules/emoji-regex": { "version": "10.4.0", "dev": true, @@ -10238,6 +10764,12 @@ "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, @@ -10490,6 +11022,15 @@ "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, @@ -10517,6 +11058,21 @@ "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, @@ -10563,18 +11119,23 @@ } }, "node_modules/matcher": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/matcher/-/matcher-5.0.0.tgz", - "integrity": "sha512-s2EMBOWtXFc8dgqvoAzKJXxNHibcdJMV0gwqKUaw9E2JBJuGUK7DrNKrA6g/i+v72TT16+6sVm5mS3thaMLQUw==", + "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": "^5.0.0" + "escape-string-regexp": "^4.0.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "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": { @@ -10598,21 +11159,30 @@ } }, "node_modules/mem": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/mem/-/mem-9.0.2.tgz", - "integrity": "sha512-F2t4YIv9XQUBHt6AOJ0y7lSmP1+cY7Fm1DRh9GClTGzKST7UWLMx6ly9WZdLH/G/ppM5RL4MlQfRT71ri9t19A==", + "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": "^4.0.0" + "mimic-fn": "^3.1.0" }, "engines": { - "node": ">=12.20" + "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, @@ -11367,15 +11937,6 @@ "version": "2.0.19", "license": "MIT" }, - "node_modules/nofilter": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-3.1.0.tgz", - "integrity": "sha512-l2NNj07e9afPnhAhvgVrCD/oy2Ai1yfLpuo3EpiO1jFTsB4sFz6oIfAfSZyQzVpkZQ9xS8ZS5g1jCBgq4Hwo0g==", - "dev": true, - "engines": { - "node": ">=12.19" - } - }, "node_modules/noop-logger": { "version": "0.1.1", "dev": true, @@ -11427,6 +11988,15 @@ "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, @@ -11766,6 +12336,22 @@ "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", @@ -11929,6 +12515,15 @@ "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", @@ -11939,27 +12534,15 @@ } }, "node_modules/p-event": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-5.0.1.tgz", - "integrity": "sha512-dd589iCQ7m1L0bmC5NLlVYfy3TbBEsMUfWx9PyAgPeIcFZ/E2yaTZ4Rz4MiBmmJShviiftHVXOqfnfzJ6kyMrQ==", + "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": "^5.0.2" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "p-timeout": "^3.1.0" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-event/node_modules/p-timeout": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-5.1.0.tgz", - "integrity": "sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew==", - "dev": true, "engines": { - "node": ">=12" + "node": ">=8" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12090,6 +12673,36 @@ "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, @@ -12196,8 +12809,9 @@ }, "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, - "license": "MIT", "engines": { "node": ">=6" } @@ -12308,65 +12922,167 @@ "node_modules/path-type": { "version": "4.0.0", "dev": true, - "license": "MIT", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "dev": true, + "license": "MIT", + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "2.3.1", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "dev": true, + "license": "MIT", + "bin": { + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pirates": { + "version": "4.0.6", + "license": "MIT", + "engines": { + "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": ">=8" + "node": ">=6" } }, - "node_modules/pbkdf2": { - "version": "3.1.2", + "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, - "license": "MIT", "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" + "p-limit": "^2.0.0" }, "engines": { - "node": ">=0.12" + "node": ">=6" } }, - "node_modules/picocolors": { - "version": "1.1.1", - "license": "ISC" - }, - "node_modules/picomatch": { - "version": "2.3.1", - "devOptional": true, - "license": "MIT", + "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": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "node": ">=4" } }, - "node_modules/pidtree": { - "version": "0.6.0", + "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, - "license": "MIT", - "bin": { - "pidtree": "bin/pidtree.js" - }, "engines": { - "node": ">=0.10" + "node": ">=6" } }, - "node_modules/pify": { + "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, - "license": "MIT", "engines": { "node": ">=4" } }, - "node_modules/pirates": { - "version": "4.0.6", - "license": "MIT", + "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": ">=6" } }, "node_modules/pkg-dir": { @@ -12418,15 +13134,15 @@ } }, "node_modules/plur": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/plur/-/plur-5.1.0.tgz", - "integrity": "sha512-VP/72JeXqak2KiOzjgKtQen5y3IZHn+9GOuLDafPv0eXa47xq0At93XahYBs26MsifCQ4enGKwbjBTKgb9QJXg==", + "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.3.0" + "irregular-plurals": "^3.2.0" }, "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -12488,6 +13204,15 @@ "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, @@ -12525,8 +13250,9 @@ }, "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==", "dev": true, - "license": "MIT", "dependencies": { "parse-ms": "^2.1.0" }, @@ -12724,6 +13450,18 @@ "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==", + "dev": true, + "dependencies": { + "escape-goat": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/querystring": { "version": "0.2.0", "dev": true, @@ -13036,6 +13774,24 @@ "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" + } + }, "node_modules/regexpp": { "version": "3.2.0", "dev": true, @@ -13085,6 +13841,30 @@ "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, @@ -13108,6 +13888,18 @@ "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, @@ -13163,6 +13955,15 @@ "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==", + "dev": true, + "dependencies": { + "lowercase-keys": "^1.0.0" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "dev": true, @@ -13359,6 +14160,18 @@ "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", @@ -13391,6 +14204,37 @@ "dev": true, "license": "ISC" }, + "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==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "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)", @@ -13910,6 +14754,18 @@ "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, @@ -13965,57 +14821,19 @@ } }, "node_modules/supertap": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz", - "integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supertap/-/supertap-2.0.0.tgz", + "integrity": "sha512-jRzcXlCeDYvKoZGA5oRhYyR3jUIYu0enkSxtmAgHRlD7HwrovTpH4bDSi0py9FtuA8si9cW/fKommJHuaoDHJA==", "dev": true, "dependencies": { - "indent-string": "^5.0.0", - "js-yaml": "^3.14.1", + "arrify": "^2.0.1", + "indent-string": "^4.0.0", + "js-yaml": "^3.14.0", "serialize-error": "^7.0.1", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - } - }, - "node_modules/supertap/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, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/supertap/node_modules/indent-string": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", - "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/supertap/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, - "dependencies": { - "ansi-regex": "^6.0.1" + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" + "node": ">=10" } }, "node_modules/supports-color": { @@ -14142,8 +14960,9 @@ }, "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==", "dev": true, - "license": "MIT", "engines": { "node": ">=8" } @@ -14212,6 +15031,15 @@ "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/to-regex-range": { "version": "5.0.1", "devOptional": true, @@ -14305,6 +15133,15 @@ "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==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/tsconfig-paths": { "version": "4.2.0", "dev": true, @@ -14400,6 +15237,15 @@ "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, @@ -14522,6 +15368,18 @@ "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, @@ -14572,6 +15430,46 @@ "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, @@ -14597,6 +15495,18 @@ "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, @@ -14805,6 +15715,18 @@ "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, @@ -14888,6 +15810,18 @@ "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, @@ -14982,6 +15916,15 @@ } } }, + "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 8c7f74bf6..71fd3468f 100644 --- a/package.json +++ b/package.json @@ -1,17 +1,18 @@ { "private": true, - "type": "module", + "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-react-jsx": "^7.25.9", "@babel/plugin-transform-runtime": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", - "ava": "^4.3.3", + "ava": "^3.0.15", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", "babel-register-esm": "^1.2.5", diff --git a/packages/sasl/lib/SASLError.js b/packages/sasl/lib/SASLError.js index acb73194d..d7f17efbe 100644 --- a/packages/sasl/lib/SASLError.js +++ b/packages/sasl/lib/SASLError.js @@ -1,4 +1,6 @@ -import XMPPError from "@xmpp/error"; +"use strict"; + +const XMPPError = require("@xmpp/error"); // https://xmpp.org/rfcs/rfc6120.html#sasl-errors @@ -9,4 +11,4 @@ class SASLError extends XMPPError { } } -export default SASLError; +module.exports = SASLError; diff --git a/packages/sasl/package.json b/packages/sasl/package.json index a9fa2b4aa..9632031f4 100644 --- a/packages/sasl/package.json +++ b/packages/sasl/package.json @@ -6,7 +6,7 @@ "bugs": "http://github.com/xmppjs/xmpp.js/issues", "version": "0.13.2", "license": "ISC", - "type": "module", + "type": "commonjs", "keywords": [ "XMPP", "sasl" diff --git a/packages/sasl/test.js b/packages/sasl/test.js index cd3910002..86a645eff 100644 --- a/packages/sasl/test.js +++ b/packages/sasl/test.js @@ -1,6 +1,8 @@ -import test from "ava"; -import { mockClient, promise } from "@xmpp/test"; -import parse from "@xmpp/xml/lib/parse.js"; +"use strict"; + +const test = require("ava"); +const { mockClient, promise } = require("@xmpp/test"); +const parse = require("@xmpp/xml/lib/parse.js"); const username = "foo"; const password = "bar"; diff --git a/prettier.config.js b/prettier.config.mjs similarity index 100% rename from prettier.config.js rename to prettier.config.mjs From 0604ac402d92e46d249d7b131ba9df2e6ba421f1 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 12:52:09 +0100 Subject: [PATCH 04/17] f --- bundle.js | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 bundle.js diff --git a/bundle.js b/bundle.js new file mode 100755 index 000000000..2a35ef659 --- /dev/null +++ b/bundle.js @@ -0,0 +1,40 @@ +#!/usr/bin/env node + +/* eslint-disable no-console */ + +'use strict' // eslint-disable-line node/shebang + +const fs = require('fs') +const path = require('path') +const browserify = require('browserify') +const commonShake = require('common-shakeify') +const packFlat = require('browser-pack-flat') +const exorcist = require('exorcist') +const {minify} = require('uglify-js') + +const dist = path.join(__dirname, 'packages/client/dist') + +browserify(path.join(__dirname, 'packages/client/'), {debug: true, standalone: 'XMPP'}) + .transform('babelify', {global: true}) + .plugin(commonShake) + .plugin(packFlat) + // .on('dep', dep => { + // console.log(dep.file) + // }) + .bundle() + .pipe(exorcist(path.join(dist, 'xmpp.js.map'))) + .pipe(fs.createWriteStream(path.join(dist, 'xmpp.js'))) + .on('finish', () => { + const bundled = fs.readFileSync(path.join(dist, 'xmpp.js')).toString() + const sourceMap = fs.readFileSync(path.join(dist, 'xmpp.js.map')).toString() + const {code, map, error} = minify(bundled, { + sourceMap: { + content: sourceMap, + url: 'xmpp.min.js.map', + filename: 'xmpp.min.js', + }, + }) + if (error) return console.error(error) + fs.writeFileSync(path.join(dist, 'xmpp.min.js'), code) + fs.writeFileSync(path.join(dist, 'xmpp.min.js.map'), map) + }) From df61b37de403281c71b3727e8087575e5ece7ab2 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 12:55:12 +0100 Subject: [PATCH 05/17] f --- Makefile | 2 +- e2e.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 75c3748db..61388dbab 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ bundlesize: ./node_modules/.bin/bundlesize bundle: - node bundle.cjs + node bundle.js size: make bundle diff --git a/e2e.config.js b/e2e.config.js index 2fe514aec..60e5de42d 100644 --- a/e2e.config.js +++ b/e2e.config.js @@ -1,4 +1,4 @@ -export default { +module.exports = { failFast: true, serial: true, babel: { From 86816f3ff3798a815021b6e5c8f7e674478ee099 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 12:57:47 +0100 Subject: [PATCH 06/17] f --- babel.config.js | 18 +----------------- e2e.config.js | 3 ++- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/babel.config.js b/babel.config.js index 28ce909e1..8fdd810a6 100644 --- a/babel.config.js +++ b/babel.config.js @@ -4,7 +4,7 @@ module.exports = { "@babel/preset-env", { targets: { - ie: "11", + ie: "10", }, loose: true, }, @@ -14,21 +14,5 @@ module.exports = { "@babel/plugin-transform-runtime", "babel-plugin-transform-async-to-promises", "@babel/plugin-proposal-object-rest-spread", - - // [ - // "@babel/plugin-transform-react-jsx", - // { - // pragma: "xml", - // throwIfNamespace: false, - // useBuiltIns: true, - // }, - // ], - // [ - // "babel-plugin-jsx-pragmatic", - // { - // module: "@xmpp/xml", - // import: "xml", - // }, - // ], ], }; diff --git a/e2e.config.js b/e2e.config.js index 60e5de42d..d507deb69 100644 --- a/e2e.config.js +++ b/e2e.config.js @@ -1,4 +1,4 @@ -module.exports = { +export default { failFast: true, serial: true, babel: { @@ -21,5 +21,6 @@ module.exports = { ], }, }, + nodeArguments: ["--experimental-require-module"], files: ["test/*.js"], }; From faff4a8e8adf780caaca6dbab85dd3a00a33df79 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 13:02:46 +0100 Subject: [PATCH 07/17] f --- ava.config.js | 3 --- babel.config.js | 2 ++ package-lock.json | 2 +- package.json | 3 +-- prettier.config.mjs | 3 --- 5 files changed, 4 insertions(+), 9 deletions(-) delete mode 100644 prettier.config.mjs diff --git a/ava.config.js b/ava.config.js index b3d84b489..5751eea62 100644 --- a/ava.config.js +++ b/ava.config.js @@ -20,9 +20,6 @@ export default { ], }, }, - // require: ["@babel/register/experimental-worker.js"], - // workerThreads: false, - // nodeArguments: ["--loader=babel-register-esm"], nodeArguments: ["--experimental-require-module"], files: [ "packages/**/test.js", diff --git a/babel.config.js b/babel.config.js index 8fdd810a6..c705ac4e8 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,5 @@ +"use strict"; + module.exports = { presets: [ [ diff --git a/package-lock.json b/package-lock.json index d19e11510..9124dac16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@babel/plugin-transform-runtime": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", - "ava": "^3.0.15", + "ava": "^3.15.0", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", "babel-register-esm": "^1.2.5", diff --git a/package.json b/package.json index 71fd3468f..11f5e9d40 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "@babel/plugin-transform-runtime": "^7.25.9", "@babel/preset-env": "^7.26.0", "@babel/runtime": "^7.26.0", - "ava": "^3.0.15", + "ava": "^3.15.0", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", "babel-register-esm": "^1.2.5", @@ -51,7 +51,6 @@ "workspaces": [ "packages/*" ], - "browserslist": "> 0.25%, not dead", "bundlesize": [ { "path": "./packages/client/dist/xmpp.min.js", diff --git a/prettier.config.mjs b/prettier.config.mjs deleted file mode 100644 index 061f3b6f6..000000000 --- a/prettier.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -export default { - trailingComma: "all", -}; From 99ca82207b4a4a7acd32a0de9428574458269996 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 13:12:56 +0100 Subject: [PATCH 08/17] f --- eslint.config.mjs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 7a147184e..1d7394c16 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -32,11 +32,11 @@ export default [ jsx: true, }, }, - sourceType: "module", + sourceType: "commonjs", }, rules: { - // strict: ["error", "global"], + strict: ["error", "global"], "no-empty": ["error", { allowEmptyCatch: true }], // "no-multi-assign": 0, "func-names": ["error", "as-needed"], @@ -92,10 +92,9 @@ export default [ }, }, { - files: ["server/ctl.js"], - rules: { - "n/no-unsupported-features/es-syntax": "off", - "n/no-unsupported-features/es-syntax": "off", + files: ["packages/client/**/*.js"], + languageOptions: { + sourceType: "module", }, }, ]; From 76dd88fc6cd4f8ffc9ca8fcee29103599a2a7006 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 13:15:56 +0100 Subject: [PATCH 09/17] f --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bda8b40fd..6850aa3db 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x, 18.x, 20.x, 22.x] + node-version: [20.x, 22.x] steps: - uses: actions/checkout@v4 From 0b0ee289a37ec070d8f7ec6e770203563f02289b Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 13:19:08 +0100 Subject: [PATCH 10/17] f --- .github/workflows/CI.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6850aa3db..3a208ee53 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -11,7 +11,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x, 22.x] + node-version: [ + # Do not support --experimental-require-module + # Commented until we have a solution to run tests without it + # 14.x, + # 16.x, + # 18.x, + # 20.x, + 22.x, + ] steps: - uses: actions/checkout@v4 From 740ea33fc1f465ac43a8270770ee84a91eb65444 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 15:21:56 +0100 Subject: [PATCH 11/17] Port from Ava to Jest --- ava.config.js | 2 +- babel.config.js | 56 +- eslint.config.mjs | 15 + jest.config.js | 15 + package-lock.json | 2420 +++++++++++++++-- package.json | 4 + 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 | 49 +- packages/connection/test/connect.js | 14 +- 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 | 18 +- 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 | 27 +- 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 | 15 +- .../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 | 19 +- 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 | 8 +- test/browser.js | 7 +- test/client.js | 131 +- test/component.js | 40 +- test/see-other-host.js | 9 +- 66 files changed, 3208 insertions(+), 1349 deletions(-) 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/ava.config.js b/ava.config.js index 5751eea62..0f624f2e6 100644 --- a/ava.config.js +++ b/ava.config.js @@ -20,7 +20,7 @@ export default { ], }, }, - nodeArguments: ["--experimental-require-module"], + // nodeArguments: ["--experimental-require-module"], files: [ "packages/**/test.js", "packages/**/test/*.js", diff --git a/babel.config.js b/babel.config.js index c705ac4e8..ad284f6a6 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 = (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/eslint.config.mjs b/eslint.config.mjs index 1d7394c16..4f3dd9628 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,6 +4,7 @@ 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 [ { @@ -97,4 +98,18 @@ export default [ sourceType: "module", }, }, + { + files: ["**/*.spec.js", "**/*.test.js", "**/test.js", "**/test/**.js"], + plugins: { jest: pluginJest }, + languageOptions: { + globals: pluginJest.environments.globals.globals, + }, + rules: { + "jest/no-disabled-tests": "warn", + "jest/no-focused-tests": "error", + "jest/no-identical-title": "error", + "jest/prefer-to-have-length": "warn", + "jest/valid-expect": "error", + }, + }, ]; diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..dc026956e --- /dev/null +++ b/jest.config.js @@ -0,0 +1,15 @@ +"use strict"; + +const { defaults } = require("jest-config"); + +/** @type {import('jest').Config} */ +const config = { + testMatch: [...defaults.testMatch, "**/test/*.js"], + testPathIgnorePatterns: [ + ...defaults.testPathIgnorePatterns, + "/test/", + "/packages/test/", + ], +}; + +module.exports = config; diff --git a/package-lock.json b/package-lock.json index 9124dac16..8708eb006 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,11 +14,13 @@ "@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", "babel-register-esm": "^1.2.5", @@ -30,12 +32,14 @@ "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", "jsdom": "^25.0.1", "lerna": "^8.1.9", "lint-staged": "^15.2.11", @@ -780,6 +784,57 @@ "@babel/core": "^7.0.0-0" } }, + "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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "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.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "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, + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "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.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "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", @@ -820,6 +875,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", @@ -833,6 +912,18 @@ "@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", @@ -845,6 +936,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, @@ -856,6 +959,18 @@ "@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", @@ -868,6 +983,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, @@ -1225,8 +1385,9 @@ }, "node_modules/@babel/plugin-transform-modules-commonjs": { "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", + "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", "dev": true, - "license": "MIT", "dependencies": { "@babel/helper-module-transforms": "^7.26.0", "@babel/helper-plugin-utils": "^7.25.9" @@ -1666,8 +1827,9 @@ }, "node_modules/@babel/preset-env": { "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.0.tgz", + "integrity": "sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==", "dev": true, - "license": "MIT", "dependencies": { "@babel/compat-data": "^7.26.0", "@babel/helper-compilation-targets": "^7.25.9", @@ -1859,6 +2021,12 @@ "node": ">=6.9.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/@concordance/react": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@concordance/react/-/react-2.0.0.tgz", @@ -2248,140 +2416,468 @@ "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/load-nyc-config/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, "engines": { - "node": ">=6.0.0" + "node": ">=8" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.2", - "license": "MIT", + "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/set-array": { - "version": "1.2.1", - "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/sourcemap-codec": { - "version": "1.5.0", - "license": "MIT" - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.25", - "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": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "@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": "^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/@lerna/create": { - "version": "8.1.9", + "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, - "license": "MIT", "dependencies": { - "@npmcli/arborist": "7.5.4", - "@npmcli/package-json": "5.2.0", - "@npmcli/run-script": "8.1.0", - "@nx/devkit": ">=17.1.2 < 21", - "@octokit/plugin-enterprise-rest": "6.0.1", - "@octokit/rest": "19.0.11", - "aproba": "2.0.0", - "byte-size": "8.1.1", - "chalk": "4.1.0", - "clone-deep": "4.0.1", - "cmd-shim": "6.0.3", - "color-support": "1.1.3", - "columnify": "1.6.0", - "console-control-strings": "^1.1.0", - "conventional-changelog-core": "5.0.1", - "conventional-recommended-bump": "7.0.1", - "cosmiconfig": "9.0.0", - "dedent": "1.5.3", - "execa": "5.0.0", - "fs-extra": "^11.2.0", - "get-stream": "6.0.0", - "git-url-parse": "14.0.0", - "glob-parent": "6.0.2", - "globby": "11.1.0", - "graceful-fs": "4.2.11", - "has-unicode": "2.0.1", - "ini": "^1.3.8", - "init-package-json": "6.0.3", - "inquirer": "^8.2.4", - "is-ci": "3.0.1", - "is-stream": "2.0.0", - "js-yaml": "4.1.0", - "libnpmpublish": "9.0.9", - "load-json-file": "6.2.0", - "lodash": "^4.17.21", - "make-dir": "4.0.0", - "minimatch": "3.0.5", - "multimatch": "5.0.0", - "node-fetch": "2.6.7", - "npm-package-arg": "11.0.2", - "npm-packlist": "8.0.2", - "npm-registry-fetch": "^17.1.0", - "nx": ">=17.1.2 < 21", - "p-map": "4.0.0", - "p-map-series": "2.1.0", - "p-queue": "6.6.2", - "p-reduce": "^2.1.0", - "pacote": "^18.0.6", - "pify": "5.0.0", - "read-cmd-shim": "4.0.0", - "resolve-from": "5.0.0", - "rimraf": "^4.4.1", - "semver": "^7.3.4", - "set-blocking": "^2.0.0", - "signal-exit": "3.0.7", - "slash": "^3.0.0", - "ssri": "^10.0.6", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "strong-log-transformer": "2.1.0", - "tar": "6.2.1", - "temp-dir": "1.0.0", - "upath": "2.0.1", - "uuid": "^10.0.0", - "validate-npm-package-license": "^3.0.4", - "validate-npm-package-name": "5.0.1", - "wide-align": "1.1.5", - "write-file-atomic": "5.0.1", - "write-pkg": "4.0.0", - "yargs": "17.7.2", - "yargs-parser": "21.1.1" + "@jest/fake-timers": "^29.7.0", + "@jest/types": "^29.6.3", + "@types/node": "*", + "jest-mock": "^29.7.0" }, "engines": { - "node": ">=18.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/@lerna/create/node_modules/argparse": { - "version": "2.0.1", + "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, - "license": "Python-2.0" + "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/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", + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@lerna/create": { + "version": "8.1.9", + "dev": true, + "license": "MIT", + "dependencies": { + "@npmcli/arborist": "7.5.4", + "@npmcli/package-json": "5.2.0", + "@npmcli/run-script": "8.1.0", + "@nx/devkit": ">=17.1.2 < 21", + "@octokit/plugin-enterprise-rest": "6.0.1", + "@octokit/rest": "19.0.11", + "aproba": "2.0.0", + "byte-size": "8.1.1", + "chalk": "4.1.0", + "clone-deep": "4.0.1", + "cmd-shim": "6.0.3", + "color-support": "1.1.3", + "columnify": "1.6.0", + "console-control-strings": "^1.1.0", + "conventional-changelog-core": "5.0.1", + "conventional-recommended-bump": "7.0.1", + "cosmiconfig": "9.0.0", + "dedent": "1.5.3", + "execa": "5.0.0", + "fs-extra": "^11.2.0", + "get-stream": "6.0.0", + "git-url-parse": "14.0.0", + "glob-parent": "6.0.2", + "globby": "11.1.0", + "graceful-fs": "4.2.11", + "has-unicode": "2.0.1", + "ini": "^1.3.8", + "init-package-json": "6.0.3", + "inquirer": "^8.2.4", + "is-ci": "3.0.1", + "is-stream": "2.0.0", + "js-yaml": "4.1.0", + "libnpmpublish": "9.0.9", + "load-json-file": "6.2.0", + "lodash": "^4.17.21", + "make-dir": "4.0.0", + "minimatch": "3.0.5", + "multimatch": "5.0.0", + "node-fetch": "2.6.7", + "npm-package-arg": "11.0.2", + "npm-packlist": "8.0.2", + "npm-registry-fetch": "^17.1.0", + "nx": ">=17.1.2 < 21", + "p-map": "4.0.0", + "p-map-series": "2.1.0", + "p-queue": "6.6.2", + "p-reduce": "^2.1.0", + "pacote": "^18.0.6", + "pify": "5.0.0", + "read-cmd-shim": "4.0.0", + "resolve-from": "5.0.0", + "rimraf": "^4.4.1", + "semver": "^7.3.4", + "set-blocking": "^2.0.0", + "signal-exit": "3.0.7", + "slash": "^3.0.0", + "ssri": "^10.0.6", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "strong-log-transformer": "2.1.0", + "tar": "6.2.1", + "temp-dir": "1.0.0", + "upath": "2.0.1", + "uuid": "^10.0.0", + "validate-npm-package-license": "^3.0.4", + "validate-npm-package-name": "5.0.1", + "wide-align": "1.1.5", + "write-file-atomic": "5.0.1", + "write-pkg": "4.0.0", + "yargs": "17.7.2", + "yargs-parser": "21.1.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@lerna/create/node_modules/argparse": { + "version": "2.0.1", + "dev": true, + "license": "Python-2.0" }, "node_modules/@lerna/create/node_modules/cliui": { "version": "8.0.1", @@ -3706,21 +4202,95 @@ "tslib": "^2.4.0" } }, - "node_modules/@types/estree": { - "version": "1.0.6", + "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/json-schema": { - "version": "7.0.15", + "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/minimatch": { - "version": "3.0.5", + "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": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "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, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "dev": true, + "license": "MIT" + }, + "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, @@ -3747,6 +4317,159 @@ "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 @@ -4349,6 +5072,27 @@ "proxy-from-env": "^1.1.0" } }, + "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": { + "@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": "^14.15.0 || ^16.10.0 || >=18.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.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", @@ -4364,6 +5108,53 @@ "estraverse": "^4.1.1" } }, + "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": { + "@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/babel-plugin-istanbul/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/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": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.1.14", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, "node_modules/babel-plugin-jsx-pragmatic": { "version": "1.0.2", "license": "MIT", @@ -4424,6 +5215,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/babel-register-esm": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/babel-register-esm/-/babel-register-esm-1.2.5.tgz", @@ -4904,6 +5737,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, @@ -5250,6 +6092,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, @@ -5324,6 +6175,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, @@ -5537,6 +6394,16 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, + "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, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, "node_modules/code-excerpt": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz", @@ -5557,6 +6424,12 @@ "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, @@ -6177,6 +7050,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, @@ -6406,6 +7300,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, @@ -6547,6 +7450,15 @@ "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, @@ -7189,6 +8101,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, @@ -7692,6 +8629,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, @@ -7714,8 +8660,24 @@ "node": ">=6" } }, - "node_modules/exponential-backoff": { - "version": "3.1.1", + "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, "license": "Apache-2.0" }, @@ -7804,6 +8766,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, @@ -8070,6 +9041,20 @@ "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==", + "dev": true, + "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", @@ -8203,6 +9188,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, @@ -8780,6 +9774,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, @@ -9355,6 +10355,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, @@ -9554,158 +10563,976 @@ "version": "1.0.4", "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-text-path": { + "version": "1.0.1", + "dev": true, + "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-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", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "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", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "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", + "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": "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/istanbul-lib-instrument/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-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-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": ">= 0.4" + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-text-path": { - "version": "1.0.1", + "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, - "license": "MIT", - "dependencies": { - "text-extensions": "^1.0.0" - }, "engines": { "node": ">=0.10.0" } }, - "node_modules/is-typed-array": { - "version": "1.1.7", + "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, - "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" + "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": ">= 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/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/is-unicode-supported": { - "version": "0.1.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, - "license": "MIT", + "bin": { + "semver": "bin/semver.js" + }, "engines": { "node": ">=10" - }, - "funding": { - "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-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, - "license": "MIT", "dependencies": { - "is-docker": "^2.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": ">=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-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": "ISC" - }, - "node_modules/isobject": { - "version": "3.0.1", - "license": "MIT", + "dependencies": { + "@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.10.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jackspeak": { - "version": "3.4.3", + "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": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/cliui": "^8.0.2" + "engines": { + "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/isaacs" - }, - "optionalDependencies": { - "@pkgjs/parseargs": "^0.11.0" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jake": { - "version": "10.9.2", + "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": "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" + "@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": ">=10" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-diff": { + "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, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "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", + "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": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, "node_modules/js-string-escape": { @@ -9905,6 +11732,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" @@ -10374,6 +12210,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, @@ -11095,6 +12940,15 @@ "node": "^16.14.0 || >=18.0.0" } }, + "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": { + "tmpl": "1.0.5" + } + }, "node_modules/map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -11928,6 +13782,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, @@ -13397,6 +15257,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, @@ -13462,6 +15335,22 @@ "node": ">=8" } }, + "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, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ] + }, "node_modules/querystring": { "version": "0.2.0", "dev": true, @@ -13955,6 +15844,15 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, + "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, + "engines": { + "node": ">=10" + } + }, "node_modules/responselike": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", @@ -14367,6 +16265,12 @@ "url": "https://opencollective.com/sinon" } }, + "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, @@ -14674,6 +16578,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, @@ -14967,6 +16884,20 @@ "node": ">=8" } }, + "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" + } + }, "node_modules/text-extensions": { "version": "1.9.0", "dev": true, @@ -15031,6 +16962,12 @@ "node": ">=14.14" } }, + "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-readable-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", @@ -15142,6 +17079,18 @@ "node": ">=0.10.0" } }, + "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": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/tsconfig-paths": { "version": "4.2.0", "dev": true, @@ -15541,6 +17490,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", @@ -15589,6 +17558,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, diff --git a/package.json b/package.json index 11f5e9d40..cdd1abfe3 100644 --- a/package.json +++ b/package.json @@ -8,11 +8,13 @@ "@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", "babel-register-esm": "^1.2.5", @@ -24,12 +26,14 @@ "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", "jsdom": "^25.0.1", "lerna": "^8.1.9", "lint-staged": "^15.2.11", 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..a808c21f6 100644 --- a/packages/connection/test/close.js +++ b/packages/connection/test/close.js @@ -1,23 +1,22 @@ "use strict"; -const test = require("ava"); const Connection = require(".."); const { EventEmitter, promise, timeout } = 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", (done) => { + expect.assertions(2); const conn = new Connection(); conn.parser = new EventEmitter(); conn.footerElement = () => { @@ -30,16 +29,16 @@ test.cb("timeout", (t) => { }; conn.on("output", (el) => { - t.is(el, ""); + expect(el).toBe(""); }); conn.close().catch((err) => { - t.is(err.name, "TimeoutError"); - t.end(); + expect(err.name).toBe("TimeoutError"); + done(); }); }); -test.cb("error on status closing", (t) => { - t.plan(2); +test("error on status closing", (done) => { + expect.assertions(2); const conn = new Connection(); conn.parser = new EventEmitter(); conn.footerElement = () => { @@ -53,15 +52,15 @@ 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(); + expect(err.name).toBe("Error"); + expect(err.message).toBe("Connection is closing"); + done(); }); conn.parser.emit("end"); }); -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 +73,7 @@ test("resolves", async (t) => { }; conn.on("output", (el) => { - t.is(el, ""); + expect(el).toBe(""); }); const promiseClose = conn.close(); @@ -82,10 +81,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 +97,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 +105,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", () => { + expect.assertions(2); const conn = new Connection(); conn.parser = null; conn.footerElement = () => { @@ -121,8 +120,10 @@ test("do not emit closing status if parser property is missing", (t) => { return Promise.all([ timeout(promise(conn, "status"), 500).catch((err) => - t.is(err.name, "TimeoutError"), + expect(err.name).toBe("TimeoutError"), ), - conn.close().catch((err) => t.pass(err)), + conn.close().catch((err) => { + expect(err).toBeInstanceOf(Error); + }), ]); }); diff --git a/packages/connection/test/connect.js b/packages/connection/test/connect.js index 2fb2451a6..2195b64d4 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,12 @@ 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 () => { const conn = new Connection(); const error = {}; @@ -35,21 +34,20 @@ 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"); } 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(); }); 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..6de0b46c8 100644 --- a/packages/connection/test/stop.js +++ b/packages/connection/test/stop.js @@ -1,42 +1,38 @@ "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(); }); -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(); }); -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(); }); -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(); }); 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..2fdc5b1ca 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")).toThrowError(new TypeError("Invalid domain.")); - t.throws(() => new JID(), { instanceOf: TypeError }); + expect(() => new JID()).toThrowError(new TypeError("Invalid domain.")); - t.throws(() => new JID("foo", "", "r"), { instanceOf: TypeError }); + expect(() => new JID("foo", "", "r")).toThrowError( + new TypeError("Invalid domain."), + ); - t.throws(() => new JID("foo", "", "r"), { instanceOf: TypeError }); + expect(() => new JID("foo", "", "r")).toThrowError( + 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..f99a6db74 100644 --- a/packages/jid/test/index.js +++ b/packages/jid/test/index.js @@ -1,37 +1,36 @@ "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"); jid.equal(A, B); - t.true(A.equals.calledWith(B)); + expect(A.equals.calledWith(B)).toBe(true); A.equals.restore(); }); -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..90d06a23a 100644 --- a/packages/reconnect/test.js +++ b/packages/reconnect/test.js @@ -1,21 +1,18 @@ "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", () => { const entity = new EventEmitter(); const reconnect = _reconnect({ entity }); - reconnect.scheduleReconnect = () => { - t.pass(); - }; + reconnect.scheduleReconnect = () => {}; entity.emit("disconnect"); }); -test("#reconnect", async (t) => { +test("#reconnect", async () => { const entity = new EventEmitter(); const reconnect = _reconnect({ entity }); @@ -26,12 +23,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..494c982e1 100644 --- a/packages/starttls/test.js +++ b/packages/starttls/test.js @@ -1,7 +1,6 @@ "use strict"; const { mock, stub } = require("sinon"); -const test = require("ava"); const { mockClient, promise, delay } = require("@xmpp/test"); const tls = require("tls"); const net = require("net"); @@ -13,7 +12,7 @@ function mockSocket() { return socket; } -test("success", async (t) => { +test("success", async () => { const { entity } = mockClient(); entity.socket = mockSocket(); const { socket, options } = entity; @@ -37,10 +36,7 @@ test("success", async (t) => { , ); - t.deepEqual( - await promise(entity, "send"), - , - ); + expect(await promise(entity, "send")).toEqual(); entity.mockInput(); @@ -49,7 +45,7 @@ test("success", async (t) => { expectTLSConnect.verify(); }); -test("failure", async (t) => { +test("failure", async () => { const { entity } = mockClient(); entity.socket = mockSocket(); @@ -59,14 +55,11 @@ 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..9a44e053c 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.length).toBe(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..6ecb6425f 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"); @@ -23,7 +21,7 @@ const packages = Object.fromEntries( 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).length).toBe(Object.keys(packages).length); + expect(dependencies).toEqual(packages); }); diff --git a/test/browser.js b/test/browser.js index e3fe36e9e..a0fa8d23d 100644 --- a/test/browser.js +++ b/test/browser.js @@ -4,7 +4,6 @@ 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"); @@ -22,7 +21,7 @@ const xmppjs = readFileSync("./packages/client/dist/xmpp.js", { encoding: "utf8", }); -test.beforeEach((t) => { +beforeEach(() => { const { window } = new JSDOM(``, { runScripts: "dangerously" }); window.fetch = fetch; const { document } = window; @@ -33,7 +32,7 @@ test.beforeEach((t) => { return server.restart(); }); -test.serial("client ws://", async (t) => { +test("client ws://", async () => { const xmpp = t.context({ credentials, service, @@ -41,5 +40,5 @@ test.serial("client ws://", async (t) => { 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..50c4f3a56 100644 --- a/test/client.js +++ b/test/client.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const { client, xml, jid } = require("../packages/client"); const debug = require("../packages/debug"); const server = require("../server"); @@ -13,43 +12,41 @@ const credentials = { username, password }; const domain = "localhost"; const JID = jid(username, domain).toString(); -test.beforeEach(() => { +beforeEach(() => { return server.restart(); }); -test.afterEach((t) => { +afterEach(() => { if (t.context.xmpp && t.context.xmpp.status === "online") { return t.context.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; debug(xmpp); - xmpp.on("connect", () => { - t.pass(); - }); + xmpp.on("connect", () => {}); 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", done => { + expect.assertions(6); const xmpp = client({ service: domain, @@ -59,31 +56,31 @@ test.serial.cb("bad credentials", (t) => { let error; - xmpp.on("connect", () => t.pass()); - xmpp.once("open", () => t.pass()); + xmpp.on("connect", () => ); + xmpp.once("open", () => ); - xmpp.on("online", () => t.fail()); + xmpp.on("online", () => done.fail()); xmpp.on("error", (err) => { - t.true(err instanceof Error); - t.is(err.name, "SASLError"); - t.is(err.condition, "not-authorized"); + expect(err instanceof Error).toBe(true); + expect(err.name).toBe("SASLError"); + expect(err.condition).toBe("not-authorized"); error = err; }); xmpp .start() - .then(() => t.fail()) + .then(() => done.fail()) .catch((err) => { - t.is(err, error); - t.end(); + expect(err).toBe(error); + done(); }); t.context.xmpp = xmpp; }); -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 }); @@ -93,10 +90,9 @@ test.serial.cb("reconnects when server restarts gracefully", (t) => { xmpp.on("online", async () => { c++; - t.pass(); if (c === 2) { await xmpp.stop(); - t.end(); + done(); } else { await server.restart(); } @@ -107,8 +103,8 @@ test.serial.cb("reconnects when server restarts gracefully", (t) => { 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 }); @@ -118,10 +114,9 @@ test.serial.cb("reconnects when server restarts non-gracefully", (t) => { xmpp.on("online", async () => { c++; - t.pass(); if (c === 2) { await xmpp.stop(); - t.end(); + done(); } else { await server.restart("SIGKILL"); } @@ -132,8 +127,8 @@ test.serial.cb("reconnects when server restarts non-gracefully", (t) => { 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 }); debug(xmpp); @@ -141,20 +136,20 @@ test.serial.cb("does not reconnect when stop is called", (t) => { xmpp.on("online", async () => { await xmpp.stop(); server.stop(); - t.end(); + done(); }); - xmpp.on("close", () => t.pass()); + xmpp.on("close", () => ); - xmpp.on("offline", () => t.pass()); + xmpp.on("offline", () => ); 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 }); debug(xmpp); @@ -162,27 +157,27 @@ test.serial.cb("anonymous authentication", (t) => { xmpp.on("online", async () => { await xmpp.stop(); await server.stop(); - t.end(); + done(); }); - xmpp.on("close", () => t.pass()); + xmpp.on("close", () => ); - xmpp.on("offline", () => t.pass()); + xmpp.on("offline", () => ); xmpp.start(); t.context.xmpp = xmpp; }); -test.serial("auto", async (t) => { +test("auto", async () => { const 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) => { +test("ws IPv4", async () => { const xmpp = client({ credentials, service: "ws://127.0.0.1:5280/xmpp-websocket", @@ -191,10 +186,10 @@ test.serial("ws IPv4", async (t) => { 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) => { +test("ws IPv6", async () => { const xmpp = client({ credentials, service: "ws://[::1]:5280/xmpp-websocket", @@ -203,10 +198,10 @@ test.serial("ws IPv6", async (t) => { 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) => { +test("ws domain", async () => { const xmpp = client({ credentials, service: "ws://localhost:5280/xmpp-websocket", @@ -214,11 +209,11 @@ test.serial("ws domain", async (t) => { 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) => { +test("wss IPv4", async () => { const xmpp = client({ credentials, service: "wss://127.0.0.1:5281/xmpp-websocket", @@ -227,11 +222,11 @@ test.serial("wss IPv4", async (t) => { 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) => { +test("wss IPv6", async () => { const xmpp = client({ credentials, service: "wss://[::1]:5281/xmpp-websocket", @@ -240,10 +235,10 @@ test.serial("wss IPv6", async (t) => { 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) => { +test("wss domain", async () => { const xmpp = client({ credentials, service: "wss://localhost:5281/xmpp-websocket", @@ -251,10 +246,10 @@ test.serial("wss domain", async (t) => { 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) => { +test("xmpp IPv4", async () => { const xmpp = client({ credentials, service: "xmpp://127.0.0.1:5222", @@ -263,26 +258,26 @@ test.serial("xmpp IPv4", async (t) => { 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) => { +test("xmpp IPv6", async () => { const 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) => { +test("xmpp domain", async () => { const 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) => { +test("xmpps IPv4", async () => { const xmpp = client({ credentials, service: "xmpps://127.0.0.1:5223", @@ -291,21 +286,21 @@ test.serial("xmpps IPv4", async (t) => { 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) => { +test("xmpps IPv6", async () => { const 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) => { +test("xmpps domain", async () => { const 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..65395d5f8 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,45 +9,43 @@ const service = "xmpp://localhost:5347"; const domain = "component.localhost"; const options = { password, service, domain }; -test.beforeEach(() => { +beforeEach(() => { return server.restart(); }); -test.afterEach((t) => { +afterEach(() => { if (t.context.xmpp) { return t.context.xmpp.stop(); } }); -test.serial("component", async (t) => { - t.plan(6); +test("component", async () => { + expect.assertions(6); const xmpp = component(options); t.context.xmpp = xmpp; debug(xmpp); - xmpp.on("connect", () => { - t.pass(); - }); + xmpp.on("connect", () => {}); 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); @@ -58,10 +55,9 @@ test.serial.cb("reconnects when server restarts", (t) => { xmpp.on("online", async () => { c++; - t.pass(); if (c === 2) { await xmpp.stop(); - t.end(); + done(); } else { server.restart(); } @@ -72,8 +68,8 @@ test.serial.cb("reconnects when server restarts", (t) => { 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 = component(options); debug(xmpp); @@ -81,12 +77,12 @@ test.serial.cb("does not reconnect when stop is called", (t) => { xmpp.on("online", async () => { await xmpp.stop(); await server.stop(); - t.end(); + done(); }); - xmpp.on("close", () => t.pass()); + xmpp.on("close", () => ); - xmpp.on("offline", () => t.pass()); + xmpp.on("offline", () => ); xmpp.start(); diff --git a/test/see-other-host.js b/test/see-other-host.js index 61d9c000d..2ad4a6755 100644 --- a/test/see-other-host.js +++ b/test/see-other-host.js @@ -1,6 +1,5 @@ "use strict"; -const test = require("ava"); const { client, jid } = require("../packages/client"); const debug = require("../packages/debug"); const server = require("../server"); @@ -13,17 +12,17 @@ const credentials = { username, password }; const domain = "localhost"; const JID = jid(username, domain).toString(); -test.beforeEach(() => { +beforeEach(() => { return server.restart(); }); -test.afterEach((t) => { +afterEach(() => { if (t.context.xmpp && t.context.xmpp.status === "online") { return t.context.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"); @@ -50,5 +49,5 @@ test.serial("see-other-host", async (t) => { debug(xmpp); t.context.xmpp = xmpp; const address = await xmpp.start(); - t.is(address.bare().toString(), JID); + expect(address.bare().toString()).toBe(JID); }); From cdf870de9545c0415868ce29419687e906cf33ec Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 16:06:45 +0100 Subject: [PATCH 12/17] f --- Makefile | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 61388dbab..fb4cb5265 100644 --- a/Makefile +++ b/Makefile @@ -13,13 +13,13 @@ 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 diff --git a/package.json b/package.json index cdd1abfe3..873f58479 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "uglify-js": "^3.19.3" }, "scripts": { - "test": "ava", + "test": "jest", "lint": "eslint --cache .", "preversion": "make bundle" }, From c124e143aed2bc48765d58cc75a10565798251d7 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 21:01:23 +0100 Subject: [PATCH 13/17] f --- CONTRIBUTING.md | 4 +- Makefile | 15 +- ava.config.js | 30 - babel.config.js | 2 +- e2e.config.js | 31 +- eslint.config.mjs | 21 +- jest.config.js | 5 +- package-lock.json | 1645 +---------------------------------- package.json | 4 +- packages/xml/test/Parser.js | 4 +- packages/xmpp.js/test.js | 11 +- test/browser.js | 16 +- test/client.js | 114 ++- test/component.js | 41 +- test/see-other-host.js | 11 +- 15 files changed, 158 insertions(+), 1796 deletions(-) delete mode 100644 ava.config.js 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 fb4cb5265..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,7 +7,7 @@ setup: node bundle.js lint: - ./node_modules/.bin/eslint --cache . + npx eslint --cache . test: cd packages/xmpp.js/ && npm run prepublish @@ -22,11 +22,14 @@ ci: 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 ad284f6a6..12861b7ed 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,6 @@ "use strict"; -module.exports = (api) => { +module.exports = function config(api) { const isTest = api.env("test"); if (isTest) { 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 4f3dd9628..5784f62e9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -12,8 +12,6 @@ export default [ "**/dist/*.js", "bundle.js", "packages/xmpp.js/index.js", - "ava.config.js", - "e2e.config.js", "eslint.config.mjs", ], }, @@ -64,11 +62,11 @@ export default [ "n/no-unpublished-require": 0, // doesn't play nice with monorepo "n/no-extraneous-require": [ "error", - { allowModules: ["ava", "sinon", "@xmpp/test"] }, + { allowModules: ["sinon", "@xmpp/test"] }, ], "n/no-extraneous-import": [ "error", - { allowModules: ["ava", "sinon", "@xmpp/test"] }, + { allowModules: ["sinon", "@xmpp/test"] }, ], // promise @@ -108,8 +106,19 @@ export default [ "jest/no-disabled-tests": "warn", "jest/no-focused-tests": "error", "jest/no-identical-title": "error", - "jest/prefer-to-have-length": "warn", - "jest/valid-expect": "error", + "jest/prefer-to-have-length": "error", + + // 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 index dc026956e..35e0824ef 100644 --- a/jest.config.js +++ b/jest.config.js @@ -3,13 +3,12 @@ const { defaults } = require("jest-config"); /** @type {import('jest').Config} */ -const config = { +module.exports = { testMatch: [...defaults.testMatch, "**/test/*.js"], testPathIgnorePatterns: [ ...defaults.testPathIgnorePatterns, "/test/", "/packages/test/", ], + setupFilesAfterEnv: ["jest-extended/all"], }; - -module.exports = config; diff --git a/package-lock.json b/package-lock.json index a14f11d90..e1c4186da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "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", @@ -19,7 +18,6 @@ "@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", @@ -40,6 +38,8 @@ "exorcist": "^2.0.0", "husky": "^9.1.7", "jest": "^29.7.0", + "jest-config": "^29.7.0", + "jest-extended": "^4.0.2", "jsdom": "^25.0.1", "lerna": "^8.1.9", "lint-staged": "^15.2.11", @@ -65,116 +65,6 @@ "node": ">=6.0.0" } }, - "node_modules/@ava/babel": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - } - }, "node_modules/@babel/cli": { "version": "7.26.4", "license": "MIT", @@ -695,36 +585,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.16.5", "dev": true, @@ -743,22 +603,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.21.0", - "dev": true, - "license": "MIT", - "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" - }, - "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", "dev": true, @@ -821,17 +665,6 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/plugin-syntax-import-assertions": { "version": "7.26.0", "dev": true, @@ -2008,25 +1841,6 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, - "node_modules/@concordance/react": { - "version": "2.0.0", - "dev": true, - "license": "ISC", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@emnapi/core": { "version": "1.3.1", "dev": true, @@ -4082,14 +3896,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@sindresorhus/is": { - "version": "0.14.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "dev": true, @@ -4129,17 +3935,6 @@ "dev": true, "license": "(Unlicense OR Apache-2.0)" }, - "node_modules/@szmarczak/http-timer": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "dependencies": { - "defer-to-connect": "^1.0.1" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@tufjs/canonical-json": { "version": "2.0.0", "dev": true, @@ -4675,17 +4470,6 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.4", - "dev": true, - "license": "MIT", - "dependencies": { - "acorn": "^8.11.0" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/add-stream": { "version": "1.0.0", "dev": true, @@ -4726,14 +4510,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-align": { - "version": "3.0.1", - "dev": true, - "license": "ISC", - "dependencies": { - "string-width": "^4.1.0" - } - }, "node_modules/ansi-colors": { "version": "4.1.3", "dev": true, @@ -4819,14 +4595,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, @@ -4845,14 +4613,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, @@ -4899,14 +4659,6 @@ "inherits": "2.0.1" } }, - "node_modules/astral-regex": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/async": { "version": "3.2.6", "dev": true, @@ -4917,122 +4669,6 @@ "dev": true, "license": "MIT" }, - "node_modules/ava": { - "version": "3.15.0", - "dev": true, - "license": "MIT", - "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" - }, - "engines": { - "node": ">=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0 <15 || >=15" - } - }, - "node_modules/ava/node_modules/ci-info": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, - "node_modules/ava/node_modules/cli-truncate": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "slice-ansi": "^3.0.0", - "string-width": "^4.2.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/slice-ansi": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ansi-styles": "^4.0.0", - "astral-regex": "^2.0.0", - "is-fullwidth-code-point": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/ava/node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "dev": true, - "license": "MIT", - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/available-typed-arrays": { "version": "1.0.4", "dev": true, @@ -5075,20 +4711,6 @@ "@babel/core": "^7.8.0" } }, - "node_modules/babel-plugin-espower": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "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-istanbul": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz", @@ -5324,8 +4946,8 @@ }, "node_modules/binary-extensions": { "version": "2.2.0", - "devOptional": true, "license": "MIT", + "optional": true, "engines": { "node": ">=8" } @@ -5376,59 +4998,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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/boxen/node_modules/type-fest": { - "version": "0.20.2", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "license": "MIT", @@ -5851,45 +5425,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/cacheable-request": { - "version": "6.1.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cached-path-relative": { "version": "1.0.2", "dev": true, @@ -5922,25 +5457,6 @@ "node": ">= 0.4" } }, - "node_modules/call-matcher": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "core-js": "^2.0.0", - "deep-equal": "^1.0.0", - "espurify": "^1.6.0", - "estraverse": "^4.0.0" - } - }, - "node_modules/call-signature": { - "version": "0.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", @@ -6069,8 +5585,8 @@ }, "node_modules/chokidar": { "version": "3.6.0", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -6098,11 +5614,6 @@ "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", @@ -6123,11 +5634,6 @@ "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", @@ -6169,25 +5675,6 @@ "node": ">=6" } }, - "node_modules/clean-yaml-object": { - "version": "0.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/cli-boxes": { - "version": "2.2.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cli-cursor": { "version": "3.1.0", "dev": true, @@ -6319,25 +5806,6 @@ "node": ">=0.10.0" } }, - "node_modules/clone-response": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/cmd-shim": { "version": "6.0.3", "dev": true, @@ -6356,17 +5824,6 @@ "node": ">= 0.12.0" } }, - "node_modules/code-excerpt": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "convert-to-spaces": "^1.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -6461,11 +5918,6 @@ "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, @@ -6509,54 +5961,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", - "dev": true, - "license": "BSD-2-Clause", - "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 @@ -6910,20 +6314,6 @@ "dev": true, "license": "MIT" }, - "node_modules/convert-to-spaces": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/core-js": { - "version": "2.6.12", - "dev": true, - "hasInstallScript": true, - "license": "MIT" - }, "node_modules/core-js-compat": { "version": "3.39.0", "dev": true, @@ -7055,14 +6445,6 @@ "node": "*" } }, - "node_modules/crypto-random-string": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/cssesc": { "version": "3.0.0", "dev": true, @@ -7085,17 +6467,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, @@ -7130,17 +6501,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, @@ -7217,25 +6577,6 @@ "dev": true, "license": "MIT" }, - "node_modules/deep-equal": { - "version": "1.1.2", - "dev": true, - "license": "MIT", - "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" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/deep-extend": { "version": "0.6.0", "dev": true, @@ -7266,11 +6607,6 @@ "clone": "^1.0.2" } }, - "node_modules/defer-to-connect": { - "version": "1.1.3", - "dev": true, - "license": "MIT" - }, "node_modules/define-data-property": { "version": "1.1.4", "license": "MIT", @@ -7314,27 +6650,6 @@ "dev": true, "license": "MIT" }, - "node_modules/del": { - "version": "6.1.1", - "dev": true, - "license": "MIT", - "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, @@ -7534,11 +6849,6 @@ "readable-stream": "^2.0.2" } }, - "node_modules/duplexer3": { - "version": "0.1.5", - "dev": true, - "license": "BSD-3-Clause" - }, "node_modules/eastasianwidth": { "version": "0.2.0", "dev": true, @@ -7581,31 +6891,11 @@ "dev": true, "license": "MIT" }, - "node_modules/emittery": { - "version": "0.8.1", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "call-signature": "0.0.2", - "core-js": "^2.0.0" - } - }, "node_modules/encoding": { "version": "0.1.13", "license": "MIT", @@ -7697,14 +6987,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/equal-length": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/err-code": { "version": "2.0.3", "dev": true, @@ -7796,11 +7078,6 @@ "next-tick": "~1.0.0" } }, - "node_modules/es6-error": { - "version": "4.1.1", - "dev": true, - "license": "MIT" - }, "node_modules/es6-iterator": { "version": "2.0.3", "dev": true, @@ -7872,14 +7149,6 @@ "node": ">=6" } }, - "node_modules/escape-goat": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/escape-string-regexp": { "version": "4.0.0", "dev": true, @@ -8387,17 +7656,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/espower-location-detector": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "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, @@ -8426,14 +7684,6 @@ "node": ">=4" } }, - "node_modules/espurify": { - "version": "1.8.1", - "dev": true, - "license": "MIT", - "dependencies": { - "core-js": "^2.0.0" - } - }, "node_modules/esquery": { "version": "1.6.0", "dev": true, @@ -8658,11 +7908,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, @@ -8980,7 +8225,6 @@ "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -8997,14 +8241,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -9340,28 +8576,6 @@ "node": ">= 6" } }, - "node_modules/global-dirs": { - "version": "3.0.1", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10" - } - }, "node_modules/globals": { "version": "11.12.0", "license": "MIT", @@ -9398,57 +8612,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/got": { - "version": "9.6.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "mimic-response": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/got/node_modules/get-stream": { - "version": "4.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/got/node_modules/mimic-response": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/graceful-fs": { "version": "4.2.11", "dev": true, @@ -9585,14 +8748,6 @@ "dev": true, "license": "ISC" }, - "node_modules/has-yarn": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/hash-base": { "version": "3.1.0", "license": "MIT", @@ -9626,29 +8781,6 @@ "minimalistic-assert": "^1.0.1" } }, - "node_modules/hasha": { - "version": "5.2.2", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=8" - } - }, "node_modules/hasown": { "version": "2.0.2", "license": "MIT", @@ -9814,14 +8946,6 @@ "node": ">= 4" } }, - "node_modules/ignore-by-default": { - "version": "2.1.0", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=10 <11 || >=12 <13 || >=14" - } - }, "node_modules/ignore-walk": { "version": "6.0.5", "dev": true, @@ -9892,14 +9016,6 @@ "node": ">=4" } }, - "node_modules/import-lazy": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/import-local": { "version": "3.1.0", "dev": true, @@ -10118,14 +9234,6 @@ "version": "1.3.1", "license": "Unlicense" }, - "node_modules/irregular-plurals": { - "version": "3.5.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-arguments": { "version": "1.1.1", "dev": true, @@ -10158,8 +9266,8 @@ }, "node_modules/is-binary-path": { "version": "2.1.0", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -10210,22 +9318,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-ci": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "ci-info": "^2.0.0" - }, - "bin": { - "is-ci": "bin.js" - } - }, - "node_modules/is-ci/node_modules/ci-info": { - "version": "2.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/is-core-module": { "version": "2.6.0", "dev": true, @@ -10273,11 +9365,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-error": { - "version": "2.2.2", - "dev": true, - "license": "MIT" - }, "node_modules/is-extglob": { "version": "2.1.1", "devOptional": true, @@ -10328,21 +9415,6 @@ "node": ">=0.10.0" } }, - "node_modules/is-installed-globally": { - "version": "0.4.0", - "dev": true, - "license": "MIT", - "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, @@ -10366,17 +9438,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-npm": { - "version": "5.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/is-number": { "version": "7.0.0", "devOptional": true, @@ -10406,22 +9467,6 @@ "node": ">=8" } }, - "node_modules/is-path-cwd": { - "version": "2.2.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-obj": { "version": "1.1.0", "dev": true, @@ -10443,11 +9488,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", @@ -10536,11 +9576,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/is-unicode-supported": { "version": "0.1.0", "dev": true, @@ -10552,16 +9587,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-url": { - "version": "1.2.4", - "dev": true, - "license": "MIT" - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "dev": true, - "license": "MIT" - }, "node_modules/is-wsl": { "version": "2.2.0", "dev": true, @@ -10573,11 +9598,6 @@ "node": ">=8" } }, - "node_modules/is-yarn-global": { - "version": "0.3.0", - "dev": true, - "license": "MIT" - }, "node_modules/isarray": { "version": "1.0.0", "dev": true, @@ -11039,6 +10059,27 @@ "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, @@ -11454,14 +10495,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/js-string-escape": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.8" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "license": "MIT" @@ -11532,11 +10565,6 @@ "node": ">=6" } }, - "node_modules/json-buffer": { - "version": "3.0.0", - "dev": true, - "license": "MIT" - }, "node_modules/json-parse-better-errors": { "version": "1.0.2", "dev": true, @@ -11634,14 +10662,6 @@ "dev": true, "license": "MIT" }, - "node_modules/keyv": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "json-buffer": "3.0.0" - } - }, "node_modules/kind-of": { "version": "6.0.3", "license": "MIT", @@ -11671,17 +10691,6 @@ "stream-splicer": "^2.0.0" } }, - "node_modules/latest-version": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "package-json": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/lerna": { "version": "8.1.9", "dev": true, @@ -12517,11 +11526,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.flattendeep": { - "version": "4.4.0", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.get": { "version": "4.4.2", "dev": true, @@ -12774,14 +11778,6 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/lowercase-keys": { - "version": "1.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/lru-cache": { "version": "6.0.0", "dev": true, @@ -12808,20 +11804,6 @@ "sourcemap-codec": "^1.4.1" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "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, @@ -12853,17 +11835,6 @@ "tmpl": "1.0.5" } }, - "node_modules/map-age-cleaner": { - "version": "0.1.3", - "dev": true, - "license": "MIT", - "dependencies": { - "p-defer": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/map-obj": { "version": "4.3.0", "dev": true, @@ -12875,17 +11846,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/matcher": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-string-regexp": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/math-intrinsics": { "version": "1.1.0", "license": "MIT", @@ -12893,17 +11853,6 @@ "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_modules/md5.js": { "version": "1.3.5", "license": "MIT", @@ -12913,29 +11862,6 @@ "safe-buffer": "^5.1.2" } }, - "node_modules/mem": { - "version": "8.1.1", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/meow": { "version": "8.1.2", "dev": true, @@ -13748,14 +12674,6 @@ "node": ">=0.10.0" } }, - "node_modules/normalize-url": { - "version": "4.5.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/npm-bundled": { "version": "3.0.1", "dev": true, @@ -14098,21 +13016,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object-is": { - "version": "1.1.6", - "dev": true, - "license": "MIT", - "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", @@ -14276,36 +13179,6 @@ "node": ">=0.10.0" } }, - "node_modules/p-cancelable": { - "version": "1.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/p-defer": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-event": { - "version": "4.2.0", - "dev": true, - "license": "MIT", - "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, @@ -14431,34 +13304,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/package-hash": { - "version": "4.0.0", - "dev": true, - "license": "ISC", - "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", - "dev": true, - "license": "MIT", - "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, @@ -14563,14 +13408,6 @@ "node": ">=4" } }, - "node_modules/parse-ms": { - "version": "2.1.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/parse-passwd": { "version": "1.0.0", "license": "MIT", @@ -14738,99 +13575,6 @@ "node": ">= 6" } }, - "node_modules/pkg-conf": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/load-json-file": { - "version": "5.3.0", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "MIT", - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/path-exists": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/pify": { - "version": "4.0.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/pkg-conf/node_modules/strip-bom": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, - "node_modules/pkg-conf/node_modules/type-fest": { - "version": "0.3.1", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=6" - } - }, "node_modules/pkg-dir": { "version": "3.0.0", "license": "MIT", @@ -14876,21 +13620,7 @@ "version": "3.0.0", "license": "MIT", "engines": { - "node": ">=4" - } - }, - "node_modules/plur": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "irregular-plurals": "^3.2.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=4" } }, "node_modules/pluralize": { @@ -14950,14 +13680,6 @@ "node": ">= 0.8.0" } }, - "node_modules/prepend-http": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "node_modules/prettier": { "version": "3.4.2", "dev": true, @@ -14993,20 +13715,6 @@ "node": ">= 0.8" } }, - "node_modules/pretty-ms": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "parse-ms": "^2.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/prettycli": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/prettycli/-/prettycli-1.4.3.tgz", @@ -15215,17 +13923,6 @@ "dev": true, "license": "MIT" }, - "node_modules/pupa": { - "version": "2.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "escape-goat": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/pure-rand": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", @@ -15497,8 +14194,8 @@ }, "node_modules/readdirp": { "version": "3.6.0", - "devOptional": true, "license": "MIT", + "optional": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -15554,23 +14251,6 @@ "regexp-tree": "bin/regexp-tree" } }, - "node_modules/regexp.prototype.flags": { - "version": "1.5.3", - "dev": true, - "license": "MIT", - "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" - } - }, "node_modules/regexpp": { "version": "3.2.0", "dev": true, @@ -15620,28 +14300,6 @@ "regjsparser": "bin/parser" } }, - "node_modules/registry-auth-token": { - "version": "4.2.2", - "dev": true, - "license": "MIT", - "dependencies": { - "rc": "1.2.8" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/registry-url": { - "version": "5.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "rc": "^1.2.8" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/regjsgen": { "version": "0.8.0", "dev": true, @@ -15665,17 +14323,6 @@ "jsesc": "bin/jsesc" } }, - "node_modules/release-zalgo": { - "version": "1.0.0", - "dev": true, - "license": "ISC", - "dependencies": { - "es6-error": "^4.0.1" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/require-directory": { "version": "2.1.1", "dev": true, @@ -15733,14 +14380,6 @@ "node": ">=10" } }, - "node_modules/responselike": { - "version": "1.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "lowercase-keys": "^1.0.0" - } - }, "node_modules/restore-cursor": { "version": "3.1.0", "dev": true, @@ -15775,20 +14414,6 @@ "dev": true, "license": "MIT" }, - "node_modules/rimraf": { - "version": "3.0.2", - "dev": true, - "license": "ISC", - "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", @@ -15935,42 +14560,6 @@ "semver": "bin/semver.js" } }, - "node_modules/semver-diff": { - "version": "3.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^6.3.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/serialize-error": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "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", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/set-blocking": { "version": "2.0.0", "dev": true, @@ -15991,20 +14580,6 @@ "node": ">= 0.4" } }, - "node_modules/set-function-name": { - "version": "2.0.2", - "dev": true, - "license": "MIT", - "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)", @@ -16539,17 +15114,6 @@ "node": ">=8" } }, - "node_modules/strip-bom-buf": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "is-utf8": "^0.2.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/strip-final-newline": { "version": "2.0.0", "dev": true, @@ -16604,21 +15168,6 @@ "minimist": "^1.1.0" } }, - "node_modules/supertap": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "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, @@ -16743,14 +15292,6 @@ "node": ">=8" } }, - "node_modules/temp-dir": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -16787,14 +15328,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, @@ -16835,14 +15368,6 @@ "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==", "dev": true }, - "node_modules/to-readable-stream": { - "version": "1.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "devOptional": true, @@ -16936,14 +15461,6 @@ "node": ">=8" } }, - "node_modules/trim-off-newlines": { - "version": "1.0.3", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ts-api-utils": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.4.3.tgz", @@ -17052,14 +15569,6 @@ "dev": true, "license": "MIT" }, - "node_modules/typedarray-to-buffer": { - "version": "3.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "is-typedarray": "^1.0.0" - } - }, "node_modules/typescript": { "version": "5.7.2", "dev": true, @@ -17182,17 +15691,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/unique-string": { - "version": "2.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "crypto-random-string": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/universal-user-agent": { "version": "6.0.1", "dev": true, @@ -17243,44 +15741,6 @@ "browserslist": ">= 4.21.0" } }, - "node_modules/update-notifier": { - "version": "5.1.0", - "dev": true, - "license": "BSD-2-Clause", - "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", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/uri-js": { "version": "4.4.1", "dev": true, @@ -17306,17 +15766,6 @@ "querystring": "0.2.0" } }, - "node_modules/url-parse-lax": { - "version": "3.0.0", - "dev": true, - "license": "MIT", - "dependencies": { - "prepend-http": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/url/node_modules/punycode": { "version": "1.3.2", "dev": true, @@ -17444,14 +15893,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, @@ -17558,17 +15999,6 @@ "string-width": "^1.0.2 || 2 || 3 || 4" } }, - "node_modules/widest-line": { - "version": "3.1.0", - "dev": true, - "license": "MIT", - "dependencies": { - "string-width": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/word-wrap": { "version": "1.2.5", "dev": true, @@ -17652,17 +16082,6 @@ "version": "1.0.2", "license": "ISC" }, - "node_modules/write-file-atomic": { - "version": "3.0.3", - "dev": true, - "license": "ISC", - "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, @@ -17757,14 +16176,6 @@ } } }, - "node_modules/xdg-basedir": { - "version": "4.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/xml-name-validator": { "version": "5.0.0", "dev": true, diff --git a/package.json b/package.json index 873f58479..3f49a1658 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,6 @@ "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", @@ -13,7 +12,6 @@ "@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", @@ -34,6 +32,8 @@ "exorcist": "^2.0.0", "husky": "^9.1.7", "jest": "^29.7.0", + "jest-config": "^29.7.0", + "jest-extended": "^4.0.2", "jsdom": "^25.0.1", "lerna": "^8.1.9", "lint-staged": "^15.2.11", diff --git a/packages/xml/test/Parser.js b/packages/xml/test/Parser.js index 9a44e053c..eca7891ed 100644 --- a/packages/xml/test/Parser.js +++ b/packages/xml/test/Parser.js @@ -2,7 +2,7 @@ const Parser = require("../lib/Parser"); -test("stream parser", done => { +test("stream parser", (done) => { const parser = new Parser(); expect.assertions(5); @@ -16,7 +16,7 @@ test("stream parser", done => { parser.on("element", (el) => { expect(el.parent).toBe(startElement); - expect(startElement.children.length).toBe(0); + expect(startElement.children).toHaveLength(0); expect(el.toString()).toBe("hello"); }); diff --git a/packages/xmpp.js/test.js b/packages/xmpp.js/test.js index 6ecb6425f..c822e8002 100644 --- a/packages/xmpp.js/test.js +++ b/packages/xmpp.js/test.js @@ -9,12 +9,9 @@ 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}`]; }), ); @@ -22,6 +19,6 @@ const packages = Object.fromEntries( const { dependencies } = require("./package.json"); test("depends on all other packages", () => { - expect(Object.keys(dependencies).length).toBe(Object.keys(packages).length); + expect(Object.keys(dependencies)).toHaveLength(Object.keys(packages).length); expect(dependencies).toEqual(packages); }); diff --git a/test/browser.js b/test/browser.js index a0fa8d23d..8200bee19 100644 --- a/test/browser.js +++ b/test/browser.js @@ -21,19 +21,25 @@ const xmppjs = readFileSync("./packages/client/dist/xmpp.js", { encoding: "utf8", }); -beforeEach(() => { - 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("client ws://", async () => { - const xmpp = t.context({ + xmpp = window.XMPP.client({ credentials, service, }); diff --git a/test/client.js b/test/client.js index 50c4f3a56..316a5e3f2 100644 --- a/test/client.js +++ b/test/client.js @@ -12,24 +12,25 @@ const credentials = { username, password }; const domain = "localhost"; const JID = jid(username, domain).toString(); -beforeEach(() => { - return server.restart(); +let xmpp; + +beforeEach(async () => { + await server.restart(); }); -afterEach(() => { - if (t.context.xmpp && t.context.xmpp.status === "online") { - return t.context.xmpp.stop(); - } +afterEach(async () => { + await xmpp?.stop(); }); 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", () => {}); + xmpp.on("connect", () => { + expect().pass(); + }); xmpp.once("open", (el) => { expect(el instanceof xml.Element).toBe(true); @@ -45,10 +46,10 @@ test("client", async () => { expect(address.bare().toString()).toBe(JID); }); -test("bad credentials", done => { +test("bad credentials", (done) => { expect.assertions(6); - const xmpp = client({ + xmpp = client({ service: domain, credentials: { ...credentials, password: "nope" }, }); @@ -56,8 +57,12 @@ test("bad credentials", done => { let error; - xmpp.on("connect", () => ); - xmpp.once("open", () => ); + xmpp.on("connect", () => { + expect().pass(); + }); + xmpp.once("open", () => { + expect().pass(); + }); xmpp.on("online", () => done.fail()); @@ -75,21 +80,20 @@ test("bad credentials", done => { expect(err).toBe(error); done(); }); - - t.context.xmpp = xmpp; }); -test("reconnects when server restarts gracefully", done => { +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++; + expect().pass(); if (c === 2) { await xmpp.stop(); done(); @@ -99,21 +103,20 @@ test("reconnects when server restarts gracefully", done => { }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test("reconnects when server restarts non-gracefully", done => { +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++; + expect().pass(); if (c === 2) { await xmpp.stop(); done(); @@ -123,14 +126,12 @@ test("reconnects when server restarts non-gracefully", done => { }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test("does not reconnect when stop is called", done => { +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 () => { @@ -139,19 +140,21 @@ test("does not reconnect when stop is called", done => { done(); }); - xmpp.on("close", () => ); + xmpp.on("close", () => { + expect().pass(); + }); - xmpp.on("offline", () => ); + xmpp.on("offline", () => { + expect().pass(); + }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test("anonymous authentication", done => { +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 () => { @@ -160,147 +163,136 @@ test("anonymous authentication", done => { done(); }); - xmpp.on("close", () => ); + xmpp.on("close", () => { + expect().pass(); + }); - xmpp.on("offline", () => ); + xmpp.on("offline", () => { + expect().pass(); + }); xmpp.start(); - - t.context.xmpp = xmpp; }); test("auto", async () => { - const xmpp = client({ credentials, service: domain }); + xmpp = client({ credentials, service: domain }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("ws IPv4", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "ws://127.0.0.1:5280/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("ws IPv6", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "ws://[::1]:5280/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("ws domain", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "ws://localhost:5280/xmpp-websocket", }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); // Prosody 404 https://prosody.im/issues/issue/932 test("wss IPv4", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "wss://127.0.0.1:5281/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); // Prosody 404 https://prosody.im/issues/issue/932 test("wss IPv6", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "wss://[::1]:5281/xmpp-websocket", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("wss domain", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "wss://localhost:5281/xmpp-websocket", }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("xmpp IPv4", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "xmpp://127.0.0.1:5222", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("xmpp IPv6", async () => { - const xmpp = client({ credentials, service: "xmpp://[::1]:5222", domain }); + xmpp = client({ credentials, service: "xmpp://[::1]:5222", domain }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("xmpp domain", async () => { - const xmpp = client({ credentials, service: "xmpp://localhost:5222" }); + xmpp = client({ credentials, service: "xmpp://localhost:5222" }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("xmpps IPv4", async () => { - const xmpp = client({ + xmpp = client({ credentials, service: "xmpps://127.0.0.1:5223", domain, }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("xmpps IPv6", async () => { - const xmpp = client({ credentials, service: "xmpps://[::1]:5223", domain }); + xmpp = client({ credentials, service: "xmpps://[::1]:5223", domain }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); test("xmpps domain", async () => { - const xmpp = client({ credentials, service: "xmpps://localhost:5223" }); + xmpp = client({ credentials, service: "xmpps://localhost:5223" }); debug(xmpp); - t.context.xmpp = xmpp; const address = await xmpp.start(); expect(address.bare().toString()).toBe(JID); }); diff --git a/test/component.js b/test/component.js index 65395d5f8..54a612adb 100644 --- a/test/component.js +++ b/test/component.js @@ -9,24 +9,24 @@ const service = "xmpp://localhost:5347"; const domain = "component.localhost"; const options = { password, service, domain }; +let xmpp; + beforeEach(() => { + xmpp = component(options); + debug(xmpp); return server.restart(); }); -afterEach(() => { - if (t.context.xmpp) { - return t.context.xmpp.stop(); - } +afterEach(async () => { + await xmpp?.stop(); }); test("component", async () => { expect.assertions(6); - const xmpp = component(options); - t.context.xmpp = xmpp; - debug(xmpp); - - xmpp.on("connect", () => {}); + xmpp.on("connect", () => { + expect().pass(); + }); xmpp.on("open", (el) => { expect(el instanceof xml.Element).toBe(true); @@ -44,17 +44,15 @@ test("component", async () => { await xmpp.stop; }); -test("reconnects when server restarts", done => { +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++; + expect().pass(); if (c === 2) { await xmpp.stop(); done(); @@ -64,27 +62,24 @@ test("reconnects when server restarts", done => { }); xmpp.start(); - - t.context.xmpp = xmpp; }); -test("does not reconnect when stop is called", done => { +test("does not reconnect when stop is called", (done) => { expect.assertions(2); - const xmpp = component(options); - debug(xmpp); - xmpp.on("online", async () => { await xmpp.stop(); await server.stop(); done(); }); - xmpp.on("close", () => ); + xmpp.on("close", () => { + expect().pass(); + }); - xmpp.on("offline", () => ); + 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 2ad4a6755..f5eea946d 100644 --- a/test/see-other-host.js +++ b/test/see-other-host.js @@ -12,14 +12,14 @@ const credentials = { username, password }; const domain = "localhost"; const JID = jid(username, domain).toString(); +let xmpp; + beforeEach(() => { return server.restart(); }); -afterEach(() => { - if (t.context.xmpp && t.context.xmpp.status === "online") { - return t.context.xmpp.stop(); - } +afterEach(async () => { + await xmpp?.stop(); }); test("see-other-host", async () => { @@ -45,9 +45,8 @@ test("see-other-host", async () => { 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(); expect(address.bare().toString()).toBe(JID); }); From cfdc97e048037e8706ba9f42b0d41a96d83ba52f Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 21:21:44 +0100 Subject: [PATCH 14/17] f --- bundle.js | 4 +--- eslint.config.mjs | 8 ++------ package-lock.json | 16 ---------------- package.json | 4 ---- test/browser.js | 2 -- test/client.js | 2 -- test/see-other-host.js | 2 -- 7 files changed, 3 insertions(+), 35 deletions(-) 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/eslint.config.mjs b/eslint.config.mjs index 5784f62e9..8554be0b2 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -8,12 +8,7 @@ import pluginJest from "eslint-plugin-jest"; export default [ { - ignores: [ - "**/dist/*.js", - "bundle.js", - "packages/xmpp.js/index.js", - "eslint.config.mjs", - ], + ignores: ["**/dist/*.js", "eslint.config.mjs"], }, js.configs.recommended, eslintPluginUnicorn.configs["flat/recommended"], @@ -68,6 +63,7 @@ export default [ "error", { allowModules: ["sinon", "@xmpp/test"] }, ], + "n/hashbang": "off", // promise // https://github.com/xjamundx/eslint-plugin-promise diff --git a/package-lock.json b/package-lock.json index e1c4186da..c4fbec980 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,9 +7,6 @@ "workspaces": [ "packages/*" ], - "bin": { - "serverctl": "server/ctl.js" - }, "devDependencies": { "@babel/core": "^7.26.0", "@babel/plugin-proposal-object-rest-spread": "^7.16.5", @@ -21,7 +18,6 @@ "babel-jest": "^29.7.0", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", - "babel-register-esm": "^1.2.5", "babelify": "^10.0.0", "babylon": "^6.18.0", "browser-pack-flat": "^3.5.0", @@ -4844,18 +4840,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/babel-register-esm": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/babel-register-esm/-/babel-register-esm-1.2.5.tgz", - "integrity": "sha512-WaVd3Rm42kndYnufn8u1SbUUwuCxL2GAQX/7QXUL3w/7PffB+HcXrzmAqk1x01TjhFh/npSZ9Z3MNBc6dDb6Uw==", - "dev": true, - "engines": { - "node": ">=12.17.0" - }, - "peerDependencies": { - "@babel/core": "*" - } - }, "node_modules/babelify": { "version": "10.0.0", "dev": true, diff --git a/package.json b/package.json index 3f49a1658..c5d225d8e 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,6 @@ { "private": true, "type": "commonjs", - "bin": { - "serverctl": "server/ctl.js" - }, "devDependencies": { "@babel/core": "^7.26.0", "@babel/plugin-proposal-object-rest-spread": "^7.16.5", @@ -15,7 +12,6 @@ "babel-jest": "^29.7.0", "babel-plugin-jsx-pragmatic": "^1.0.2", "babel-plugin-transform-async-to-promises": "^0.8.18", - "babel-register-esm": "^1.2.5", "babelify": "^10.0.0", "babylon": "^6.18.0", "browser-pack-flat": "^3.5.0", diff --git a/test/browser.js b/test/browser.js index 8200bee19..6323e7d49 100644 --- a/test/browser.js +++ b/test/browser.js @@ -8,8 +8,6 @@ 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 }; diff --git a/test/client.js b/test/client.js index 316a5e3f2..7e093ad7e 100644 --- a/test/client.js +++ b/test/client.js @@ -4,8 +4,6 @@ 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 }; diff --git a/test/see-other-host.js b/test/see-other-host.js index f5eea946d..0348b5951 100644 --- a/test/see-other-host.js +++ b/test/see-other-host.js @@ -4,8 +4,6 @@ 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 }; From c504048f4a00c1674fdd572814a61a4e79d8d8c5 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 21:38:08 +0100 Subject: [PATCH 15/17] Remove sinon --- eslint.config.mjs | 10 +---- package-lock.json | 87 -------------------------------------- package.json | 1 - packages/jid/test/index.js | 6 +-- packages/starttls/test.js | 28 ++++++------ 5 files changed, 17 insertions(+), 115 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 8554be0b2..3c3edd078 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -55,14 +55,8 @@ 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: ["sinon", "@xmpp/test"] }, - ], - "n/no-extraneous-import": [ - "error", - { allowModules: ["sinon", "@xmpp/test"] }, - ], + "n/no-extraneous-require": ["error", { allowModules: ["@xmpp/test"] }], + "n/no-extraneous-import": ["error", { allowModules: ["@xmpp/test"] }], "n/hashbang": "off", // promise diff --git a/package-lock.json b/package-lock.json index c4fbec980..cf41dafad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,6 @@ "node-fetch": "^2.6.12", "prettier": "^3.4.2", "selfsigned": "^2.4.1", - "sinon": "^19.0.2", "uglify-js": "^3.19.3" }, "engines": { @@ -3900,37 +3899,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/@tufjs/canonical-json": { "version": "2.0.0", "dev": true, @@ -6721,14 +6689,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, @@ -10641,11 +10601,6 @@ "dev": true, "license": "MIT" }, - "node_modules/just-extend": { - "version": "6.2.0", - "dev": true, - "license": "MIT" - }, "node_modules/kind-of": { "version": "6.0.3", "license": "MIT", @@ -11510,11 +11465,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.get": { - "version": "4.4.2", - "dev": true, - "license": "MIT" - }, "node_modules/lodash.ismatch": { "version": "4.4.0", "dev": true, @@ -12407,18 +12357,6 @@ "dev": true, "license": "MIT" }, - "node_modules/nise": { - "version": "6.1.1", - "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" - } - }, "node_modules/node-abi": { "version": "2.30.1", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.30.1.tgz", @@ -13487,14 +13425,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, @@ -14680,23 +14610,6 @@ "simple-concat": "^1.0.0" } }, - "node_modules/sinon": { - "version": "19.0.2", - "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" - } - }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", diff --git a/package.json b/package.json index c5d225d8e..c52a12236 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "node-fetch": "^2.6.12", "prettier": "^3.4.2", "selfsigned": "^2.4.1", - "sinon": "^19.0.2", "uglify-js": "^3.19.3" }, "scripts": { diff --git a/packages/jid/test/index.js b/packages/jid/test/index.js index f99a6db74..f8cf4e296 100644 --- a/packages/jid/test/index.js +++ b/packages/jid/test/index.js @@ -1,16 +1,14 @@ "use strict"; -const { spy } = require("sinon"); const jid = require(".."); const JID = require("../lib/JID"); 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); - expect(A.equals.calledWith(B)).toBe(true); - A.equals.restore(); + expect(spy_equals).toHaveBeenCalledWith(B); }); test("JID exports lib/JID", () => { diff --git a/packages/starttls/test.js b/packages/starttls/test.js index 494c982e1..7fc0b2408 100644 --- a/packages/starttls/test.js +++ b/packages/starttls/test.js @@ -1,6 +1,7 @@ "use strict"; -const { mock, stub } = require("sinon"); +jest.mock("tls"); + const { mockClient, promise, delay } = require("@xmpp/test"); const tls = require("tls"); const net = require("net"); @@ -18,17 +19,9 @@ test("success", async () => { 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( @@ -36,13 +29,16 @@ test("success", async () => { , ); - expect(await promise(entity, "send")).toEqual(); + expect(await promise(entity, "send")).toEqual( + , + ); entity.mockInput(); await delay(); - expectTLSConnect.verify(); + expect(tls.connect).toHaveBeenCalledTimes(1); + expect(tls.connect).toHaveBeenCalledWith({ socket, host: "foobar" }); }); test("failure", async () => { @@ -55,7 +51,9 @@ test("failure", async () => { , ); - expect(await promise(entity, "send")).toEqual(); + expect(await promise(entity, "send")).toEqual( + , + ); entity.mockInput(); From af84136e503631567a8b5cb20c6ce709ba273d48 Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 22:36:47 +0100 Subject: [PATCH 16/17] f --- eslint.config.mjs | 10 ++++---- jest.config.js | 1 + package-lock.json | 1 - package.json | 1 - packages/connection/test/close.js | 40 ++++++++++++++--------------- packages/connection/test/connect.js | 8 +++++- packages/connection/test/stop.js | 4 +++ packages/jid/test/JID.js | 8 +++--- packages/reconnect/test.js | 6 ++++- test/client.js | 16 +++++------- 10 files changed, 52 insertions(+), 43 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 3c3edd078..c277c75a3 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -93,11 +93,11 @@ export default [ globals: pluginJest.environments.globals.globals, }, rules: { - "jest/no-disabled-tests": "warn", - "jest/no-focused-tests": "error", - "jest/no-identical-title": "error", - "jest/prefer-to-have-length": "error", - + ...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": [ diff --git a/jest.config.js b/jest.config.js index 35e0824ef..c2797f22f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,6 @@ "use strict"; +// eslint-disable-next-line n/no-extraneous-require const { defaults } = require("jest-config"); /** @type {import('jest').Config} */ diff --git a/package-lock.json b/package-lock.json index cf41dafad..9b6fae37e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,6 @@ "exorcist": "^2.0.0", "husky": "^9.1.7", "jest": "^29.7.0", - "jest-config": "^29.7.0", "jest-extended": "^4.0.2", "jsdom": "^25.0.1", "lerna": "^8.1.9", diff --git a/package.json b/package.json index c52a12236..27c5a31b9 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "exorcist": "^2.0.0", "husky": "^9.1.7", "jest": "^29.7.0", - "jest-config": "^29.7.0", "jest-extended": "^4.0.2", "jsdom": "^25.0.1", "lerna": "^8.1.9", diff --git a/packages/connection/test/close.js b/packages/connection/test/close.js index a808c21f6..a9734974a 100644 --- a/packages/connection/test/close.js +++ b/packages/connection/test/close.js @@ -1,7 +1,12 @@ "use strict"; 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", () => { @@ -15,7 +20,7 @@ test("resets properties on socket close event", () => { expect(conn.status).toBe("disconnect"); }); -test("timeout", (done) => { +test("timeout", async () => { expect.assertions(2); const conn = new Connection(); conn.parser = new EventEmitter(); @@ -31,14 +36,11 @@ test("timeout", (done) => { conn.on("output", (el) => { expect(el).toBe(""); }); - conn.close().catch((err) => { - expect(err.name).toBe("TimeoutError"); - done(); - }); + + await expect(conn.close()).rejects.toThrow(new TimeoutError()); }); -test("error on status closing", (done) => { - expect.assertions(2); +test("error on status closing", async () => { const conn = new Connection(); conn.parser = new EventEmitter(); conn.footerElement = () => { @@ -51,12 +53,12 @@ test("error on status closing", (done) => { }; conn.status = "closing"; - conn.close().catch((err) => { - expect(err.name).toBe("Error"); - expect(err.message).toBe("Connection is closing"); - done(); - }); + conn.parser.emit("end"); + + await expect(conn.close()).rejects.toThrow( + new Error("Connection is closing"), + ); }); test("resolves", async () => { @@ -105,7 +107,7 @@ test("emits closing status", () => { return p; }); -test("do not emit closing status if parser property is missing", () => { +test("do not emit closing status if parser property is missing", async () => { expect.assertions(2); const conn = new Connection(); conn.parser = null; @@ -118,12 +120,10 @@ test("do not emit closing status if parser property is missing", () => { return cb(); }; - return Promise.all([ - timeout(promise(conn, "status"), 500).catch((err) => - expect(err.name).toBe("TimeoutError"), + await Promise.all([ + expect(timeout(promise(conn, "status"), 500)).rejects.toThrow( + new TimeoutError(), ), - conn.close().catch((err) => { - expect(err).toBeInstanceOf(Error); - }), + expect(conn.close()).rejects.toThrow(), ]); }); diff --git a/packages/connection/test/connect.js b/packages/connection/test/connect.js index 2195b64d4..5eff449d7 100644 --- a/packages/connection/test/connect.js +++ b/packages/connection/test/connect.js @@ -27,6 +27,8 @@ test('emits "connecting" status', () => { }); test("rejects if an error is emitted before connected", async () => { + expect.assertions(2); + const conn = new Connection(); const error = {}; @@ -34,10 +36,13 @@ test("rejects if an error is emitted before connected", async () => { conn.Socket = socket(function () { this.emit("error", error); }); - conn.on("error", (err) => expect(err).toBe(error)); + conn.on("error", (err) => { + expect(err).toBe(error); + }); try { await conn.connect("url"); + expect.fail(); } catch (err) { expect(err).toBe(error); } @@ -50,4 +55,5 @@ test("resolves if socket connects", async () => { this.emit("connect"); }); await conn.connect("url"); + expect().pass(); }); diff --git a/packages/connection/test/stop.js b/packages/connection/test/stop.js index 6de0b46c8..e4990b968 100644 --- a/packages/connection/test/stop.js +++ b/packages/connection/test/stop.js @@ -7,6 +7,7 @@ test("resolves if socket property is undefined", async () => { conn.footerElement = () => ; conn.socket = undefined; await conn.stop(); + expect().pass(); }); test("resolves if close rejects", async () => { @@ -14,6 +15,7 @@ test("resolves if close rejects", async () => { conn.close = () => Promise.reject(); conn.disconnect = () => Promise.resolve(); await conn.stop(); + expect().pass(); }); test("resolves if disconnect rejects", async () => { @@ -21,6 +23,7 @@ test("resolves if disconnect rejects", async () => { conn.disconnect = () => Promise.reject(); conn.close = () => Promise.resolve(); await conn.stop(); + expect().pass(); }); test("resolves with the result of close", async () => { @@ -35,4 +38,5 @@ test("resolves with the result of close", async () => { test("does not throw if connection is not established", async () => { const conn = new Connection(); await conn.stop(); + expect().pass(); }); diff --git a/packages/jid/test/JID.js b/packages/jid/test/JID.js index 2fdc5b1ca..5e4234d76 100644 --- a/packages/jid/test/JID.js +++ b/packages/jid/test/JID.js @@ -3,15 +3,15 @@ const JID = require("../lib/JID"); test("throws TypeError for invalid domain", () => { - expect(() => new JID("foo")).toThrowError(new TypeError("Invalid domain.")); + expect(() => new JID("foo")).toThrow(new TypeError("Invalid domain.")); - expect(() => new JID()).toThrowError(new TypeError("Invalid domain.")); + expect(() => new JID()).toThrow(new TypeError("Invalid domain.")); - expect(() => new JID("foo", "", "r")).toThrowError( + expect(() => new JID("foo", "", "r")).toThrow( new TypeError("Invalid domain."), ); - expect(() => new JID("foo", "", "r")).toThrowError( + expect(() => new JID("foo", "", "r")).toThrow( new TypeError("Invalid domain."), ); }); diff --git a/packages/reconnect/test.js b/packages/reconnect/test.js index 90d06a23a..af826ac76 100644 --- a/packages/reconnect/test.js +++ b/packages/reconnect/test.js @@ -4,10 +4,14 @@ const _reconnect = require("."); const EventEmitter = require("events"); test("it schedule a reconnect when disconnect is emitted", () => { + expect.assertions(1); + const entity = new EventEmitter(); const reconnect = _reconnect({ entity }); - reconnect.scheduleReconnect = () => {}; + reconnect.scheduleReconnect = () => { + expect.pass(); + }; entity.emit("disconnect"); }); diff --git a/test/client.js b/test/client.js index 7e093ad7e..31f5d3fbc 100644 --- a/test/client.js +++ b/test/client.js @@ -44,7 +44,7 @@ test("client", async () => { expect(address.bare().toString()).toBe(JID); }); -test("bad credentials", (done) => { +test("bad credentials", async () => { expect.assertions(6); xmpp = client({ @@ -62,22 +62,18 @@ test("bad credentials", (done) => { expect().pass(); }); - xmpp.on("online", () => done.fail()); + xmpp.on("online", () => { + expect().fail(); + }); xmpp.on("error", (err) => { - expect(err instanceof Error).toBe(true); + expect(err).toBeInstanceOf(Error); expect(err.name).toBe("SASLError"); expect(err.condition).toBe("not-authorized"); error = err; }); - xmpp - .start() - .then(() => done.fail()) - .catch((err) => { - expect(err).toBe(error); - done(); - }); + await expect(xmpp.start()).rejects.toThrow(error); }); test("reconnects when server restarts gracefully", (done) => { From fe1a426fdb86a95dd1cb7b67ba1bd362ad9942db Mon Sep 17 00:00:00 2001 From: Sonny Piers Date: Fri, 20 Dec 2024 22:39:52 +0100 Subject: [PATCH 17/17] f --- packages/reconnect/test.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/reconnect/test.js b/packages/reconnect/test.js index af826ac76..27bbff77f 100644 --- a/packages/reconnect/test.js +++ b/packages/reconnect/test.js @@ -3,20 +3,21 @@ const _reconnect = require("."); const EventEmitter = require("events"); -test("it schedule a reconnect when disconnect is emitted", () => { - expect.assertions(1); - +test("it schedule a reconnect when disconnect is emitted", (done) => { const entity = new EventEmitter(); const reconnect = _reconnect({ entity }); reconnect.scheduleReconnect = () => { expect.pass(); + done(); }; entity.emit("disconnect"); }); test("#reconnect", async () => { + expect.assertions(3); + const entity = new EventEmitter(); const reconnect = _reconnect({ entity });