From 75a7bab6f77a9df7d1c6ea66be6a6b8271940bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 28 Dec 2023 13:08:54 +0100 Subject: [PATCH 01/30] remove `bump-cli` (#1559) --- package-lock.json | 23 ----------------------- package.json | 1 - 2 files changed, 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index ab625aec..3d745e15 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,6 @@ "@web/dev-server-rollup": "^0.5.4", "@web/test-runner": "^0.17.2", "@web/test-runner-playwright": "^0.10.2", - "bump-cli": "^1.1.3", "esbuild": "^0.17.3", "mocha": "^10.2.0" }, @@ -1533,19 +1532,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/bump-cli": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/bump-cli/-/bump-cli-1.1.3.tgz", - "integrity": "sha512-7cdMWGZJnuZ1vXX9Zp5u1PSEiNHSHe0dOF0buyT2MCZcw9Vt4pTMocOBsgeKNRPFn9Hh/8yuYWVvElBqmhwhNQ==", - "dev": true, - "dependencies": { - "minimist": "^1.1.0", - "semver": "^3.0.1" - }, - "bin": { - "bump": "bin/bump" - } - }, "node_modules/bytes": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", @@ -4334,15 +4320,6 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, - "node_modules/semver": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-3.0.1.tgz", - "integrity": "sha512-MrF9mHWFtD/0eV4t3IheoXnGWTdw17axm5xqzOWyPsOMVnTtRAZT6uwPwslQXH5SsiaBLiMuu8NX8DtXWZfDwg==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", diff --git a/package.json b/package.json index 72a53ff4..f070222a 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "@web/dev-server-rollup": "^0.5.4", "@web/test-runner": "^0.17.2", "@web/test-runner-playwright": "^0.10.2", - "bump-cli": "^1.1.3", "esbuild": "^0.17.3", "mocha": "^10.2.0" } From c245af13deadaac2e96f84563fd9c9383841402d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 28 Dec 2023 13:24:15 +0100 Subject: [PATCH 02/30] Update developer dependencies (#1560) * update developer depenedencies * update CI tasks * update action versions * dont run browsers tests in node tests * actually run npm script --- .github/workflows/browsers.yml | 6 +- .github/workflows/node.js.yml | 18 +- package-lock.json | 3264 ++++++++++++++++++-------------- package.json | 8 +- 4 files changed, 1845 insertions(+), 1451 deletions(-) diff --git a/.github/workflows/browsers.yml b/.github/workflows/browsers.yml index 215db734..2279741e 100644 --- a/.github/workflows/browsers.yml +++ b/.github/workflows/browsers.yml @@ -5,9 +5,9 @@ name: Browsers CI on: push: - branches: [ main, 4.x.x, 5.x.x ] + branches: [ main, 4.x.x ] pull_request: - branches: [ main, 4.x.x, 5.x.x ] + branches: [ main, 4.x.x ] jobs: build: @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: ${{ matrix.browser-name }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - run: npm ci - run: npx playwright install --with-deps - run: npm run build --if-present diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 2f63b92d..4d3a6680 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -5,9 +5,9 @@ name: Node.js CI on: push: - branches: [ main, 4.x.x, 5.x.x ] + branches: [ main, 4.x.x ] pull_request: - branches: [ main, 4.x.x, 5.x.x ] + branches: [ main, 4.x.x ] jobs: build: @@ -17,17 +17,17 @@ jobs: strategy: matrix: node-version: - - 16 # to be removed 2023-09-11 - - 18 # to be removed 2025-04-30 - - 19 # to be removed 2023-06-01 - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + - 18 # to be removed 2025-04-30 + - 20 # to be removed 2026-04-30 + - latest + # See supported Node.js release schedule at https://github.com/nodejs/release#release-schedule steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - run: npm ci - run: npm run build --if-present - - run: npm test + - run: npm run test-node diff --git a/package-lock.json b/package-lock.json index 3d745e15..4b71f8d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,10 +17,10 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", - "@web/dev-server-rollup": "^0.5.4", - "@web/test-runner": "^0.17.2", - "@web/test-runner-playwright": "^0.10.2", - "esbuild": "^0.17.3", + "@web/dev-server-rollup": "^0.6.1", + "@web/test-runner": "^0.18.0", + "@web/test-runner-playwright": "^0.11.0", + "esbuild": "^0.19.10", "mocha": "^10.2.0" }, "engines": { @@ -50,122 +50,404 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.18.6" + "@babel/highlight": "^7.23.4", + "chalk": "^2.4.2" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", "js-tokens": "^4.0.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.10.tgz", + "integrity": "sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==", + "cpu": [ + "ppc64" + ], "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/@babel/highlight/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "node_modules/@esbuild/android-arm": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.10.tgz", + "integrity": "sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==", + "cpu": [ + "arm" + ], "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/@babel/highlight/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "node_modules/@esbuild/android-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.10.tgz", + "integrity": "sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "color-name": "1.1.3" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/@babel/highlight/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "node_modules/@esbuild/android-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.10.tgz", + "integrity": "sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } }, - "node_modules/@babel/highlight/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.10.tgz", + "integrity": "sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==", + "cpu": [ + "arm64" + ], "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=0.8.0" + "node": ">=12" } }, - "node_modules/@babel/highlight/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.10.tgz", + "integrity": "sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==", + "cpu": [ + "x64" + ], "dev": true, + "optional": true, + "os": [ + "darwin" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/@babel/highlight/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.10.tgz", + "integrity": "sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==", + "cpu": [ + "arm64" + ], "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, + "optional": true, + "os": [ + "freebsd" + ], "engines": { - "node": ">=4" + "node": ">=12" } }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.3.tgz", - "integrity": "sha512-01Hxaaat6m0Xp9AXGM8mjFtqqwDjzlMP0eQq9zll9U85ttVALGCGDuEvra5Feu/NbP5AEP1MaopPwzsTcUq1cw==", + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.10.tgz", + "integrity": "sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.10.tgz", + "integrity": "sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.10.tgz", + "integrity": "sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==", "cpu": [ "arm64" ], "dev": true, "optional": true, "os": [ - "darwin" + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.10.tgz", + "integrity": "sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.10.tgz", + "integrity": "sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.10.tgz", + "integrity": "sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.10.tgz", + "integrity": "sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.10.tgz", + "integrity": "sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.10.tgz", + "integrity": "sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.10.tgz", + "integrity": "sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.10.tgz", + "integrity": "sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.10.tgz", + "integrity": "sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.10.tgz", + "integrity": "sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.10.tgz", + "integrity": "sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.10.tgz", + "integrity": "sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.10.tgz", + "integrity": "sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" ], "engines": { "node": ">=12" @@ -260,6 +542,21 @@ } } }, + "node_modules/@puppeteer/browsers/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": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/@puppeteer/browsers/node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -274,72 +571,39 @@ "node": ">=12" } }, - "node_modules/@puppeteer/browsers/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/@puppeteer/browsers/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "ms": "2.1.2" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@puppeteer/browsers/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" + "node": ">=7.0.0" } }, - "node_modules/@puppeteer/browsers/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "node_modules/@puppeteer/browsers/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/@puppeteer/browsers/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/@puppeteer/browsers/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=8" - } - }, - "node_modules/@puppeteer/browsers/node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", - "dev": true, - "dependencies": { - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^3.1.5" - } - }, - "node_modules/@puppeteer/browsers/node_modules/tar-stream": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", - "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", - "dev": true, - "dependencies": { - "b4a": "^1.6.4", - "fast-fifo": "^1.2.0", - "streamx": "^2.15.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/@puppeteer/browsers/node_modules/yargs": { @@ -394,46 +658,6 @@ } } }, - "node_modules/@rollup/plugin-commonjs/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/@rollup/plugin-commonjs/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@rollup/plugin-commonjs/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@rollup/plugin-node-resolve": { "version": "15.2.3", "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.2.3.tgz", @@ -460,9 +684,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dev": true, "dependencies": { "@types/estree": "^1.0.0", @@ -481,6 +705,175 @@ } } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.1.tgz", + "integrity": "sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.1.tgz", + "integrity": "sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz", + "integrity": "sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.1.tgz", + "integrity": "sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.1.tgz", + "integrity": "sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.1.tgz", + "integrity": "sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.1.tgz", + "integrity": "sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.1.tgz", + "integrity": "sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.1.tgz", + "integrity": "sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.1.tgz", + "integrity": "sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.1.tgz", + "integrity": "sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.1.tgz", + "integrity": "sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz", + "integrity": "sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@tootallnate/quickjs-emscripten": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", @@ -488,24 +881,24 @@ "dev": true }, "node_modules/@types/accepts": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.6.tgz", - "integrity": "sha512-6+qlUg57yfE9OO63wnsJXLeq9cG3gSHBBIxNMOjNrbDRlDnm/NaR7RctfYcVCPq+j7d+MwOxqVEludH5+FKrlg==", + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", + "integrity": "sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/babel__code-frame": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.5.tgz", - "integrity": "sha512-tE88HnYMl5iJAB1V9nJCrE1udmwGCoNvx2ayTa8nwkE3UMMRRljANO+sX8D321hIrqf1DlvhAPAo5G6DWaMQNg==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/babel__code-frame/-/babel__code-frame-7.0.6.tgz", + "integrity": "sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==", "dev": true }, "node_modules/@types/body-parser": { - "version": "1.19.4", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.4.tgz", - "integrity": "sha512-N7UDG0/xiPQa2D/XrVJXjkWbpqHCd2sBaB32ggRF2l83RhPfamgKGF8gwwqyksS95qUS5ZYF9aF+lLPRlwI2UA==", + "version": "1.19.5", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.5.tgz", + "integrity": "sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==", "dev": true, "dependencies": { "@types/connect": "*", @@ -513,9 +906,9 @@ } }, "node_modules/@types/co-body": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@types/co-body/-/co-body-6.1.2.tgz", - "integrity": "sha512-eUqBFu8mNW56oZAP0aEmGm+4qFeYjkxVThQ1F/8jFOBiSNM+gib3pYFzjnQsQRUZ501Eg8qOc7Nn76GcZo6Uvg==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/@types/co-body/-/co-body-6.1.3.tgz", + "integrity": "sha512-UhuhrQ5hclX6UJctv5m4Rfp52AfG9o9+d9/HwjxhVB5NjXxr5t9oKgJxN8xRHgr35oo8meUEHUPFWiKg6y71aA==", "dev": true, "dependencies": { "@types/node": "*", @@ -523,36 +916,36 @@ } }, "node_modules/@types/command-line-args": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.2.tgz", - "integrity": "sha512-9aZ7KzLDOBYyqH5J2bvB9edvsMXusX+H/aS8idAJOpWNmscZG5RqO1CVJPFa4Q0/1xKgvxcweXunFVx2l/dYFA==", + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/command-line-args/-/command-line-args-5.2.3.tgz", + "integrity": "sha512-uv0aG6R0Y8WHZLTamZwtfsDLVRnOa+n+n5rEvFWL5Na5gZ8V2Teab/duDPFzIIIhs9qizDpcavCusCLJZu62Kw==", "dev": true }, "node_modules/@types/connect": { - "version": "3.4.37", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.37.tgz", - "integrity": "sha512-zBUSRqkfZ59OcwXon4HVxhx5oWCJmc0OtBTK05M+p0dYjgN6iTwIL2T/WbsQZrEsdnwaF9cWQ+azOnpPvIqY3Q==", + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/content-disposition": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.7.tgz", - "integrity": "sha512-V9/5u21RHFR1zfdm3rQ6pJUKV+zSSVQt+yq16i1YhdivVzWgPEoKedc3GdT8aFjsqQbakdxuy3FnEdePUQOamQ==", + "version": "0.5.8", + "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.8.tgz", + "integrity": "sha512-QVSSvno3dE0MgO76pJhmv4Qyi/j0Yk9pBp0Y7TJ2Tlj+KCgJWY6qX7nnxCOLkZ3VYRSIk1WTxCvwUSdx6CCLdg==", "dev": true }, "node_modules/@types/convert-source-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-2.0.2.tgz", - "integrity": "sha512-M8jHZquUkvyaHtNVCKNoCqGmbbNFgRJ2JL607SPmcNUWqhU1spBaEJD7qlW3kMiQjKPlyyT4ZUbPG6vO4SYLBg==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-2.0.3.tgz", + "integrity": "sha512-ag0BfJLZf6CQz8VIuRIEYQ5Ggwk/82uvTQf27RcpyDNbY0Vw49LIPqAxk5tqYfrCs9xDaIMvl4aj7ZopnYL8bA==", "dev": true }, "node_modules/@types/cookies": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.9.tgz", - "integrity": "sha512-SrGYvhKohd/WSOII0WpflC73RgdJhQoqpwq9q+n/qugNGiDSGYXfHy3QvB4+X+J/gYe27j2fSRnK4B+1A3nvsw==", + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.10.tgz", + "integrity": "sha512-hmUCjAk2fwZVPPkkPBcI7jGLIR5mg4OVoNMBwU6aVsMm/iNPY7z9/R+x2fSwLt/ZXoGua6C5Zy2k5xOo9jUyhQ==", "dev": true, "dependencies": { "@types/connect": "*", @@ -562,21 +955,21 @@ } }, "node_modules/@types/debounce": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.3.tgz", - "integrity": "sha512-97mx7gWt4e+kd0wPa1pNEvE4tYGhgBVa4ExWOLcfFohAjF9wERfJ+3qrn7I1e76oHupOvRs4UyYe9xzy0i4TUw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.4.tgz", + "integrity": "sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==", "dev": true }, "node_modules/@types/estree": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.3.tgz", - "integrity": "sha512-CS2rOaoQ/eAgAfcTfq6amKG7bsN+EMcgGY4FAFQdvSj2y1ixvOZTUA9mOtCai7E1SYu283XNw7urKK30nP3wkQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/express": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.20.tgz", - "integrity": "sha512-rOaqlkgEvOW495xErXMsmyX3WKBInbhG5eqojXYi3cGUaLoRDlXa5d52fkfWZT963AZ3v2eZ4MbKE6WpDAGVsw==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.21.tgz", + "integrity": "sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==", "dev": true, "dependencies": { "@types/body-parser": "*", @@ -586,9 +979,9 @@ } }, "node_modules/@types/express-serve-static-core": { - "version": "4.17.39", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.39.tgz", - "integrity": "sha512-BiEUfAiGCOllomsRAZOiMFP7LAnrifHpt56pc4Z7l9K6ACyN06Ns1JLMBxwkfLOjJRlSf06NwWsT7yzfpaVpyQ==", + "version": "4.17.41", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz", + "integrity": "sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==", "dev": true, "dependencies": { "@types/node": "*", @@ -598,51 +991,51 @@ } }, "node_modules/@types/http-assert": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.4.tgz", - "integrity": "sha512-/6M9aaVk+avzCsrv1lt39AlFw4faCNI6aGll91Rxj38ZE5JI8AxApyQIRy+i1McjiJiuQ0sfuoMLxqq374ZIbA==", + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.5.tgz", + "integrity": "sha512-4+tE/lwdAahgZT1g30Jkdm9PzFRde0xwxBNUyRsCitRvCQB90iuA2uJYdUnhnANRcqGXaWOGY4FEoxeElNAK2g==", "dev": true }, "node_modules/@types/http-errors": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.3.tgz", - "integrity": "sha512-pP0P/9BnCj1OVvQR2lF41EkDG/lWWnDyA203b/4Fmi2eTyORnBtcDoKDwjWQthELrBvWkMOrvSOnZ8OVlW6tXA==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.4.tgz", + "integrity": "sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA==", "dev": true }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-zONci81DZYCZjiLe0r6equvZut0b+dBRPBN5kBDjsONnutYNtJMoWQ9uR2RkL1gLG9NMTzvf+29e5RFfPbeKhQ==", + "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.2", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.2.tgz", - "integrity": "sha512-8toY6FgdltSdONav1XtUHl4LN1yTmLza+EuDazb/fEmRNCwjyqNVIQWs2IfC74IqjHkREs/nQ2FWq5kZU9IC0w==", + "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.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.3.tgz", - "integrity": "sha512-1nESsePMBlf0RPRffLZi5ujYh7IH1BWL4y9pr+Bn3cJBdxz+RTP8bUFljLz9HvzhhOSWKdyBZ4DIivdL6rvgZg==", + "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/keygrip": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.4.tgz", - "integrity": "sha512-/tjWYD8StMrINelsrHNmpXceo9s3/Y22AzePH1qCvXIgmz/aQp2YFFr6HqhNQVIOdcvaVyp5GS+yjHGuF7Rwsg==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.6.tgz", + "integrity": "sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==", "dev": true }, "node_modules/@types/koa": { - "version": "2.13.10", - "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.13.10.tgz", - "integrity": "sha512-weKc5IBeORLDGwD1FMgPjaZIg0/mtP7KxXAXEzPRCN78k274D9U2acmccDNPL1MwyV40Jj+hQQ5N2eaV6O0z8g==", + "version": "2.13.12", + "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.13.12.tgz", + "integrity": "sha512-vAo1KuDSYWFDB4Cs80CHvfmzSQWeUb909aQib0C0aFx4sw0K9UZFz2m5jaEP+b3X1+yr904iQiruS0hXi31jbw==", "dev": true, "dependencies": { "@types/accepts": "*", @@ -656,31 +1049,28 @@ } }, "node_modules/@types/koa-compose": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.7.tgz", - "integrity": "sha512-smtvSL/oLICPuenxy73OmxKGh42VVfn2o2eutReH1yjij0LmxADBpGcAJbp4N+yJjPapPN7jAX9p7Ue0JMQ/Ag==", + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.8.tgz", + "integrity": "sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==", "dev": true, "dependencies": { "@types/koa": "*" } }, "node_modules/@types/mime": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.4.tgz", - "integrity": "sha512-1Gjee59G25MrQGk8bsNvC6fxNiRgUlGn2wlhGf95a59DrprnnHk80FIMMFG9XHMdrfsuA119ht06QPDXA1Z7tw==", - "dev": true - }, - "node_modules/@types/mocha": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.3.tgz", - "integrity": "sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.5.tgz", + "integrity": "sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==", "dev": true }, "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", - "dev": true + "version": "20.10.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.5.tgz", + "integrity": "sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/parse5": { "version": "6.0.3", @@ -689,15 +1079,15 @@ "dev": true }, "node_modules/@types/qs": { - "version": "6.9.9", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.9.tgz", - "integrity": "sha512-wYLxw35euwqGvTDx6zfY1vokBFnsK0HNrzc6xNHchxfO2hpuRg74GbkEW7e3sSmPvj0TjCDT1VCa6OtHXnubsg==", + "version": "6.9.11", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.11.tgz", + "integrity": "sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==", "dev": true }, "node_modules/@types/range-parser": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.6.tgz", - "integrity": "sha512-+0autS93xyXizIYiyL02FCY8N+KkKPhILhcUSA276HxzreZ16kl+cmwvV2qAM/PuCCwPXzOXOWhiPcw20uSFcA==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", "dev": true }, "node_modules/@types/resolve": { @@ -707,9 +1097,9 @@ "dev": true }, "node_modules/@types/send": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.3.tgz", - "integrity": "sha512-/7fKxvKUoETxjFUsuFlPB9YndePpxxRAOfGC/yJdc9kTjTeP5kRCTzfnE8kPUKCeyiyIZu0YQ76s50hCedI1ug==", + "version": "0.17.4", + "resolved": "https://registry.npmjs.org/@types/send/-/send-0.17.4.tgz", + "integrity": "sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==", "dev": true, "dependencies": { "@types/mime": "^1", @@ -717,9 +1107,9 @@ } }, "node_modules/@types/serve-static": { - "version": "1.15.4", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.4.tgz", - "integrity": "sha512-aqqNfs1XTF0HDrFdlY//+SGUxmdSUbjeRXb5iaZc3x0/vMbYmdw9qvOgHWOyyLFxSSRnUuP5+724zBgfw8/WAw==", + "version": "1.15.5", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.5.tgz", + "integrity": "sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==", "dev": true, "dependencies": { "@types/http-errors": "*", @@ -737,9 +1127,9 @@ } }, "node_modules/@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, "optional": true, "dependencies": { @@ -747,73 +1137,37 @@ } }, "node_modules/@web/browser-logs": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@web/browser-logs/-/browser-logs-0.3.4.tgz", - "integrity": "sha512-0UkoUj1DdQjxaVBArHZRAGoiE5584/dSQ0V3hYWRqVDxaE3CwkfQ7kwb6i3Z1xJ8HZ9nuLMNycu3vLQwfhDnpg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@web/browser-logs/-/browser-logs-0.4.0.tgz", + "integrity": "sha512-/EBiDAUCJ2DzZhaFxTPRIznEPeafdLbXShIL6aTu7x73x7ZoxSDv7DGuTsh2rWNMUa4+AKli4UORrpyv6QBOiA==", "dev": true, "dependencies": { "errorstacks": "^2.2.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@web/config-loader": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@web/config-loader/-/config-loader-0.2.2.tgz", - "integrity": "sha512-HhoXMGivHbQ880MKQ1JChYCjWsMS4MUNOF35ktLV/0pZiX+J7oobybsPuyhS+gTnZsU7Duqnk3+HQYB7cNS4fA==", - "dev": true, - "dependencies": { - "semver": "^7.3.4" - }, - "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@web/config-loader/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@web/config-loader/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@web/config-loader/-/config-loader-0.3.1.tgz", + "integrity": "sha512-IYjHXUgSGGNpO3YJQ9foLcazbJlAWDdJGRe9be7aOhon0Nd6Na5JIOJAej7jsMu76fKHr4b4w2LfIdNQ4fJ8pA==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, "engines": { - "node": ">=10" + "node": ">=18.0.0" } }, - "node_modules/@web/config-loader/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/@web/dev-server": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.3.6.tgz", - "integrity": "sha512-hOHEP0PapJv0YiyFcvO0ruILJ35gZOd7gDivGwhi9MbeA5P+0b1eQv8tj/YXnAKmSD7lW+QjRTV0KWP8EzRoCQ==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.4.1.tgz", + "integrity": "sha512-GHeyH8MBZQpODFiHiXAdX4hOVbeDyD/DUermUinh/nexWAZUcXyXa200RItuAL6b25MQ3D/5hKNDypujSvXxiw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.11", "@types/command-line-args": "^5.0.0", - "@web/config-loader": "^0.2.2", - "@web/dev-server-core": "^0.6.3", - "@web/dev-server-rollup": "^0.5.4", + "@web/config-loader": "^0.3.0", + "@web/dev-server-core": "^0.7.0", + "@web/dev-server-rollup": "^0.6.1", "camelcase": "^6.2.0", "command-line-args": "^5.1.1", "command-line-usage": "^7.0.1", @@ -829,18 +1183,18 @@ "web-dev-server": "dist/bin.js" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@web/dev-server-core": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@web/dev-server-core/-/dev-server-core-0.6.3.tgz", - "integrity": "sha512-BWlgxIXQbg3RqUdz9Cfeh3XqFv0KcjQi4DLaZy9s63IlXgNZTzesTfDzliP/mIdWd5r8KZYh/P3n6LMi7CLPjQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@web/dev-server-core/-/dev-server-core-0.7.0.tgz", + "integrity": "sha512-1FJe6cJ3r0x0ZmxY/FnXVduQD4lKX7QgYhyS6N+VmIpV+tBU4sGRbcrmeoYeY+nlnPa6p2oNuonk3X5ln/W95g==", "dev": true, "dependencies": { "@types/koa": "^2.11.6", "@types/ws": "^7.4.0", - "@web/parse5-utils": "^2.0.2", + "@web/parse5-utils": "^2.1.0", "chokidar": "^3.4.3", "clone": "^2.1.2", "es-module-lexer": "^1.0.0", @@ -858,161 +1212,52 @@ "ws": "^7.4.2" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@web/dev-server-core/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@web/dev-server-core/node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/@web/dev-server-core/node_modules/isbinaryfile": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.0.tgz", - "integrity": "sha512-UDdnyGvMajJUWCkib7Cei/dvyJrrvo4FIrsvSFWdPpXSUorzXrDJ0S+X5Q4ZlasfPjca4yqCNNsjbCeiy8FFeg==", - "dev": true, - "engines": { - "node": ">= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/gjtorikian/" - } - }, - "node_modules/@web/dev-server-core/node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", - "dev": true, - "engines": { - "node": ">=16.14" - } - }, - "node_modules/@web/dev-server-core/node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", - "dev": true, - "engines": { - "node": ">=8.3.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } + "node": ">=18.0.0" } }, "node_modules/@web/dev-server-rollup": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.5.4.tgz", - "integrity": "sha512-lIN+lwj84Oh8Whe4vHijjMVe7NLJUzLxiiUsOleUtrBp1b7Us9QyUNCJK/iYitHJJDhCw6JcLJbCJ5H+vW969Q==", + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.6.1.tgz", + "integrity": "sha512-vhtsQ8qu1pBHailOBOYJwZnYDc1Lmx6ZAd2j+y5PD2ck0R1LmVsZ7dZK8hDCpkvpvlu2ndURjL9tbzdcsBRJmg==", "dev": true, "dependencies": { "@rollup/plugin-node-resolve": "^15.0.1", - "@web/dev-server-core": "^0.6.2", + "@web/dev-server-core": "^0.7.0", "nanocolors": "^0.2.1", "parse5": "^6.0.1", - "rollup": "^3.15.0", + "rollup": "^4.4.0", "whatwg-url": "^11.0.0" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" + "node": ">=18.0.0" } }, "node_modules/@web/parse5-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@web/parse5-utils/-/parse5-utils-2.0.2.tgz", - "integrity": "sha512-TogrPNt36zOSjbEd8zoDmUGsN2dqMbk4U+2DrxsnbVxtUIBRCNPIuZ+XeoGF8gpxe2/Yf0dIVz+HW5+wEnqkCg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@web/parse5-utils/-/parse5-utils-2.1.0.tgz", + "integrity": "sha512-GzfK5disEJ6wEjoPwx8AVNwUe9gYIiwc+x//QYxYDAFKUp4Xb1OJAGLc2l2gVrSQmtPGLKrTRcW90Hv4pEq1qA==", "dev": true, "dependencies": { "@types/parse5": "^6.0.1", "parse5": "^6.0.1" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@web/test-runner": { - "version": "0.17.2", - "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.17.2.tgz", - "integrity": "sha512-UQGw5yqD11K4ni/X0SNTmumzmUMbU7YslmIItYwBjB+2849GNfKMId2jykSz/csb86QG1+Jj739QAlT7BmnWKA==", - "dev": true, - "dependencies": { - "@web/browser-logs": "^0.3.3", - "@web/config-loader": "^0.2.1", - "@web/dev-server": "^0.3.3", - "@web/test-runner-chrome": "^0.14.0", - "@web/test-runner-commands": "^0.8.1", - "@web/test-runner-core": "^0.11.1", - "@web/test-runner-mocha": "^0.8.1", + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.18.0.tgz", + "integrity": "sha512-aAlQrdSqwCie1mxuSK5kM0RYDJZL4Q0Hd5LeXn1on3OtHLtgztL4dZzzNSuAWablR2/Vuve3ChwDDxmYSTqXRg==", + "dev": true, + "dependencies": { + "@web/browser-logs": "^0.4.0", + "@web/config-loader": "^0.3.0", + "@web/dev-server": "^0.4.0", + "@web/test-runner-chrome": "^0.15.0", + "@web/test-runner-commands": "^0.9.0", + "@web/test-runner-core": "^0.13.0", + "@web/test-runner-mocha": "^0.9.0", "camelcase": "^6.2.0", "command-line-args": "^5.1.1", "command-line-usage": "^7.0.1", @@ -1028,156 +1273,42 @@ "wtr": "dist/bin.js" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@web/test-runner-chrome": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/@web/test-runner-chrome/-/test-runner-chrome-0.14.3.tgz", - "integrity": "sha512-zBpgw6ezUszH/FsO/ZajHTjBE2wRpZrKIEupgorAakmRaAhX2Z9pmgKvlaDkkqziRcXR6s3ZfkmNquAUWNeROA==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@web/test-runner-chrome/-/test-runner-chrome-0.15.0.tgz", + "integrity": "sha512-ZqkTJGQ57FDz3lWw+9CKfHuTV64S9GzBy5+0siSQulEVPfGiTzpksx9DohtA3BCLXdbEq4OHg40/XIQJomlc9w==", "dev": true, "dependencies": { - "@web/test-runner-core": "^0.11.6", - "@web/test-runner-coverage-v8": "^0.7.2", + "@web/test-runner-core": "^0.13.0", + "@web/test-runner-coverage-v8": "^0.8.0", "async-mutex": "0.4.0", "chrome-launcher": "^0.15.0", "puppeteer-core": "^20.0.0" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@web/test-runner-chrome/node_modules/chrome-launcher": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", - "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", - "dev": true, - "dependencies": { - "@types/node": "*", - "escape-string-regexp": "^4.0.0", - "is-wsl": "^2.2.0", - "lighthouse-logger": "^1.0.0" - }, - "bin": { - "print-chrome-path": "bin/print-chrome-path.js" - }, - "engines": { - "node": ">=12.13.0" - } - }, - "node_modules/@web/test-runner-chrome/node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } - }, - "node_modules/@web/test-runner-chrome/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/@web/test-runner-chrome/node_modules/devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==", - "dev": true - }, - "node_modules/@web/test-runner-chrome/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/@web/test-runner-chrome/node_modules/puppeteer-core": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", - "integrity": "sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==", - "dev": true, - "dependencies": { - "@puppeteer/browsers": "1.4.6", - "chromium-bidi": "0.4.16", - "cross-fetch": "4.0.0", - "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" - }, - "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@web/test-runner-chrome/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/@web/test-runner-commands": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@web/test-runner-commands/-/test-runner-commands-0.8.2.tgz", - "integrity": "sha512-d38foLaPFjxxpa6diVldlfq1r9f8GvGyxN+WdCQ6knHD2v3kds1N6E5N2IRlEUjgpIAbJG7PfSiId+KpDlOEeQ==", - "dev": true, - "dependencies": { - "@web/test-runner-core": "^0.11.6", - "mkdirp": "^1.0.4" - }, - "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } - }, - "node_modules/@web/test-runner-commands/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + }, + "node_modules/@web/test-runner-commands": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@web/test-runner-commands/-/test-runner-commands-0.9.0.tgz", + "integrity": "sha512-zeLI6QdH0jzzJMDV5O42Pd8WLJtYqovgdt0JdytgHc0d1EpzXDsc7NTCJSImboc2NcayIsWAvvGGeRF69SMMYg==", "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" + "dependencies": { + "@web/test-runner-core": "^0.13.0", + "mkdirp": "^1.0.4" }, "engines": { - "node": ">=10" + "node": ">=18.0.0" } }, "node_modules/@web/test-runner-core": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/@web/test-runner-core/-/test-runner-core-0.11.6.tgz", - "integrity": "sha512-hbLg15seMnpDD32NmEzy/T18EKiH4tnuqaspqq7dEKY9svvVhPiFj/Q0JN79SvE6oE4M0vAxzCTRlBl4/huiTw==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@web/test-runner-core/-/test-runner-core-0.13.0.tgz", + "integrity": "sha512-mUrETPg9n4dHWEk+D46BU3xVhQf+ljT4cG7FSpmF7AIOsXWgWHoaXp6ReeVcEmM5fmznXec2O/apTb9hpGrP3w==", "dev": true, "dependencies": { "@babel/code-frame": "^7.12.11", @@ -1187,8 +1318,8 @@ "@types/debounce": "^1.2.0", "@types/istanbul-lib-coverage": "^2.0.3", "@types/istanbul-reports": "^3.0.0", - "@web/browser-logs": "^0.3.4", - "@web/dev-server-core": "^0.6.2", + "@web/browser-logs": "^0.4.0", + "@web/dev-server-core": "^0.7.0", "chokidar": "^3.4.3", "cli-cursor": "^3.1.0", "co-body": "^6.1.0", @@ -1208,77 +1339,49 @@ "source-map": "^0.7.3" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@web/test-runner-core/node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": ">=18.0.0" } }, "node_modules/@web/test-runner-coverage-v8": { - "version": "0.7.2", - "resolved": "https://registry.npmjs.org/@web/test-runner-coverage-v8/-/test-runner-coverage-v8-0.7.2.tgz", - "integrity": "sha512-vo7dNbvSl+2kwPSYIbsvc7ynEXwfflH/P4z5SBTEAjkiN99bgTGKXK+XFZuuMIjCvasalW+dlFepTyG6Gutsbg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@web/test-runner-coverage-v8/-/test-runner-coverage-v8-0.8.0.tgz", + "integrity": "sha512-PskiucYpjUtgNfR2zF2AWqWwjXL7H3WW/SnCAYmzUrtob7X9o/+BjdyZ4wKbOxWWSbJO4lEdGIDLu+8X2Xw+lA==", "dev": true, "dependencies": { - "@web/test-runner-core": "^0.11.6", + "@web/test-runner-core": "^0.13.0", "istanbul-lib-coverage": "^3.0.0", "lru-cache": "^8.0.4", "picomatch": "^2.2.2", "v8-to-istanbul": "^9.0.1" }, "engines": { - "node": ">=16.0.0" - } - }, - "node_modules/@web/test-runner-coverage-v8/node_modules/lru-cache": { - "version": "8.0.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", - "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", - "dev": true, - "engines": { - "node": ">=16.14" + "node": ">=18.0.0" } }, "node_modules/@web/test-runner-mocha": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.8.1.tgz", - "integrity": "sha512-CfYNZBbUSBiPNKkbF/dhxayecLCYZnu3g4cfgpfgmvLewlVOO6gNxaPt2c1/QhZutzTvXcMlsmaoWyk08F+V6A==", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.9.0.tgz", + "integrity": "sha512-ZL9F6FXd0DBQvo/h/+mSfzFTSRVxzV9st/AHhpgABtUtV/AIpVE9to6+xdkpu6827kwjezdpuadPfg+PlrBWqQ==", "dev": true, "dependencies": { - "@types/mocha": "^10.0.1", - "@web/test-runner-core": "^0.11.1" + "@web/test-runner-core": "^0.13.0" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/@web/test-runner-playwright": { - "version": "0.10.2", - "resolved": "https://registry.npmjs.org/@web/test-runner-playwright/-/test-runner-playwright-0.10.2.tgz", - "integrity": "sha512-ogQY8EEHtskVXmLMLZWH/cl1RFBXcJNnOwcgVp3iMrdrKQlEZNYIhi6B69vNfzCGkyq7Xzv7bfQ+CdSehtHrjw==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@web/test-runner-playwright/-/test-runner-playwright-0.11.0.tgz", + "integrity": "sha512-s+f43DSAcssKYVOD9SuzueUcctJdHzq1by45gAnSCKa9FQcaTbuYe8CzmxA21g+NcL5+ayo4z+MA9PO4H+PssQ==", "dev": true, "dependencies": { - "@web/test-runner-core": "^0.11.6", - "@web/test-runner-coverage-v8": "^0.7.2", + "@web/test-runner-core": "^0.13.0", + "@web/test-runner-coverage-v8": "^0.8.0", "playwright": "^1.22.2" }, "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" } }, "node_modules/accepts": { @@ -1294,6 +1397,18 @@ "node": ">= 0.6" } }, + "node_modules/agent-base": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1318,18 +1433,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1340,18 +1443,15 @@ } }, "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==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "dependencies": { - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" + "node": ">=4" } }, "node_modules/anymatch": { @@ -1367,6 +1467,12 @@ "node": ">= 8" } }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/array-back": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/array-back/-/array-back-3.1.0.tgz", @@ -1414,6 +1520,15 @@ "node": ">=8" } }, + "node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, "node_modules/async-mutex": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.0.tgz", @@ -1456,9 +1571,9 @@ ] }, "node_modules/basic-ftp": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.3.tgz", - "integrity": "sha512-QHX8HLlncOLpy54mh+k/sWIFd0ThmRqwe9ZjELybGZK+tZ8rUb9VO0saKJUROTbE+KhzDUT7xziGpGrW8Kmd+g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.4.tgz", + "integrity": "sha512-8PzkB0arJFV4jJWSGOYR+OEic6aeKMu/osRhBULN6RY0ykby6LKhbmuQ5ublvaas5BOwboah5D87nrHyuh8PPA==", "dev": true, "engines": { "node": ">=10.0.0" @@ -1474,13 +1589,12 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "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", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/braces": { @@ -1502,13 +1616,27 @@ "dev": true }, "node_modules/buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", - "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "node_modules/buffer-crc32": { @@ -1555,13 +1683,14 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -1580,19 +1709,17 @@ } }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" + "node": ">=4" } }, "node_modules/chalk-template": { @@ -1610,7 +1737,56 @@ "url": "https://github.com/chalk/chalk-template?sponsor=1" } }, - "node_modules/chalk/node_modules/has-flag": { + "node_modules/chalk-template/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": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk-template/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/chalk-template/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/chalk-template/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/chalk-template/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", @@ -1619,7 +1795,7 @@ "node": ">=8" } }, - "node_modules/chalk/node_modules/supports-color": { + "node_modules/chalk-template/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", @@ -1666,6 +1842,36 @@ "fsevents": "~2.3.2" } }, + "node_modules/chrome-launcher": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", + "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^1.0.0" + }, + "bin": { + "print-chrome-path": "bin/print-chrome-path.js" + }, + "engines": { + "node": ">=12.13.0" + } + }, + "node_modules/chrome-launcher/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/chromium-bidi": { "version": "0.4.16", "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.16.tgz", @@ -1701,27 +1907,54 @@ "wrap-ansi": "^7.0.0" } }, - "node_modules/cliui/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/cliui/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": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/cliui/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/cliui/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8" + "node": ">=7.0.0" + } + }, + "node_modules/cliui/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, "node_modules/clone": { @@ -1756,21 +1989,18 @@ } }, "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "color-name": "1.1.3" } }, "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/command-line-args": { @@ -1846,9 +2076,9 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "dev": true, "engines": { "node": ">= 0.6" @@ -1873,6 +2103,15 @@ "node": ">= 0.8" } }, + "node_modules/cross-fetch": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", + "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", + "dev": true, + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/data-uri-to-buffer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", @@ -1889,12 +2128,20 @@ "dev": true }, "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "dependencies": { - "ms": "2.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/decamelize": { @@ -1924,14 +2171,28 @@ "dev": true }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "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/define-data-property": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", + "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -1955,59 +2216,6 @@ "node": ">= 14" } }, - "node_modules/degenerator/node_modules/escodegen": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", - "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", - "dev": true, - "dependencies": { - "esprima": "^4.0.1", - "estraverse": "^5.2.0", - "esutils": "^2.0.2" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" - } - }, - "node_modules/degenerator/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/degenerator/node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/degenerator/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, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/delegates": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", @@ -2043,16 +2251,15 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.818844", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.818844.tgz", - "integrity": "sha512-AD1hi7iVJ8OD0aMLQU5VK0XH9LDlA1+BcPIgrAxPfaibx2DbWucuyOhc4oyQCbnvDDO68nN6/LcKfqTP343Jjg==", - "dev": true, - "peer": true + "version": "0.0.1147663", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", + "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==", + "dev": true }, "node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", + "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", "dev": true, "engines": { "node": ">=0.3.1" @@ -2101,21 +2308,21 @@ } }, "node_modules/errorstacks": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/errorstacks/-/errorstacks-2.4.0.tgz", - "integrity": "sha512-5ecWhU5gt0a5G05nmQcgCxP5HperSMxLDzvWlT5U+ZSKkuDK0rJ3dbCQny6/vSCIXjwrhwSecXBbw1alr295hQ==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/errorstacks/-/errorstacks-2.4.1.tgz", + "integrity": "sha512-jE4i0SMYevwu/xxAuzhly/KTwtj0xDhbzB6m1xPImxTkw8wcCbgarOQPfCVMi5JKVyW7in29pNJCCJrry3Ynnw==", "dev": true }, "node_modules/es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", + "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", "dev": true }, "node_modules/esbuild": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.3.tgz", - "integrity": "sha512-9n3AsBRe6sIyOc6kmoXg2ypCLgf3eZSraWFRpnkto+svt8cZNuKTkb1bhQcitBcvIqjNiK7K0J3KPmwGSfkA8g==", + "version": "0.19.10", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.10.tgz", + "integrity": "sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==", "dev": true, "hasInstallScript": true, "bin": { @@ -2125,28 +2332,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.3", - "@esbuild/android-arm64": "0.17.3", - "@esbuild/android-x64": "0.17.3", - "@esbuild/darwin-arm64": "0.17.3", - "@esbuild/darwin-x64": "0.17.3", - "@esbuild/freebsd-arm64": "0.17.3", - "@esbuild/freebsd-x64": "0.17.3", - "@esbuild/linux-arm": "0.17.3", - "@esbuild/linux-arm64": "0.17.3", - "@esbuild/linux-ia32": "0.17.3", - "@esbuild/linux-loong64": "0.17.3", - "@esbuild/linux-mips64el": "0.17.3", - "@esbuild/linux-ppc64": "0.17.3", - "@esbuild/linux-riscv64": "0.17.3", - "@esbuild/linux-s390x": "0.17.3", - "@esbuild/linux-x64": "0.17.3", - "@esbuild/netbsd-x64": "0.17.3", - "@esbuild/openbsd-x64": "0.17.3", - "@esbuild/sunos-x64": "0.17.3", - "@esbuild/win32-arm64": "0.17.3", - "@esbuild/win32-ia32": "0.17.3", - "@esbuild/win32-x64": "0.17.3" + "@esbuild/aix-ppc64": "0.19.10", + "@esbuild/android-arm": "0.19.10", + "@esbuild/android-arm64": "0.19.10", + "@esbuild/android-x64": "0.19.10", + "@esbuild/darwin-arm64": "0.19.10", + "@esbuild/darwin-x64": "0.19.10", + "@esbuild/freebsd-arm64": "0.19.10", + "@esbuild/freebsd-x64": "0.19.10", + "@esbuild/linux-arm": "0.19.10", + "@esbuild/linux-arm64": "0.19.10", + "@esbuild/linux-ia32": "0.19.10", + "@esbuild/linux-loong64": "0.19.10", + "@esbuild/linux-mips64el": "0.19.10", + "@esbuild/linux-ppc64": "0.19.10", + "@esbuild/linux-riscv64": "0.19.10", + "@esbuild/linux-s390x": "0.19.10", + "@esbuild/linux-x64": "0.19.10", + "@esbuild/netbsd-x64": "0.19.10", + "@esbuild/openbsd-x64": "0.19.10", + "@esbuild/sunos-x64": "0.19.10", + "@esbuild/win32-arm64": "0.19.10", + "@esbuild/win32-ia32": "0.19.10", + "@esbuild/win32-x64": "0.19.10" } }, "node_modules/escalade": { @@ -2165,15 +2373,65 @@ "dev": true }, "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { - "node": ">=10" + "node": ">=0.8.0" + } + }, + "node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/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, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" } }, "node_modules/estree-walker": { @@ -2220,23 +2478,6 @@ "@types/yauzl": "^2.9.1" } }, - "node_modules/extract-zip/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/extract-zip/node_modules/get-stream": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", @@ -2252,12 +2493,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/extract-zip/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -2265,9 +2500,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -2281,9 +2516,9 @@ } }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", + "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -2377,9 +2612,9 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "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, @@ -2391,10 +2626,13 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/get-caller-file": { "version": "2.0.5", @@ -2414,19 +2652,32 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", + "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/get-uri": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", @@ -2442,44 +2693,20 @@ "node": ">= 14" } }, - "node_modules/get-uri/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/get-uri/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -2514,25 +2741,58 @@ "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, "engines": { - "node": ">= 0.4.0" + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-symbols": { @@ -2562,6 +2822,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -2590,16 +2862,7 @@ "node": ">= 0.8" } }, - "node_modules/http-assert/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-assert/node_modules/http-errors": { + "node_modules/http-errors": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", @@ -2615,29 +2878,39 @@ "node": ">= 0.6" } }, - "node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "node_modules/http-errors/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", "dev": true, "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 0.8" + "node": ">= 14" } }, - "node_modules/http-errors/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "node_modules/https-proxy-agent": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "4" + }, "engines": { - "node": ">= 0.8" + "node": ">= 14" } }, "node_modules/iconv-lite": { @@ -2673,9 +2946,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -2740,12 +3013,12 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", "dev": true, "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2775,6 +3048,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-generator-function": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", @@ -2817,6 +3099,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-reference": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", @@ -2826,6 +3117,18 @@ "@types/estree": "*" } }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-unicode-supported": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", @@ -2850,10 +3153,22 @@ "node": ">=8" } }, + "node_modules/isbinaryfile": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.0.tgz", + "integrity": "sha512-UDdnyGvMajJUWCkib7Cei/dvyJrrvo4FIrsvSFWdPpXSUorzXrDJ0S+X5Q4ZlasfPjca4yqCNNsjbCeiy8FFeg==", + "dev": true, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/gjtorikian/" + } + }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "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" @@ -2882,48 +3197,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-report/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.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.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/istanbul-lib-report/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2936,12 +3209,6 @@ "node": ">=8" } }, - "node_modules/istanbul-lib-report/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/istanbul-reports": { "version": "3.1.6", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", @@ -2961,6 +3228,18 @@ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -3058,54 +3337,6 @@ "node": ">= 8" } }, - "node_modules/koa-send/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/koa-send/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa-send/node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa-send/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/koa-static": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/koa-static/-/koa-static-5.0.0.tgz", @@ -3128,70 +3359,31 @@ "ms": "^2.1.1" } }, - "node_modules/koa-static/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/koa/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/koa/node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "node_modules/lighthouse-logger": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", + "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", "dev": true, "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/koa/node_modules/http-errors/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" + "debug": "^2.6.9", + "marky": "^1.2.2" } }, - "node_modules/koa/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/lighthouse-logger": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.3.0.tgz", - "integrity": "sha512-BbqAKApLb9ywUli+0a+PcV04SyJ/N1q/8qgCNe6U97KbPCS1BTksEuHFLYdvc8DltuhfxIUBqDZsC0bBGtl3lA==", + "node_modules/lighthouse-logger/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "dependencies": { - "debug": "^2.6.9", - "marky": "^1.2.2" + "ms": "2.0.0" } }, + "node_modules/lighthouse-logger/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "dev": true + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3241,70 +3433,111 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/log-update": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", - "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", + "node_modules/log-symbols/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": { - "ansi-escapes": "^4.3.0", - "cli-cursor": "^3.1.0", - "slice-ansi": "^4.0.0", - "wrap-ansi": "^6.2.0" + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { "node": ">=10" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/log-update/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { "node": ">=8" } }, - "node_modules/log-update/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "has-flag": "^4.0.0" }, "engines": { "node": ">=8" } }, - "node_modules/log-update/node_modules/wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "node_modules/log-update": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", + "integrity": "sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==", "dev": true, "dependencies": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-escapes": "^4.3.0", + "cli-cursor": "^3.1.0", + "slice-ansi": "^4.0.0", + "wrap-ansi": "^6.2.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/loupe": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.0.0.tgz", - "integrity": "sha512-eDW5UhrXw2b2pCht9KJXPooZwdDudFfJGTbPENJ4J0vxLtWO/+EEg2lJpMJuv568rD3+5X2UroJqhZHjQG0GqQ==", - "hasInstallScript": true, + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.0.1.tgz", + "integrity": "sha512-phbaE2fPsRe8cQ7Cy5Ze5p9JLmpiaqGT45RCUWYYjZgYPBoeC3vqrlYPj4BQ82ln60ZtM3Iq00PPC3FyUdS4Kw==", "dependencies": { "get-func-name": "^2.0.1" } }, + "node_modules/lru-cache": { + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.5.tgz", + "integrity": "sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==", + "dev": true, + "engines": { + "node": ">=16.14" + } + }, "node_modules/magic-string": { "version": "0.30.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.5.tgz", @@ -3317,6 +3550,21 @@ "node": ">=12" } }, + "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/marky": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.5.tgz", @@ -3385,21 +3633,21 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3412,15 +3660,15 @@ "dev": true }, "node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, "bin": { "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/mkdirp-classic": { @@ -3469,43 +3717,68 @@ "url": "https://opencollective.com/mochajs" } }, - "node_modules/mocha/node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "node_modules/mocha/node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } }, - "node_modules/mocha/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==", + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mocha/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", "dev": true, "dependencies": { - "ms": "2.1.2" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" }, "engines": { - "node": ">=6.0" + "node": "*" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mocha/node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "node_modules/mocha/node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } }, "node_modules/mocha/node_modules/has-flag": { "version": "4.0.0", @@ -3516,18 +3789,6 @@ "node": ">=8" } }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, "node_modules/mocha/node_modules/minimatch": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", @@ -3546,6 +3807,18 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/mocha/node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/mocha/node_modules/supports-color": { "version": "8.1.1", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", @@ -3562,9 +3835,9 @@ } }, "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "node_modules/nanocolors": { @@ -3574,10 +3847,16 @@ "dev": true }, "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -3623,6 +3902,28 @@ } } }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3633,9 +3934,9 @@ } }, "node_modules/object-inspect": { - "version": "1.12.3", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz", - "integrity": "sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3749,67 +4050,6 @@ "node": ">= 14" } }, - "node_modules/pac-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/pac-proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dev": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/pac-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/pac-resolver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.0.tgz", @@ -3899,12 +4139,12 @@ } }, "node_modules/playwright": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.39.0.tgz", - "integrity": "sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw==", + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz", + "integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==", "dev": true, "dependencies": { - "playwright-core": "1.39.0" + "playwright-core": "1.40.1" }, "bin": { "playwright": "cli.js" @@ -3917,9 +4157,9 @@ } }, "node_modules/playwright-core": { - "version": "1.39.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.39.0.tgz", - "integrity": "sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw==", + "version": "1.40.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz", + "integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -3928,6 +4168,20 @@ "node": ">=16" } }, + "node_modules/playwright/node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/portfinder": { "version": "1.0.32", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.32.tgz", @@ -3942,15 +4196,6 @@ "node": ">= 0.12.0" } }, - "node_modules/portfinder/node_modules/async": { - "version": "2.6.4", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", - "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", - "dev": true, - "dependencies": { - "lodash": "^4.17.14" - } - }, "node_modules/portfinder/node_modules/debug": { "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", @@ -3960,11 +4205,17 @@ "ms": "^2.1.1" } }, - "node_modules/portfinder/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true + "node_modules/portfinder/node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } }, "node_modules/progress": { "version": "2.0.3", @@ -3994,61 +4245,6 @@ "node": ">= 14" } }, - "node_modules/proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/proxy-agent/node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", - "dev": true, - "dependencies": { - "agent-base": "^7.1.0", - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/proxy-agent/node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", - "dev": true, - "dependencies": { - "agent-base": "^7.0.2", - "debug": "4" - }, - "engines": { - "node": ">= 14" - } - }, "node_modules/proxy-agent/node_modules/lru-cache": { "version": "7.18.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", @@ -4058,12 +4254,6 @@ "node": ">=12" } }, - "node_modules/proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/proxy-from-env": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", @@ -4080,10 +4270,65 @@ "once": "^1.3.1" } }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/puppeteer-core": { + "version": "20.9.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", + "integrity": "sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==", + "dev": true, + "dependencies": { + "@puppeteer/browsers": "1.4.6", + "chromium-bidi": "0.4.16", + "cross-fetch": "4.0.0", + "debug": "4.3.4", + "devtools-protocol": "0.0.1147663", + "ws": "8.13.0" + }, + "engines": { + "node": ">=16.3.0" + }, + "peerDependencies": { + "typescript": ">= 4.7.4" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/puppeteer-core/node_modules/ws": { + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", + "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "dev": true, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.11.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz", + "integrity": "sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==", "dev": true, "dependencies": { "side-channel": "^1.0.4" @@ -4131,9 +4376,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "dev": true, "dependencies": { "bytes": "3.1.2", @@ -4145,6 +4390,31 @@ "node": ">= 0.8" } }, + "node_modules/raw-body/node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dev": true, + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4256,18 +4526,31 @@ } }, "node_modules/rollup": { - "version": "3.29.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", - "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", + "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=14.18.0", + "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.9.1", + "@rollup/rollup-android-arm64": "4.9.1", + "@rollup/rollup-darwin-arm64": "4.9.1", + "@rollup/rollup-darwin-x64": "4.9.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", + "@rollup/rollup-linux-arm64-gnu": "4.9.1", + "@rollup/rollup-linux-arm64-musl": "4.9.1", + "@rollup/rollup-linux-riscv64-gnu": "4.9.1", + "@rollup/rollup-linux-x64-gnu": "4.9.1", + "@rollup/rollup-linux-x64-musl": "4.9.1", + "@rollup/rollup-win32-arm64-msvc": "4.9.1", + "@rollup/rollup-win32-ia32-msvc": "4.9.1", + "@rollup/rollup-win32-x64-msvc": "4.9.1", "fsevents": "~2.3.2" } }, @@ -4320,13 +4603,55 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, "dependencies": { - "randombytes": "^2.1.0" + "randombytes": "^2.1.0" + } + }, + "node_modules/set-function-length": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", + "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.1", + "get-intrinsic": "^1.2.1", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/setprototypeof": { @@ -4381,15 +4706,39 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/slice-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "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": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/smart-buffer": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", @@ -4428,41 +4777,6 @@ "node": ">= 14" } }, - "node_modules/socks-proxy-agent/node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", - "dev": true, - "dependencies": { - "debug": "^4.3.4" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/socks-proxy-agent/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socks-proxy-agent/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, "node_modules/socks/node_modules/ip": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", @@ -4497,15 +4811,29 @@ } }, "node_modules/streamx": { - "version": "2.15.1", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.1.tgz", - "integrity": "sha512-fQMzy2O/Q47rgwErk/eGeLu/roaFWV0jVsogDmrszM9uIw8L5OA+t+V93MgYlufNptfjmYR1tOMWhei/Eh7TQA==", + "version": "2.15.6", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", + "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", "dev": true, "dependencies": { "fast-fifo": "^1.1.0", "queue-tick": "^1.0.1" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -4530,6 +4858,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/supports-preserve-symlinks-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", @@ -4581,6 +4921,28 @@ "node": ">=12.17" } }, + "node_modules/tar-fs": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", + "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "dev": true, + "dependencies": { + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^3.1.5" + } + }, + "node_modules/tar-stream": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", + "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "dev": true, + "dependencies": { + "b4a": "^1.6.4", + "fast-fifo": "^1.2.0", + "streamx": "^2.15.0" + } + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4609,15 +4971,21 @@ } }, "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", + "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", + "dev": true, + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=12" + } }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "dev": true }, "node_modules/tsscmp": { @@ -4629,6 +4997,18 @@ "node": ">=0.6.x" } }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -4661,6 +5041,12 @@ "through": "^2.3.8" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -4680,9 +5066,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", - "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -4703,19 +5089,25 @@ } }, "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "dev": true, + "engines": { + "node": ">=12" + } }, "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", + "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", "dev": true, "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "tr46": "^3.0.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=12" } }, "node_modules/wordwrapjs": { @@ -4734,9 +5126,9 @@ "dev": true }, "node_modules/wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", "dev": true, "dependencies": { "ansi-styles": "^4.0.0", @@ -4744,41 +5136,69 @@ "strip-ansi": "^6.0.0" }, "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "node_modules/wrap-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": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" + "color-name": "~1.1.4" }, "engines": { - "node": ">=8" + "node": ">=7.0.0" } }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -4788,6 +5208,12 @@ "node": ">=10" } }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -4830,38 +5256,6 @@ "node": ">=10" } }, - "node_modules/yargs-unparser/node_modules/is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/yauzl": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", diff --git a/package.json b/package.json index f070222a..a53097a0 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,10 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", - "@web/dev-server-rollup": "^0.5.4", - "@web/test-runner": "^0.17.2", - "@web/test-runner-playwright": "^0.10.2", - "esbuild": "^0.17.3", + "@web/dev-server-rollup": "^0.6.1", + "@web/test-runner": "^0.18.0", + "@web/test-runner-playwright": "^0.11.0", + "esbuild": "^0.19.10", "mocha": "^10.2.0" } } From 082c7e2548140813452d7ee0cf6d42052bc43c5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 28 Dec 2023 15:13:36 +0100 Subject: [PATCH 03/30] Update README.md --- README.md | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index e8e120e4..065a4275 100644 --- a/README.md +++ b/README.md @@ -71,32 +71,12 @@ You can also use it within the browser; install via npm and use the `chai.js` fi Import the library in your code, and then pick one of the styles you'd like to use - either `assert`, `expect` or `should`: ```js -var chai = require('chai'); -var assert = chai.assert; // Using Assert style -var expect = chai.expect; // Using Expect style -var should = chai.should(); // Using Should style -``` - -### Pre-Native Modules Usage (_registers the chai testing style globally_) - -```js -require('chai/register-assert'); // Using Assert style -require('chai/register-expect'); // Using Expect style -require('chai/register-should'); // Using Should style -``` - -### Pre-Native Modules Usage (_as local variables_) - -```js -const { assert } = require('chai'); // Using Assert style -const { expect } = require('chai'); // Using Expect style -const { should } = require('chai'); // Using Should style -should(); // Modifies `Object.prototype` - -const { expect, use } = require('chai'); // Creates local variables `expect` and `use`; useful for plugin use +import { assert } from 'chai'; // Using Assert style +import { expect } from 'chai'; // Using Expect style +import { should } from 'chai'; // Using Should style ``` -### Native Modules Usage (_registers the chai testing style globally_) +### Register the chai testing style globally ```js import 'chai/register-assert'; // Using Assert style @@ -104,13 +84,15 @@ import 'chai/register-expect'; // Using Expect style import 'chai/register-should'; // Using Should style ``` -### Native Modules Usage (_local import only_) +### Import assertion styles as local variables ```js import { assert } from 'chai'; // Using Assert style import { expect } from 'chai'; // Using Expect style import { should } from 'chai'; // Using Should style should(); // Modifies `Object.prototype` + +import { expect, use } from 'chai'; // Creates local variables `expect` and `use`; useful for plugin use ``` ### Usage with Mocha From 2523cd72c9424b4a8aa04865c79d91c499031ba7 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Fri, 12 Jan 2024 20:42:38 +0000 Subject: [PATCH 04/30] fix: removes `??` for node compat (#1576) We shipped syntax which is beyond our `engine` constraint. `??` is available in node 14 but 4.x is node 4 and above, while 5.x is node 12 and above. This just dumbs it back down to `||` for now at least. --- lib/chai/assertion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chai/assertion.js b/lib/chai/assertion.js index 54a9d77f..c8c416d1 100644 --- a/lib/chai/assertion.js +++ b/lib/chai/assertion.js @@ -54,7 +54,7 @@ export function Assertion (obj, msg, ssfi, lockSsfi) { util.flag(this, 'lockSsfi', lockSsfi); util.flag(this, 'object', obj); util.flag(this, 'message', msg); - util.flag(this, 'eql', config.deepEqual ?? util.eql); + util.flag(this, 'eql', config.deepEqual || util.eql); return util.proxify(this); } From 33a4408227cecb00ffdb204ad336cc6dc3f21868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Mon, 15 Jan 2024 16:12:21 +0100 Subject: [PATCH 05/30] Update `loupe` to latest version (#1579) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4b71f8d2..520fcdbf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "assertion-error": "^2.0.1", "check-error": "^2.0.0", "deep-eql": "^5.0.1", - "loupe": "^3.0.0", + "loupe": "^3.1.0", "pathval": "^2.0.0" }, "devDependencies": { @@ -3522,9 +3522,9 @@ } }, "node_modules/loupe": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.0.1.tgz", - "integrity": "sha512-phbaE2fPsRe8cQ7Cy5Ze5p9JLmpiaqGT45RCUWYYjZgYPBoeC3vqrlYPj4BQ82ln60ZtM3Iq00PPC3FyUdS4Kw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.0.tgz", + "integrity": "sha512-qKl+FrLXUhFuHUoDJG7f8P8gEMHq9NFS0c6ghXG1J0rldmZFQZoNVv/vyirE9qwCIhWZDsvEFd1sbFu3GvRQFg==", "dependencies": { "get-func-name": "^2.0.1" } diff --git a/package.json b/package.json index a53097a0..0fabbfda 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "assertion-error": "^2.0.1", "check-error": "^2.0.0", "deep-eql": "^5.0.1", - "loupe": "^3.0.0", + "loupe": "^3.1.0", "pathval": "^2.0.0" }, "devDependencies": { From c22eb386e7d2feadd71e65ae6d395052fba4c613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Wed, 24 Jan 2024 20:36:58 +0100 Subject: [PATCH 06/30] Re-enable some webkit tests (#1580) --- test/should.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/test/should.js b/test/should.js index 17429961..71865f8a 100644 --- a/test/should.js +++ b/test/should.js @@ -3190,9 +3190,7 @@ describe('should', function() { false.should.be.extensible; }, 'expected false to be extensible'); - // A bug in Safari 10 causes the below test to fail. It can be re-enabled - // once the bug is fixed. See https://github.com/chaijs/chai/issues/855. - /*if (typeof Proxy === 'function') { + if (typeof Proxy === 'function') { var proxy = new Proxy({}, { isExtensible: function() { throw new TypeError(); @@ -3203,7 +3201,7 @@ describe('should', function() { // .extensible should not suppress errors, thrown in proxy traps proxy.should.be.extensible; }, { name: 'TypeError' }); - }*/ + } }); it('sealed', function() { @@ -3242,9 +3240,7 @@ describe('should', function() { false.should.not.be.sealed; }, 'expected false to not be sealed'); - // A bug in Safari 10 causes the below test to fail. It can be re-enabled - // once the bug is fixed. See https://github.com/chaijs/chai/issues/855. - /*if (typeof Proxy === 'function') { + if (typeof Proxy === 'function') { var proxy = new Proxy({}, { ownKeys: function() { throw new TypeError(); @@ -3258,7 +3254,7 @@ describe('should', function() { // .sealed should not suppress errors, thrown in proxy traps proxy.should.be.sealed; }, { name: 'TypeError' }); - }*/ + } }); it('frozen', function() { @@ -3297,9 +3293,7 @@ describe('should', function() { false.should.not.be.frozen; }, 'expected false to not be frozen'); - // A bug in Safari 10 causes the below test to fail. It can be re-enabled - // once the bug is fixed. See https://github.com/chaijs/chai/issues/855. - /*if (typeof Proxy === 'function') { + if (typeof Proxy === 'function') { var proxy = new Proxy({}, { ownKeys: function() { throw new TypeError(); @@ -3313,6 +3307,6 @@ describe('should', function() { // .frozen should not suppress errors, thrown in proxy traps proxy.should.be.frozen; }, { name: 'TypeError' }); - }*/ + } }); }); From 61dfca8bf33adf68cba089cc03466c66d2f707f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Wed, 24 Jan 2024 20:57:25 +0100 Subject: [PATCH 07/30] Remove a bunch of if statements in test/should.js (#1581) * Remove a bunch of if statements in test/should.js * Remove `typeof Proxy` check in `test/should.js` --- test/should.js | 786 ++++++++++++++++++++++--------------------------- 1 file changed, 350 insertions(+), 436 deletions(-) diff --git a/test/should.js b/test/should.js index 71865f8a..0da30610 100644 --- a/test/should.js +++ b/test/should.js @@ -53,8 +53,6 @@ describe('should', function() { }); describe('proxify', function () { - if (typeof Proxy === 'undefined' || typeof Reflect === 'undefined') return; - it('throws when invalid property follows should', function () { err(function () { (42).should.pizza; @@ -413,12 +411,8 @@ describe('should', function() { assert(0); assert(true); assert(false); - if (typeof Symbol === 'function') { - assert(Symbol("a")); - } - if (typeof BigInt === 'function') { - assert(BigInt(10)); - } + assert(Symbol("a")); + assert(BigInt(10)); }); it('.equal()', function(){ @@ -442,11 +436,7 @@ describe('should', function() { ({}).should.be.a('object'); ([]).should.be.a('array'); (function() {}).should.be.a('function'); - - if (typeof Symbol === 'function') { - Symbol().should.be.a('symbol'); - } - + Symbol().should.be.a('symbol'); (5).should.be.a('number'); err(function(){ @@ -500,31 +490,29 @@ describe('should', function() { t.should.be.an.instanceof(Thing); }, 'The instanceof assertion needs a constructor but Function was given.', true); - if (typeof Symbol !== 'undefined' && typeof Symbol.hasInstance !== 'undefined') { - err(function(){ - new Foo().should.be.an.instanceof(Symbol()); - }, "The instanceof assertion needs a constructor but Symbol was given."); - - err(function() { - var FakeConstructor = {}; - var fakeInstanceB = 4; - FakeConstructor[Symbol.hasInstance] = function (val) { - return val === 3; - }; - - fakeInstanceB.should.be.an.instanceof(FakeConstructor); - }, 'expected 4 to be an instance of an unnamed constructor'); - - err(function() { - var FakeConstructor = {}; - var fakeInstanceB = 4; - FakeConstructor[Symbol.hasInstance] = function (val) { - return val === 4; - }; - - fakeInstanceB.should.not.be.an.instanceof(FakeConstructor); - }, 'expected 4 to not be an instance of an unnamed constructor'); - } + err(function(){ + new Foo().should.be.an.instanceof(Symbol()); + }, "The instanceof assertion needs a constructor but Symbol was given."); + + err(function() { + var FakeConstructor = {}; + var fakeInstanceB = 4; + FakeConstructor[Symbol.hasInstance] = function (val) { + return val === 3; + }; + + fakeInstanceB.should.be.an.instanceof(FakeConstructor); + }, 'expected 4 to be an instance of an unnamed constructor'); + + err(function() { + var FakeConstructor = {}; + var fakeInstanceB = 4; + FakeConstructor[Symbol.hasInstance] = function (val) { + return val === 4; + }; + + fakeInstanceB.should.not.be.an.instanceof(FakeConstructor); + }, 'expected 4 to not be an instance of an unnamed constructor'); err(function(){ (3).should.an.instanceof(Foo, 'blah'); @@ -585,47 +573,43 @@ describe('should', function() { (1).should.have.lengthOf.within(5,7, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - (new Map).should.have.length.within(0, 0); - (new Map).should.have.lengthOf.within(0, 0); + (new Map).should.have.length.within(0, 0); + (new Map).should.have.lengthOf.within(0, 0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map; + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - map.should.have.length.within(2, 4); - map.should.have.lengthOf.within(2, 4); + map.should.have.length.within(2, 4); + map.should.have.lengthOf.within(2, 4); - err(function () { - map.should.have.length.within(5, 7, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); + err(function () { + map.should.have.length.within(5, 7, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); - err(function () { - map.should.have.lengthOf.within(5, 7, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); - } + err(function () { + map.should.have.lengthOf.within(5, 7, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); - if (typeof Set === 'function') { - (new Set).should.have.length.within(0, 0); - (new Set).should.have.lengthOf.within(0, 0); + (new Set).should.have.length.within(0, 0); + (new Set).should.have.lengthOf.within(0, 0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set; + set.add(1); + set.add(2); + set.add(3); - set.should.have.length.within(2, 4); - set.should.have.lengthOf.within(2, 4); + set.should.have.length.within(2, 4); + set.should.have.lengthOf.within(2, 4); - err(function () { - set.should.have.length.within(5, 7, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); + err(function () { + set.should.have.length.within(5, 7, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); - err(function () { - set.should.have.lengthOf.within(5, 7, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); - } + err(function () { + set.should.have.lengthOf.within(5, 7, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); }); it('within(start, finish) (dates)', function(){ @@ -732,47 +716,43 @@ describe('should', function() { (1).should.have.lengthOf.above(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - (new Map).should.have.length.above(-1); - (new Map).should.have.lengthOf.above(-1); + (new Map).should.have.length.above(-1); + (new Map).should.have.lengthOf.above(-1); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map; + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - map.should.have.length.above(2); - map.should.have.lengthOf.above(2); + map.should.have.length.above(2); + map.should.have.lengthOf.above(2); - err(function () { - map.should.have.length.above(5, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); + err(function () { + map.should.have.length.above(5, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); - err(function () { - map.should.have.lengthOf.above(5, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); - } + err(function () { + map.should.have.lengthOf.above(5, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); - if (typeof Set === 'function') { - (new Set).should.have.length.above(-1); - (new Set).should.have.lengthOf.above(-1); + (new Set).should.have.length.above(-1); + (new Set).should.have.lengthOf.above(-1); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set; + set.add(1); + set.add(2); + set.add(3); - set.should.have.length.above(2); - set.should.have.lengthOf.above(2); + set.should.have.length.above(2); + set.should.have.lengthOf.above(2); - err(function () { - set.should.have.length.above(5, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); + err(function () { + set.should.have.length.above(5, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); - err(function () { - set.should.have.lengthOf.above(5, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); - } + err(function () { + set.should.have.lengthOf.above(5, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); }); it('above(n) (dates)', function(){ @@ -854,47 +834,43 @@ describe('should', function() { (1).should.not.be.at.least(null, 'blah'); }, "blah: the argument to least must be a number"); - if (typeof Map === 'function') { - (new Map).should.have.length.of.at.least(0); - (new Map).should.have.lengthOf.at.least(0); + (new Map).should.have.length.of.at.least(0); + (new Map).should.have.lengthOf.at.least(0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map; + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - map.should.have.length.of.at.least(3); - map.should.have.lengthOf.at.least(3); + map.should.have.length.of.at.least(3); + map.should.have.lengthOf.at.least(3); - err(function () { - map.should.have.length.of.at.least(4, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); + err(function () { + map.should.have.length.of.at.least(4, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); - err(function () { - map.should.have.lengthOf.at.least(4, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); - } + err(function () { + map.should.have.lengthOf.at.least(4, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); - if (typeof Set === 'function') { - (new Set).should.have.length.of.at.least(0); - (new Set).should.have.lengthOf.at.least(0); + (new Set).should.have.length.of.at.least(0); + (new Set).should.have.lengthOf.at.least(0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set; + set.add(1); + set.add(2); + set.add(3); - set.should.have.length.of.at.least(3); - set.should.have.lengthOf.at.least(3); + set.should.have.length.of.at.least(3); + set.should.have.lengthOf.at.least(3); - err(function () { - set.should.have.length.of.at.least(4, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); + err(function () { + set.should.have.length.of.at.least(4, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); - err(function () { - set.should.have.lengthOf.at.least(4, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); - } + err(function () { + set.should.have.lengthOf.at.least(4, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); }); it('below(n)', function(){ @@ -943,47 +919,43 @@ describe('should', function() { (1).should.have.lengthOf.below(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - (new Map).should.have.length.below(1); - (new Map).should.have.lengthOf.below(1); + (new Map).should.have.length.below(1); + (new Map).should.have.lengthOf.below(1); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map; + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - map.should.have.length.below(4); - map.should.have.lengthOf.below(4); + map.should.have.length.below(4); + map.should.have.lengthOf.below(4); - err(function () { - map.should.have.length.below(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); + err(function () { + map.should.have.length.below(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); - err(function () { - map.should.have.lengthOf.below(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); - } + err(function () { + map.should.have.lengthOf.below(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); - if (typeof Set === 'function') { - (new Set).should.have.length.below(1); - (new Set).should.have.lengthOf.below(1); + (new Set).should.have.length.below(1); + (new Set).should.have.lengthOf.below(1); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set; + set.add(1); + set.add(2); + set.add(3); - set.should.have.length.below(4); - set.should.have.lengthOf.below(4); + set.should.have.length.below(4); + set.should.have.lengthOf.below(4); - err(function () { - set.should.have.length.below(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); + err(function () { + set.should.have.length.below(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); - err(function () { - set.should.have.lengthOf.below(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); - } + err(function () { + set.should.have.lengthOf.below(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); }); it('below(n) (dates)', function(){ @@ -1073,47 +1045,43 @@ describe('should', function() { (1).should.have.lengthOf.at.most(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - (new Map).should.have.length.of.at.most(0); - (new Map).should.have.lengthOf.at.most(0); + (new Map).should.have.length.of.at.most(0); + (new Map).should.have.lengthOf.at.most(0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map; + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - map.should.have.length.of.at.most(3); - map.should.have.lengthOf.at.most(3); + map.should.have.length.of.at.most(3); + map.should.have.lengthOf.at.most(3); - err(function () { - map.should.have.length.of.at.most(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); + err(function () { + map.should.have.length.of.at.most(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); - err(function () { - map.should.have.lengthOf.at.most(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); - } + err(function () { + map.should.have.lengthOf.at.most(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); - if (typeof Set === 'function') { - (new Set).should.have.length.of.at.most(0); - (new Set).should.have.lengthOf.at.most(0); + (new Set).should.have.length.of.at.most(0); + (new Set).should.have.lengthOf.at.most(0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set; + set.add(1); + set.add(2); + set.add(3); - set.should.have.length.of.at.most(3); - set.should.have.lengthOf.at.most(3); + set.should.have.length.of.at.most(3); + set.should.have.lengthOf.at.most(3); - err(function () { - set.should.have.length.of.at.most(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); + err(function () { + set.should.have.length.of.at.most(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); - err(function () { - set.should.have.lengthOf.at.most(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); - } + err(function () { + set.should.have.lengthOf.at.most(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); }); it('most(n) (dates)', function(){ @@ -1206,47 +1174,43 @@ describe('should', function() { 'asd'.should.not.have.lengthOf(3, 'blah'); }, "blah: expected 'asd' to not have a length of 3"); - if (typeof Map === 'function') { - (new Map).should.have.length(0); - (new Map).should.have.lengthOf(0); + (new Map).should.have.length(0); + (new Map).should.have.lengthOf(0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map; + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - map.should.have.length(3); - map.should.have.lengthOf(3); + map.should.have.length(3); + map.should.have.lengthOf(3); - err(function(){ - map.should.not.have.length(3, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); + err(function(){ + map.should.not.have.length(3, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); - err(function(){ - map.should.not.have.lengthOf(3, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); - } + err(function(){ + map.should.not.have.lengthOf(3, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); - if (typeof Set === 'function') { - (new Set).should.have.length(0); - (new Set).should.have.lengthOf(0); + (new Set).should.have.length(0); + (new Set).should.have.lengthOf(0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set; + set.add(1); + set.add(2); + set.add(3); - set.should.have.length(3); - set.should.have.lengthOf(3); + set.should.have.length(3); + set.should.have.lengthOf(3); - err(function(){ - set.should.not.have.length(3, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); + err(function(){ + set.should.not.have.length(3, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); - err(function(){ - set.should.not.have.lengthOf(3, 'blah');; - }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); - } + err(function(){ + set.should.not.have.lengthOf(3, 'blah');; + }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); }); it('eql(val)', function(){ @@ -1270,10 +1234,8 @@ describe('should', function() { (1).should.eql(1); '4'.should.not.eql(4); - if (typeof Symbol === 'function') { - var sym = Symbol(); - sym.should.eql(sym); - } + var sym = Symbol(); + sym.should.eql(sym); err(function(){ (4).should.eql(3, 'blah'); @@ -1284,10 +1246,8 @@ describe('should', function() { 'test'.should.equal('test'); (1).should.equal(1); - if (typeof Symbol === 'function') { - var sym = Symbol(); - sym.should.equal(sym); - } + var sym = Symbol(); + sym.should.equal(sym); err(function(){ (4).should.equal(3, 'blah'); @@ -1324,59 +1284,51 @@ describe('should', function() { ({}).should.be.empty; ({foo: 'bar'}).should.not.be.empty; - if (typeof WeakMap === 'function') { - err(function(){ - (new WeakMap).should.not.be.empty; - }, ".empty was passed a weak collection"); - } + err(function(){ + (new WeakMap).should.not.be.empty; + }, ".empty was passed a weak collection"); - if (typeof WeakSet === 'function') { - err(function(){ - (new WeakSet).should.not.be.empty; - }, ".empty was passed a weak collection"); - } + err(function(){ + (new WeakSet).should.not.be.empty; + }, ".empty was passed a weak collection"); - if (typeof Map === 'function') { - (new Map).should.be.empty; + (new Map).should.be.empty; - // Not using Map constructor args because not supported in IE 11. - var map = new Map; - map.set('a', 1); - map.should.not.be.empty; + // Not using Map constructor args because not supported in IE 11. + var map = new Map; + map.set('a', 1); + map.should.not.be.empty; - err(function(){ - (new Map).should.not.be.empty; - }, "expected Map{} not to be empty"); + err(function(){ + (new Map).should.not.be.empty; + }, "expected Map{} not to be empty"); - map = new Map; - map.key = 'val'; - map.should.be.empty; + map = new Map; + map.key = 'val'; + map.should.be.empty; - err(function(){ - map.should.not.be.empty; - }, "expected Map{} not to be empty"); - } + err(function(){ + map.should.not.be.empty; + }, "expected Map{} not to be empty"); - if (typeof Set === 'function') { - (new Set).should.be.empty; + (new Set).should.be.empty; - // Not using Set constructor args because not supported in IE 11. - var set = new Set; - set.add(1); - set.should.not.be.empty; + // Not using Set constructor args because not supported in IE 11. + var set = new Set; + set.add(1); + set.should.not.be.empty; - err(function(){ - (new Set).should.not.be.empty; - }, "expected Set{} not to be empty"); + err(function(){ + (new Set).should.not.be.empty; + }, "expected Set{} not to be empty"); - set = new Set; - set.key = 'val'; - set.should.be.empty; + set = new Set; + set.key = 'val'; + set.should.be.empty; - err(function(){ - set.should.not.be.empty; - }, "expected Set{} not to be empty"); - } + err(function(){ + set.should.not.be.empty; + }, "expected Set{} not to be empty"); err(function(){ ''.should.not.be.empty; @@ -1867,59 +1819,51 @@ describe('should', function() { ({foo: obj1, bar: obj2}).should.not.include({foo: {a: 1}}); ({foo: obj1, bar: obj2}).should.not.include({foo: obj1, bar: {b: 2}}); - if (typeof Map === 'function') { - var map = new Map(); - var val = [{a: 1}]; - map.set('a', val); - map.set('b', 2); - map.set('c', -0); - map.set('d', NaN); - - map.should.include(val); - map.should.not.include([{a: 1}]); - map.should.include(2); - map.should.not.include(3); - map.should.include(0); - map.should.include(NaN); + var map = new Map(); + var val = [{a: 1}]; + map.set('a', val); + map.set('b', 2); + map.set('c', -0); + map.set('d', NaN); + + map.should.include(val); + map.should.not.include([{a: 1}]); + map.should.include(2); + map.should.not.include(3); + map.should.include(0); + map.should.include(NaN); + + var set = new Set(); + var val = [{a: 1}]; + set.add(val); + set.add(2); + set.add(-0); + set.add(NaN); + + set.should.include(val); + set.should.not.include([{a: 1}]); + set.should.include(2); + set.should.not.include(3); + if (set.has(0)) { + // This test is skipped in IE11 because (contrary to spec) IE11 uses + // SameValue instead of SameValueZero equality for sets. + set.should.include(0); } + set.should.include(NaN); - if (typeof Set === 'function') { - var set = new Set(); - var val = [{a: 1}]; - set.add(val); - set.add(2); - set.add(-0); - set.add(NaN); - - set.should.include(val); - set.should.not.include([{a: 1}]); - set.should.include(2); - set.should.not.include(3); - if (set.has(0)) { - // This test is skipped in IE11 because (contrary to spec) IE11 uses - // SameValue instead of SameValueZero equality for sets. - set.should.include(0); - } - set.should.include(NaN); - } + var ws = new WeakSet(); + var val = [{a: 1}]; + ws.add(val); - if (typeof WeakSet === 'function') { - var ws = new WeakSet(); - var val = [{a: 1}]; - ws.add(val); + ws.should.include(val); + ws.should.not.include([{a: 1}]); + ws.should.not.include({}); - ws.should.include(val); - ws.should.not.include([{a: 1}]); - ws.should.not.include({}); - } - - if (typeof Symbol === 'function') { - var sym1 = Symbol() - , sym2 = Symbol() - , sym3 = Symbol(); - [sym1, sym2].should.include(sym1); - [sym1, sym2].should.not.include(sym3); - } + var sym1 = Symbol() + , sym2 = Symbol() + , sym3 = Symbol(); + [sym1, sym2].should.include(sym1); + [sym1, sym2].should.not.include(sym3); err(function(){ ['foo'].should.include('bar', 'blah'); @@ -1995,25 +1939,19 @@ describe('should', function() { ({foo: obj1, bar: obj2}).should.not.deep.include({baz: {a: 1}}); ({foo: obj1, bar: obj2}).should.not.deep.include({foo: {a: 1}, bar: {b: 9}}); - if (typeof Map === 'function') { - var map = new Map(); + var map = new Map(); - map.set(1, [{a: 1}]); - map.should.deep.include([{a: 1}]); - } + map.set(1, [{a: 1}]); + map.should.deep.include([{a: 1}]); - if (typeof Set === 'function') { - var set = new Set(); + var set = new Set(); - set.add([{a: 1}]); - set.should.deep.include([{a: 1}]); - } + set.add([{a: 1}]); + set.should.deep.include([{a: 1}]); - if (typeof WeakSet === 'function') { - err(function() { - new WeakSet().should.deep.include({}, 'foo'); - }, 'foo: unable to use .deep.include with WeakSet'); - } + err(function() { + new WeakSet().should.deep.include({}, 'foo'); + }, 'foo: unable to use .deep.include with WeakSet'); err(function () { [obj1, obj2].should.deep.include({a: 9}, 'blah'); @@ -2184,7 +2122,6 @@ describe('should', function() { obj.should.have.all.keys([enumProp1, enumProp2]); obj.should.not.have.all.keys([enumProp1, enumProp2, nonEnumProp]); - if (typeof Symbol === 'function') { var sym1 = Symbol('sym1') , sym2 = Symbol('sym2') , sym3 = Symbol('sym3') @@ -2202,9 +2139,7 @@ describe('should', function() { obj.should.have.all.keys([sym1, sym2, str]); obj.should.not.have.all.keys([sym1, sym2, sym3, str]); - } - if (typeof Map !== 'undefined') { // Not using Map constructor args because not supported in IE 11. var aKey = {thisIs: 'anExampleObject'} , anotherKey = {doingThisBecauseOf: 'referential equality'} @@ -2279,7 +2214,6 @@ describe('should', function() { weirdMap.should.have.all.keys([weirdMapKey1, weirdMapKey2]); weirdMap.should.not.have.all.keys([weirdMapKey1, weirdMapKey3]); - if (typeof Symbol === 'function') { var symMapKey1 = Symbol() , symMapKey2 = Symbol() , symMapKey3 = Symbol() @@ -2297,7 +2231,6 @@ describe('should', function() { symMap.should.not.have.any.keys(symMapKey3); symMap.should.not.contain.all.keys(symMapKey3, symMapKey1); symMap.should.not.contain.any.keys(symMapKey3); - } var errMap = new Map(); @@ -2328,9 +2261,7 @@ describe('should', function() { // err(function(){ // new Map([[{foo: 1}, 'bar']]).should.contain.deep.keys({ iDoNotExist: 0 }); // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - } - if (typeof Set !== 'undefined') { // Not using Set constructor args because not supported in IE 11. var aKey = {thisIs: 'anExampleObject'} , anotherKey = {doingThisBecauseOf: 'referential equality'} @@ -2410,56 +2341,51 @@ describe('should', function() { weirdSet.should.have.all.keys([weirdSetKey1, weirdSetKey2]); weirdSet.should.not.have.all.keys([weirdSetKey1, weirdSetKey3]); - if (typeof Symbol === 'function') { - var symSetKey1 = Symbol() - , symSetKey2 = Symbol() - , symSetKey3 = Symbol() - , symSet = new Set(); + var symSetKey1 = Symbol() + , symSetKey2 = Symbol() + , symSetKey3 = Symbol() + , symSet = new Set(); - symSet.add(symSetKey1); - symSet.add(symSetKey2); + symSet.add(symSetKey1); + symSet.add(symSetKey2); - symSet.should.have.all.keys(symSetKey1, symSetKey2); - symSet.should.have.any.keys(symSetKey1, symSetKey3); - symSet.should.contain.all.keys(symSetKey2, symSetKey1); - symSet.should.contain.any.keys(symSetKey3, symSetKey1); + symSet.should.have.all.keys(symSetKey1, symSetKey2); + symSet.should.have.any.keys(symSetKey1, symSetKey3); + symSet.should.contain.all.keys(symSetKey2, symSetKey1); + symSet.should.contain.any.keys(symSetKey3, symSetKey1); - symSet.should.not.have.all.keys(symSetKey1, symSetKey3); - symSet.should.not.have.any.keys(symSetKey3); - symSet.should.not.contain.all.keys(symSetKey3, symSetKey1); - symSet.should.not.contain.any.keys(symSetKey3); - } + symSet.should.not.have.all.keys(symSetKey1, symSetKey3); + symSet.should.not.have.any.keys(symSetKey3); + symSet.should.not.contain.all.keys(symSetKey3, symSetKey1); + symSet.should.not.contain.any.keys(symSetKey3); - var errSet = new Set(); + var errSet = new Set(); - errSet.add({ foo: 1 }); + errSet.add({ foo: 1 }); - err(function(){ - errSet.should.have.keys(); - }, "keys required"); + err(function(){ + errSet.should.have.keys(); + }, "keys required"); - err(function(){ - errSet.should.have.keys([]); - }, "keys required"); + err(function(){ + errSet.should.have.keys([]); + }, "keys required"); - err(function(){ - errSet.should.contain.keys(); - }, "keys required"); + err(function(){ + errSet.should.contain.keys(); + }, "keys required"); - err(function(){ - errSet.should.contain.keys([]); - }, "keys required"); + err(function(){ + errSet.should.contain.keys([]); + }, "keys required"); - // Uncomment these after solving https://github.com/chaijs/chai/issues/662 - // This should fail because of referential equality (this is a strict comparison) - // err(function(){ - // new Set([{foo: 1}]).should.contain.keys({ foo: 1 }); - // }, 'expected [ { foo: 1 } ] to contain key { foo: 1 }'); + err(function(){ + new Set([{foo: 1}]).should.contain.keys({ foo: 1 }); + }, 'expected Set{ { foo: 1 } } to contain key { foo: 1 }'); - // err(function(){ - // new Set([{foo: 1}]).should.contain.deep.keys({ iDoNotExist: 0 }); - // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - } + err(function(){ + new Set([{foo: 1}]).should.contain.deep.keys({ iDoNotExist: 0 }); + }, 'expected Set{ { foo: 1 } } to deeply contain key { iDoNotExist: +0 }'); err(function(){ ({ foo: 1 }).should.have.keys(); @@ -3174,9 +3100,7 @@ describe('should', function() { 'foo'.should.not.be.extensible; false.should.not.be.extensible; - if (typeof Symbol === 'function') { - Symbol().should.not.be.extensible; - } + Symbol().should.not.be.extensible; err(function() { (42).should.be.extensible; @@ -3190,18 +3114,16 @@ describe('should', function() { false.should.be.extensible; }, 'expected false to be extensible'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - isExtensible: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + isExtensible: function() { + throw new TypeError(); + } + }); - err(function() { - // .extensible should not suppress errors, thrown in proxy traps - proxy.should.be.extensible; - }, { name: 'TypeError' }); - } + err(function() { + // .extensible should not suppress errors, thrown in proxy traps + proxy.should.be.extensible; + }, { name: 'TypeError' }); }); it('sealed', function() { @@ -3224,9 +3146,7 @@ describe('should', function() { 'foo'.should.be.sealed; false.should.be.sealed; - if (typeof Symbol === 'function') { - Symbol().should.be.sealed; - } + Symbol().should.be.sealed; err(function() { (42).should.not.be.sealed; @@ -3240,21 +3160,19 @@ describe('should', function() { false.should.not.be.sealed; }, 'expected false to not be sealed'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isSealed will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isSealed will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // .sealed should not suppress errors, thrown in proxy traps - proxy.should.be.sealed; - }, { name: 'TypeError' }); - } + err(function() { + // .sealed should not suppress errors, thrown in proxy traps + proxy.should.be.sealed; + }, { name: 'TypeError' }); }); it('frozen', function() { @@ -3277,9 +3195,7 @@ describe('should', function() { 'foo'.should.be.frozen; false.should.be.frozen; - if (typeof Symbol === 'function') { - Symbol().should.be.frozen; - } + Symbol().should.be.frozen; err(function() { (42).should.not.be.frozen; @@ -3293,20 +3209,18 @@ describe('should', function() { false.should.not.be.frozen; }, 'expected false to not be frozen'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isFrozen will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isFrozen will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // .frozen should not suppress errors, thrown in proxy traps - proxy.should.be.frozen; - }, { name: 'TypeError' }); - } + err(function() { + // .frozen should not suppress errors, thrown in proxy traps + proxy.should.be.frozen; + }, { name: 'TypeError' }); }); }); From 74b12ca48ea3e3762c982310c916bb955791ddd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Wed, 24 Jan 2024 21:19:45 +0100 Subject: [PATCH 08/30] Remove a bunch of unused files (#1582) --- bower.json | 26 ------- karma.conf.cjs | 35 --------- karma.sauce.js | 41 ----------- sauce.browsers.js | 106 --------------------------- support/sauce/sauce_connect_block.sh | 7 -- support/sauce/sauce_connect_setup.sh | 53 -------------- 6 files changed, 268 deletions(-) delete mode 100644 bower.json delete mode 100644 karma.conf.cjs delete mode 100644 karma.sauce.js delete mode 100644 sauce.browsers.js delete mode 100755 support/sauce/sauce_connect_block.sh delete mode 100755 support/sauce/sauce_connect_setup.sh diff --git a/bower.json b/bower.json deleted file mode 100644 index af2ee029..00000000 --- a/bower.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "chai", - "description": "BDD/TDD assertion library for node.js and the browser. Test framework agnostic.", - "license": "MIT", - "keywords": [ - "test", - "assertion", - "assert", - "testing", - "chai" - ], - "main": "chai.js", - "ignore": [ - "build", - "components", - "lib", - "node_modules", - "support", - "test", - "index.js", - "Makefile", - ".*" - ], - "dependencies": {}, - "devDependencies": {} -} diff --git a/karma.conf.cjs b/karma.conf.cjs deleted file mode 100644 index a7a525bc..00000000 --- a/karma.conf.cjs +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = function(config) { - config.set({ - frameworks: [ 'mocha' ] - , files: [ - { pattern: 'chai.js', type: 'module', included: false, served: true } - , { pattern: 'test/bootstrap/index.js', type: 'module'} - , { pattern: 'test/*.js', type: 'module' } - , { pattern: 'test/type-detect/*.js', type: 'module' } - ] - , reporters: [ 'progress' ] - , colors: true - , logLevel: config.LOG_INFO - , autoWatch: false - , browsers: [ 'HeadlessChrome' ] - , customLaunchers: { - HeadlessChrome: { - base: 'ChromeHeadless' - , flags: [ '--no-sandbox',] - , } - , } - , browserDisconnectTimeout: 10000 - , browserDisconnectTolerance: 2 - , browserNoActivityTimeout: 20000 - , singleRun: true - }); - - switch (process.env.CHAI_TEST_ENV) { - case 'sauce': - require('./karma.sauce')(config); - break; - default: - // ... - break; - }; -}; diff --git a/karma.sauce.js b/karma.sauce.js deleted file mode 100644 index b4f22fe0..00000000 --- a/karma.sauce.js +++ /dev/null @@ -1,41 +0,0 @@ -var version = require('./package.json').version; -var ts = new Date().getTime(); - -module.exports = function(config) { - var auth; - - try { - auth = require('./test/auth/index'); - } catch(ex) { - auth = {}; - auth.SAUCE_USERNAME = process.env.SAUCE_USERNAME || null; - auth.SAUCE_ACCESS_KEY = process.env.SAUCE_ACCESS_KEY || null; - } - - if (!auth.SAUCE_USERNAME || !auth.SAUCE_ACCESS_KEY) return; - if (process.env.SKIP_SAUCE) return; - - var branch = process.env.TRAVIS_BRANCH || 'local' - var browserConfig = require('./sauce.browsers'); - var browsers = Object.keys(browserConfig); - var tags = [ 'chaijs_' + version, auth.SAUCE_USERNAME + '@' + branch ]; - var tunnel = process.env.TRAVIS_JOB_NUMBER || ts; - - if (process.env.TRAVIS_JOB_NUMBER) { - tags.push('travis@' + process.env.TRAVIS_JOB_NUMBER); - } - - config.browsers = config.browsers.concat(browsers); - Object.assign(config.customLaunchers, browserConfig); - config.reporters.push('saucelabs'); - config.captureTimeout = 300000; - - config.sauceLabs = { - username: auth.SAUCE_USERNAME - , accessKey: auth.SAUCE_ACCESS_KEY - , startConnect: ('TRAVIS' in process.env) === false - , tags: tags - , testName: 'ChaiJS' - , tunnelIdentifier: tunnel - }; -}; diff --git a/sauce.browsers.js b/sauce.browsers.js deleted file mode 100644 index 328f0c70..00000000 --- a/sauce.browsers.js +++ /dev/null @@ -1,106 +0,0 @@ - -/*! - * Chrome - */ - -exports['SL_Chrome'] = { - base: 'SauceLabs' - , browserName: 'chrome' -}; - -/*! - * Firefox - */ - - exports['SL_Firefox'] = { - base: 'SauceLabs' - , browserName: 'firefox' - }; - - exports['SL_Firefox_ESR'] = { - base: 'SauceLabs' - , browserName: 'firefox' - , version: 38 - }; - -/*! - * Internet Explorer - */ - -exports['SL_IE'] = { - base: 'SauceLabs' - , browserName: 'internet explorer' -}; - -/*! - * TODO: fails because of Uint8Array support - * -exports['SL_IE_Old'] = { - base: 'SauceLabs' - , browserName: 'internet explorer' - , version: 10 -}; -*/ - -exports['SL_Edge'] = { - base: 'SauceLabs' - , browserName: 'microsoftedge' -}; - -/*! - * Safari - */ - -exports['SL_Safari'] = { - base: 'SauceLabs' - , browserName: 'safari' - , platform: 'Mac 10.11' -}; - -/*! - * iPhone - */ - -/*! - * TODO: These take forever to boot or shut down. Causes timeout. - * - -exports['SL_iPhone_6'] = { - base: 'SauceLabs' - , browserName: 'iphone' - , platform: 'Mac 10.8' - , version: '6' -}; - -exports['SL_iPhone_5-1'] = { - base: 'SauceLabs' - , browserName: 'iphone' - , platform: 'Mac 10.8' - , version: '5.1' -}; - -exports['SL_iPhone_5'] = { - base: 'SauceLabs' - , browserName: 'iphone' - , platform: 'Mac 10.6' - , version: '5' -}; - -*/ - -/*! - * Android - */ - -/*! - * TODO: fails because of error serialization - * - -exports['SL_Android_4'] = { - base: 'SauceLabs' - , browserName: 'android' - , platform: 'Linux' - , version: '4' -}; - -*/ diff --git a/support/sauce/sauce_connect_block.sh b/support/sauce/sauce_connect_block.sh deleted file mode 100755 index 126d3710..00000000 --- a/support/sauce/sauce_connect_block.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - - -# Wait for Connect to be ready before exiting -while [ ! -f $SAUCE_CONNECT_READY_FILE ]; do - sleep .5 -done diff --git a/support/sauce/sauce_connect_setup.sh b/support/sauce/sauce_connect_setup.sh deleted file mode 100755 index 2c385e18..00000000 --- a/support/sauce/sauce_connect_setup.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -set -e - -# Setup and start Sauce Connect for your TravisCI build -# This script requires your .travis.yml to include the following two private env variables: -# SAUCE_USERNAME -# SAUCE_ACCESS_KEY -# Follow the steps at https://saucelabs.com/opensource/travis to set that up. -# -# Curl and run this script as part of your .travis.yml before_script section: -# before_script: -# - curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash - -CONNECT_URL="http://saucelabs.com/downloads/Sauce-Connect-latest.zip" -CONNECT_DIR="/tmp/sauce-connect-$RANDOM" -CONNECT_DOWNLOAD="Sauce_Connect.zip" - -mkdir -p $LOGS_DIR -CONNECT_LOG="$LOGS_DIR/sauce-connect" -CONNECT_STDOUT="$LOGS_DIR/sauce-connect.stdout" -CONNECT_STDERR="$LOGS_DIR/sauce-connect.stderr" - -# Get Connect and start it -mkdir -p $CONNECT_DIR -cd $CONNECT_DIR -curl $CONNECT_URL -o $CONNECT_DOWNLOAD 2> /dev/null 1> /dev/null -unzip $CONNECT_DOWNLOAD > /dev/null -rm $CONNECT_DOWNLOAD - -SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev` - - -ARGS="" - -# Set tunnel-id only on Travis, to make local testing easier. -if [ ! -z "$TRAVIS_JOB_NUMBER" ]; then - ARGS="$ARGS --tunnel-identifier $TRAVIS_JOB_NUMBER" -fi -if [ ! -z "$SAUCE_CONNECT_READY_FILE" ]; then - ARGS="$ARGS --readyfile $SAUCE_CONNECT_READY_FILE" -fi - -echo "Starting Sauce Connect in the background:" -echo " Arg: $ARGS" -echo "Logging into:" -echo " Log: $CONNECT_LOG" -echo " Out: $CONNECT_STDOUT" -echo " Err: $CONNECT_STDERR" -java -jar Sauce-Connect.jar $ARGS $SAUCE_USERNAME $SAUCE_ACCESS_KEY \ - --logfile $CONNECT_LOG 2> $CONNECT_STDERR 1> $CONNECT_STDOUT & -CONNECT_PID=$! -echo " Pid: $CONNECT_PID" From 57fef84a83a4cdcd2a36436284effac3efb8c822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 25 Jan 2024 10:38:08 +0100 Subject: [PATCH 09/30] Fix 1564 (#1566) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add function assertions * implement function checks in expect interface * fix flag message * correctly reference inspect * use existing assersions in asserts * Fix typo Co-authored-by: San Mônico * Add `AsyncGeneratorFunction` assertion * update assertion messages * alias `isFunction` to `isCallable` * Square up boolean logic in `isCallable` function * Update callable JSDoc comment * Add error tests for function expect assertions * Add negation to other callable assertions * Convert expect calls in test to type string assertions * Remove assertion properties in favor of a normal type assertion * Remove `.is{FunctionType}` assert interfaces * Move `functionTypes` object * Add a bunch of tests * Move test * Add more tests to should interface * Revert formatting change * Add should test for `callable` --------- Co-authored-by: San Mônico --- lib/chai/core/assertions.js | 65 +++++++++++++++++++++++++--- lib/chai/interface/assert.js | 33 +++++++------- test/assert.js | 56 +++++++++++++++++++++++- test/expect.js | 84 ++++++++++++++++++++++++++++++++++++ test/should.js | 12 ++++++ 5 files changed, 226 insertions(+), 24 deletions(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 4da99927..0a55c58e 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -239,6 +239,13 @@ Assertion.addProperty('all', function () { flag(this, 'any', false); }); +const functionTypes = { + 'function': ['function', 'asyncfunction', 'generatorfunction', 'asyncgeneratorfunction'], + 'asyncfunction': ['asyncfunction', 'asyncgeneratorfunction'], + 'generatorfunction': ['generatorfunction', 'asyncgeneratorfunction'], + 'asyncgeneratorfunction': ['asyncgeneratorfunction'] +} + /** * ### .a(type[, msg]) * @@ -298,18 +305,27 @@ Assertion.addProperty('all', function () { * @namespace BDD * @api public */ - function an (type, msg) { if (msg) flag(this, 'message', msg); type = type.toLowerCase(); var obj = flag(this, 'object') , article = ~[ 'a', 'e', 'i', 'o', 'u' ].indexOf(type.charAt(0)) ? 'an ' : 'a '; - this.assert( - type === _.type(obj).toLowerCase() - , 'expected #{this} to be ' + article + type - , 'expected #{this} not to be ' + article + type - ); + const detectedType = _.type(obj).toLowerCase(); + + if (functionTypes['function'].includes(type)) { + this.assert( + functionTypes[type].includes(detectedType) + , 'expected #{this} to be ' + article + type + , 'expected #{this} not to be ' + article + type + ); + } else { + this.assert( + type === detectedType + , 'expected #{this} to be ' + article + type + , 'expected #{this} not to be ' + article + type + ); + } } Assertion.addChainableMethod('an', an); @@ -672,6 +688,43 @@ Assertion.addProperty('true', function () { ); }); +/** + * ### .callable + * + * Asserts that the target a callable function. + * + * expect(console.log).to.be.callable; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect('not a function', 'nooo why fail??').to.be.callable; + * + * @name callable + * @namespace BDD + * @api public + */ +Assertion.addProperty('callable', function () { + const val = flag(this, 'object') + const ssfi = flag(this, 'ssfi') + const message = flag(this, 'message') + const msg = message ? `${message}: ` : '' + const negate = flag(this, 'negate'); + + const assertionMessage = negate ? + `${msg}expected ${_.inspect(val)} not to be a callable function` : + `${msg}expected ${_.inspect(val)} to be a callable function`; + + const isCallable = ['Function', 'AsyncFunction', 'GeneratorFunction', 'AsyncGeneratorFunction'].includes(_.type(val)); + + if ((isCallable && negate) || (!isCallable && !negate)) { + throw new AssertionError( + assertionMessage, + undefined, + ssfi + ); + } +}); + /** * ### .false * diff --git a/lib/chai/interface/assert.js b/lib/chai/interface/assert.js index 77af8ead..24ceff36 100644 --- a/lib/chai/interface/assert.js +++ b/lib/chai/interface/assert.js @@ -8,6 +8,7 @@ import * as chai from '../../../index.js'; import {Assertion} from '../assertion.js'; import {flag, inspect} from '../utils/index.js'; import {AssertionError} from 'assertion-error'; +import {type} from '../utils/type-detect.js'; /** * ### assert(expression, message) @@ -553,41 +554,39 @@ assert.isDefined = function (val, msg) { }; /** - * ### .isFunction(value, [message]) + * ### .isCallable(value, [message]) * - * Asserts that `value` is a function. + * Asserts that `value` is a callable function. * * function serveTea() { return 'cup of tea'; }; - * assert.isFunction(serveTea, 'great, we can have tea now'); + * assert.isCallable(serveTea, 'great, we can have tea now'); * - * @name isFunction + * @name isCallable * @param {Mixed} value * @param {String} message * @namespace Assert * @api public */ - -assert.isFunction = function (val, msg) { - new Assertion(val, msg, assert.isFunction, true).to.be.a('function'); -}; +assert.isCallable = function (val, msg) { + new Assertion(val, msg, assert.isCallable, true).is.callable; +} /** - * ### .isNotFunction(value, [message]) + * ### .isNotCallable(value, [message]) * - * Asserts that `value` is _not_ a function. + * Asserts that `value` is _not_ a callable function. * * var serveTea = [ 'heat', 'pour', 'sip' ]; - * assert.isNotFunction(serveTea, 'great, we have listed the steps'); + * assert.isNotCallable(serveTea, 'great, we have listed the steps'); * - * @name isNotFunction + * @name isNotCallable * @param {Mixed} value * @param {String} message * @namespace Assert * @api public */ - -assert.isNotFunction = function (val, msg) { - new Assertion(val, msg, assert.isNotFunction, true).to.not.be.a('function'); +assert.isNotCallable = function (val, msg) { + new Assertion(val, msg, assert.isNotCallable, true).is.not.callable; }; /** @@ -3104,4 +3103,6 @@ assert.isNotEmpty = function(val, msg) { ('isFrozen', 'frozen') ('isNotFrozen', 'notFrozen') ('isEmpty', 'empty') -('isNotEmpty', 'notEmpty'); +('isNotEmpty', 'notEmpty') +('isCallable', 'isFunction') +('isNotCallable', 'isNotFunction') diff --git a/test/assert.js b/test/assert.js index 8462fd5e..22373a35 100644 --- a/test/assert.js +++ b/test/assert.js @@ -139,6 +139,20 @@ describe('assert', function () { assert.typeOf('test', 'string'); assert.typeOf(true, 'boolean'); assert.typeOf(5, 'number'); + + assert.typeOf(() => {}, 'function'); + assert.typeOf(function() {}, 'function'); + assert.typeOf(async function() {}, 'asyncfunction'); + assert.typeOf(function*() {}, 'generatorfunction'); + assert.typeOf(async function*() {}, 'asyncgeneratorfunction'); + + err(function () { + assert.typeOf(5, 'function', 'blah'); + }, "blah: expected 5 to be a function"); + + err(function () { + assert.typeOf(function() {}, 'asyncfunction', 'blah'); + }, "blah: expected [Function] to be an asyncfunction"); if (typeof Symbol === 'function') { assert.typeOf(Symbol(), 'symbol'); @@ -151,10 +165,20 @@ describe('assert', function () { it('notTypeOf', function () { assert.notTypeOf('test', 'number'); + + assert.notTypeOf(() => {}, 'string'); + assert.notTypeOf(function() {}, 'string'); + assert.notTypeOf(async function() {}, 'string'); + assert.notTypeOf(function*() {}, 'string'); + assert.notTypeOf(async function*() {}, 'string'); err(function () { assert.notTypeOf(5, 'number', 'blah'); }, "blah: expected 5 not to be a number"); + + err(function () { + assert.notTypeOf(() => {}, 'function', 'blah'); + }, "blah: expected [Function] not to be a function"); }); it('instanceOf', function() { @@ -521,13 +545,41 @@ describe('assert', function () { }, "blah: expected undefined to not equal undefined"); }); + it('isCallable', function() { + var func = function() {}; + assert.isCallable(func); + + var func = async function() {}; + assert.isCallable(func); + + var func = function* () {} + assert.isCallable(func); + + var func = async function* () {} + assert.isCallable(func); + + err(function () { + assert.isCallable({}, 'blah'); + }, "blah: expected {} to be a callable function"); + }); + + it('isNotCallable', function() { + assert.isNotCallable(false); + assert.isNotCallable(10); + assert.isNotCallable('string'); + + err(function () { + assert.isNotCallable(function() {}, 'blah'); + }, "blah: expected [Function] not to be a callable function"); + }); + it('isFunction', function() { var func = function() {}; assert.isFunction(func); err(function () { assert.isFunction({}, 'blah'); - }, "blah: expected {} to be a function"); + }, "blah: expected {} to be a callable function"); }); it('isNotFunction', function () { @@ -535,7 +587,7 @@ describe('assert', function () { err(function () { assert.isNotFunction(function () {}, 'blah'); - }, "blah: expected [Function] not to be a function"); + }, "blah: expected [Function] not to be a callable function"); }); it('isArray', function() { diff --git a/test/expect.js b/test/expect.js index 2dd08ef2..d5247655 100644 --- a/test/expect.js +++ b/test/expect.js @@ -385,6 +385,90 @@ describe('expect', function () { }, "blah: expected 5 not to be a number"); }); + it('callable', function() { + expect(function() {}).to.be.callable; + expect(async function() {}).to.be.callable; + expect(function*() {}).to.be.callable; + expect(async function*() {}).to.be.callable; + + expect('foobar').to.not.be.callable; + + err(function(){ + expect('foobar', 'blah').to.be.callable; + }, "blah: expected 'foobar' to be a callable function"); + + err(function(){ + expect(function() {}, 'blah').to.not.be.callable; + }, "blah: expected [Function] not to be a callable function"); + }); + + it('function', function() { + expect(function() {}).to.be.a('function'); + expect(async function() {}).to.be.a('function'); + expect(function*() {}).to.be.a('function'); + expect(async function*() {}).to.be.a('function'); + + expect('foobar').to.not.be.a('function'); + + err(function(){ + expect('foobar').to.be.a('function', 'blah'); + }, "blah: expected 'foobar' to be a function"); + + err(function(){ + expect(function() {}).to.not.be.a('function', 'blah'); + }, "blah: expected [Function] not to be a function"); + + err(function(){ + expect(function() {}, 'blah').to.not.be.a('function'); + }, "blah: expected [Function] not to be a function"); + }) + + it('asyncFunction', function() { + expect(async function() {}).to.be.a('AsyncFunction'); + expect(async function*() {}).to.be.a('AsyncFunction'); + + err(function(){ + expect('foobar').to.be.a('asyncfunction', 'blah'); + }, "blah: expected 'foobar' to be an asyncfunction"); + + err(function(){ + expect(async function() {}).to.not.be.a('asyncfunction', 'blah'); + }, "blah: expected [AsyncFunction] not to be an asyncfunction"); + + err(function(){ + expect(async function() {}, 'blah').to.not.be.a('asyncfunction'); + }, "blah: expected [AsyncFunction] not to be an asyncfunction"); + }) + + it('generatorFunction', function() { + expect(function*() {}).to.be.a('generatorFunction'); + expect(async function*() {}).to.be.a('generatorFunction'); + + err(function(){ + expect('foobar').to.be.a('generatorfunction', 'blah'); + }, "blah: expected 'foobar' to be a generatorfunction"); + + err(function(){ + expect(function*() {}).to.not.be.a('generatorfunction', 'blah'); + }, "blah: expected [GeneratorFunction] not to be a generatorfunction"); + + err(function(){ + expect(function*() {}, 'blah').to.not.be.a('generatorfunction'); + }, "blah: expected [GeneratorFunction] not to be a generatorfunction"); + }) + + it('asyncGeneratorFunction', function() { + expect(async function*() {}).to.be.a('asyncGeneratorFunction'); + + err(function(){ + expect(async function() {}, 'blah').to.be.a('asyncgeneratorfunction'); + }, "blah: expected [AsyncFunction] to be an asyncgeneratorfunction"); + + err(function(){ + expect(async function*() {}, 'blah').to.not.be.a('asyncgeneratorfunction'); + }, "blah: expected [AsyncGeneratorFunction] not to be an asyncgeneratorfunction"); + }) + it('instanceof', function(){ function Foo(){} expect(new Foo()).to.be.an.instanceof(Foo); diff --git a/test/should.js b/test/should.js index 0da30610..adb94d94 100644 --- a/test/should.js +++ b/test/should.js @@ -337,6 +337,18 @@ describe('should', function() { }, "expected '' to be false") }); + it("callable", function () { + (function () {}).should.be.callable; + (async function () {}).should.be.callable; + (function* () {}).should.be.callable; + (async function* () {}).should.be.callable; + true.should.not.be.callable; + + err(function () { + "".should.be.callable; + }, "expected '' to be a callable function"); + }); + it('null', function(){ (0).should.not.be.null; From 1a4dca1e9664601f6f85f38412d47a989c1428ec Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 25 Jan 2024 09:48:21 +0000 Subject: [PATCH 10/30] 5.0.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 520fcdbf..650b6bd5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chai", - "version": "5.0.0", + "version": "5.0.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chai", - "version": "5.0.0", + "version": "5.0.2", "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", diff --git a/package.json b/package.json index 0fabbfda..d9fc870c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "Veselin Todorov ", "John Firebaugh " ], - "version": "5.0.0", + "version": "5.0.2", "repository": { "type": "git", "url": "https://github.com/chaijs/chai" From 44b81dfcf1dbad4f85cafed4223275e73a6b3639 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 25 Jan 2024 09:50:18 +0000 Subject: [PATCH 11/30] 5.0.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 650b6bd5..9897e045 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chai", - "version": "5.0.2", + "version": "5.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chai", - "version": "5.0.2", + "version": "5.0.3", "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", diff --git a/package.json b/package.json index d9fc870c..02d36da6 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "Veselin Todorov ", "John Firebaugh " ], - "version": "5.0.2", + "version": "5.0.3", "repository": { "type": "git", "url": "https://github.com/chaijs/chai" From 3290eb495e90cae51879fbea4632168b990435b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Tue, 30 Jan 2024 09:50:09 +0100 Subject: [PATCH 12/30] Remove useless guards and add parentheses to constuctors (#1593) * Remove useless guards in tests * Add parens to constructor calls --- test/assert.js | 936 +++++++++++++++------------------ test/configuration.js | 55 +- test/expect.js | 1164 +++++++++++++++++++---------------------- test/globalErr.js | 24 +- test/should.js | 119 ++--- test/utilities.js | 44 +- 6 files changed, 1045 insertions(+), 1297 deletions(-) diff --git a/test/assert.js b/test/assert.js index 22373a35..1416f120 100644 --- a/test/assert.js +++ b/test/assert.js @@ -125,10 +125,8 @@ describe('assert', function () { var foo; assert.equal(foo, undefined); - if (typeof Symbol === 'function') { - var sym = Symbol(); - assert.equal(sym, sym); - } + var sym = Symbol(); + assert.equal(sym, sym); err(function () { assert.equal(1, 2, 'blah'); @@ -145,6 +143,7 @@ describe('assert', function () { assert.typeOf(async function() {}, 'asyncfunction'); assert.typeOf(function*() {}, 'generatorfunction'); assert.typeOf(async function*() {}, 'asyncgeneratorfunction'); + assert.typeOf(Symbol(), 'symbol'); err(function () { assert.typeOf(5, 'function', 'blah'); @@ -154,10 +153,6 @@ describe('assert', function () { assert.typeOf(function() {}, 'asyncfunction', 'blah'); }, "blah: expected [Function] to be an asyncfunction"); - if (typeof Symbol === 'function') { - assert.typeOf(Symbol(), 'symbol'); - } - err(function () { assert.typeOf(5, 'string', 'blah'); }, "blah: expected 5 to be a string"); @@ -227,21 +222,19 @@ describe('assert', function () { assert.instanceOf(t, Thing); }, 'The instanceof assertion needs a constructor but Function was given.', true); - if (typeof Symbol !== 'undefined' && typeof Symbol.hasInstance !== 'undefined') { - err(function(){ - assert.instanceOf(new Foo(), Symbol()); - }, "The instanceof assertion needs a constructor but Symbol was given."); - - err(function() { - var FakeConstructor = {}; - var fakeInstanceB = 4; - FakeConstructor[Symbol.hasInstance] = function (val) { - return val === 3; - }; - - assert.instanceOf(fakeInstanceB, FakeConstructor); - }, 'expected 4 to be an instance of an unnamed constructor') - } + err(function(){ + assert.instanceOf(new Foo(), Symbol()); + }, "The instanceof assertion needs a constructor but Symbol was given."); + + err(function() { + var FakeConstructor = {}; + var fakeInstanceB = 4; + FakeConstructor[Symbol.hasInstance] = function (val) { + return val === 3; + }; + + assert.instanceOf(fakeInstanceB, FakeConstructor); + }, 'expected 4 to be an instance of an unnamed constructor') err(function () { assert.instanceOf(5, Foo, 'blah'); @@ -282,21 +275,19 @@ describe('assert', function () { assert.notInstanceOf(new Foo(), undefined); }, "The instanceof assertion needs a constructor but undefined was given."); - if (typeof Symbol !== 'undefined' && typeof Symbol.hasInstance !== 'undefined') { - err(function(){ - assert.notInstanceOf(new Foo(), Symbol()); - }, "The instanceof assertion needs a constructor but Symbol was given."); - - err(function() { - var FakeConstructor = {}; - var fakeInstanceB = 4; - FakeConstructor[Symbol.hasInstance] = function (val) { - return val === 4; - }; - - assert.notInstanceOf(fakeInstanceB, FakeConstructor); - }, 'expected 4 to not be an instance of an unnamed constructor'); - } + err(function(){ + assert.notInstanceOf(new Foo(), Symbol()); + }, "The instanceof assertion needs a constructor but Symbol was given."); + + err(function() { + var FakeConstructor = {}; + var fakeInstanceB = 4; + FakeConstructor[Symbol.hasInstance] = function (val) { + return val === 4; + }; + + assert.notInstanceOf(fakeInstanceB, FakeConstructor); + }, 'expected 4 to not be an instance of an unnamed constructor'); err(function () { assert.notInstanceOf(new Foo(), Foo, 'blah'); @@ -333,11 +324,9 @@ describe('assert', function () { it('notEqual', function() { assert.notEqual(3, 4); - if (typeof Symbol === 'function') { - var sym1 = Symbol() - , sym2 = Symbol(); - assert.notEqual(sym1, sym2); - } + var sym1 = Symbol() + , sym2 = Symbol(); + assert.notEqual(sym1, sym2); err(function () { assert.notEqual(5, 5, 'blah'); @@ -347,10 +336,8 @@ describe('assert', function () { it('strictEqual', function() { assert.strictEqual('foo', 'foo'); - if (typeof Symbol === 'function') { - var sym = Symbol(); - assert.strictEqual(sym, sym); - } + var sym = Symbol(); + assert.strictEqual(sym, sym); err(function () { assert.strictEqual('5', 5, 'blah'); @@ -360,11 +347,9 @@ describe('assert', function () { it('notStrictEqual', function() { assert.notStrictEqual(5, '5'); - if (typeof Symbol === 'function') { - var sym1 = Symbol() - , sym2 = Symbol(); - assert.notStrictEqual(sym1, sym2); - } + var sym1 = Symbol() + , sym2 = Symbol(); + assert.notStrictEqual(sym1, sym2); err(function () { assert.notStrictEqual(5, 5, 'blah'); @@ -592,7 +577,7 @@ describe('assert', function () { it('isArray', function() { assert.isArray([]); - assert.isArray(new Array); + assert.isArray(new Array()); err(function () { assert.isArray({}, 'blah'); @@ -607,7 +592,7 @@ describe('assert', function () { }, "blah: expected [] not to be an array"); err(function () { - assert.isNotArray(new Array); + assert.isNotArray(new Array()); }, "expected [] not to be an array"); }); @@ -701,13 +686,10 @@ describe('assert', function () { // .include should work with Error objects and objects with a custom // `@@toStringTag`. assert.include(new Error('foo'), {message: 'foo'}); - if (typeof Symbol !== 'undefined' - && typeof Symbol.toStringTag !== 'undefined') { - var customObj = {a: 1}; - customObj[Symbol.toStringTag] = 'foo'; + var customObj = {a: 1}; + customObj[Symbol.toStringTag] = 'foo'; - assert.include(customObj, {a: 1}); - } + assert.include(customObj, {a: 1}); var obj1 = {a: 1} , obj2 = {b: 2}; @@ -715,51 +697,39 @@ describe('assert', function () { assert.include({foo: obj1, bar: obj2}, {foo: obj1}); assert.include({foo: obj1, bar: obj2}, {foo: obj1, bar: obj2}); - if (typeof Map === 'function') { - var map = new Map(); - var val = [{a: 1}]; - map.set('a', val); - map.set('b', 2); - map.set('c', -0); - map.set('d', NaN); - - assert.include(map, val); - assert.include(map, 2); - assert.include(map, 0); - assert.include(map, NaN); - } + var map = new Map(); + var val = [{a: 1}]; + map.set('a', val); + map.set('b', 2); + map.set('c', -0); + map.set('d', NaN); - if (typeof Set === 'function') { - var set = new Set(); - var val = [{a: 1}]; - set.add(val); - set.add(2); - set.add(-0); - set.add(NaN); - - assert.include(set, val); - assert.include(set, 2); - if (set.has(0)) { - // This test is skipped in IE11 because (contrary to spec) IE11 uses - // SameValue instead of SameValueZero equality for sets. - assert.include(set, 0); - } - assert.include(set, NaN); - } + assert.include(map, val); + assert.include(map, 2); + assert.include(map, 0); + assert.include(map, NaN); - if (typeof WeakSet === 'function') { - var ws = new WeakSet(); - var val = [{a: 1}]; - ws.add(val); + var val = [{a: 1}]; + var set = new Set(); + set.add(val); + set.add(2); + set.add(-0); + set.add(NaN); - assert.include(ws, val); - } + assert.include(set, val); + assert.include(set, 2); + assert.include(set, 0); + assert.include(set, NaN); - if (typeof Symbol === 'function') { - var sym1 = Symbol() - , sym2 = Symbol(); - assert.include([sym1, sym2], sym1); - } + var ws = new WeakSet(); + var val = [{a: 1}]; + ws.add(val); + + assert.include(ws, val); + + var sym1 = Symbol() + , sym2 = Symbol(); + assert.include([sym1, sym2], sym1); err(function () { assert.include('foobar', 'baz', 'blah'); @@ -812,44 +782,36 @@ describe('assert', function () { assert.notInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); assert.notInclude({foo: obj1, bar: obj2}, {foo: obj1, bar: {b: 2}}); - if (typeof Map === 'function') { - var map = new Map(); - var val = [{a: 1}]; - map.set('a', val); - map.set('b', 2); + var map = new Map(); + var val = [{a: 1}]; + map.set('a', val); + map.set('b', 2); - assert.notInclude(map, [{a: 1}]); - assert.notInclude(map, 3); - } + assert.notInclude(map, [{a: 1}]); + assert.notInclude(map, 3); - if (typeof Set === 'function') { - var set = new Set(); - var val = [{a: 1}]; - set.add(val); - set.add(2); + var set = new Set(); + var val = [{a: 1}]; + set.add(val); + set.add(2); - assert.include(set, val); - assert.include(set, 2); + assert.include(set, val); + assert.include(set, 2); - assert.notInclude(set, [{a: 1}]); - assert.notInclude(set, 3); - } + assert.notInclude(set, [{a: 1}]); + assert.notInclude(set, 3); - if (typeof WeakSet === 'function') { - var ws = new WeakSet(); - var val = [{a: 1}]; - ws.add(val); + var ws = new WeakSet(); + var val = [{a: 1}]; + ws.add(val); - assert.notInclude(ws, [{a: 1}]); - assert.notInclude(ws, {}); - } + assert.notInclude(ws, [{a: 1}]); + assert.notInclude(ws, {}); - if (typeof Symbol === 'function') { - var sym1 = Symbol() - , sym2 = Symbol() - , sym3 = Symbol(); - assert.notInclude([sym1, sym2], sym3); - } + var sym1 = Symbol() + , sym2 = Symbol() + , sym3 = Symbol(); + assert.notInclude([sym1, sym2], sym3); err(function () { var obj1 = {a: 1} @@ -909,25 +871,19 @@ describe('assert', function () { assert.notDeepInclude({foo: obj1, bar: obj2}, {baz: {a: 1}}); assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 9}}); - if (typeof Map === 'function') { - var map = new Map(); - map.set(1, [{a: 1}]); + var map = new Map(); + map.set(1, [{a: 1}]); - assert.deepInclude(map, [{a: 1}]); - } + assert.deepInclude(map, [{a: 1}]); - if (typeof Set === 'function') { - var set = new Set(); - set.add([{a: 1}]); + var set = new Set(); + set.add([{a: 1}]); - assert.deepInclude(set, [{a: 1}]); - } + assert.deepInclude(set, [{a: 1}]); - if (typeof WeakSet === 'function') { - err(function() { - assert.deepInclude(new WeakSet(), {}, 'foo'); - }, 'foo: unable to use .deep.include with WeakSet'); - } + err(function() { + assert.deepInclude(new WeakSet(), {}, 'foo'); + }, 'foo: unable to use .deep.include with WeakSet'); err(function () { assert.deepInclude([obj1, obj2], {a: 9}, 'blah'); @@ -1099,264 +1055,252 @@ describe('assert', function () { assert.hasAllKeys(obj, [enumProp1, enumProp2]); assert.doesNotHaveAllKeys(obj, [enumProp1, enumProp2, nonEnumProp]); - if (typeof Symbol === 'function') { - var sym1 = Symbol('sym1') - , sym2 = Symbol('sym2') - , sym3 = Symbol('sym3') - , str = 'str' - , obj = {}; + var sym1 = Symbol('sym1') + , sym2 = Symbol('sym2') + , sym3 = Symbol('sym3') + , str = 'str' + , obj = {}; - obj[sym1] = 'sym1'; - obj[sym2] = 'sym2'; - obj[str] = 'str'; + obj[sym1] = 'sym1'; + obj[sym2] = 'sym2'; + obj[str] = 'str'; - Object.defineProperty(obj, sym3, { - enumerable: false, - value: 'sym3' - }); + Object.defineProperty(obj, sym3, { + enumerable: false, + value: 'sym3' + }); - assert.hasAllKeys(obj, [sym1, sym2, str]); - assert.doesNotHaveAllKeys(obj, [sym1, sym2, sym3, str]); - } + assert.hasAllKeys(obj, [sym1, sym2, str]); + assert.doesNotHaveAllKeys(obj, [sym1, sym2, sym3, str]); - if (typeof Map !== 'undefined') { - // Not using Map constructor args because not supported in IE 11. - var aKey = {thisIs: 'anExampleObject'} - , anotherKey = {doingThisBecauseOf: 'referential equality'} - , testMap = new Map(); + var aKey = {thisIs: 'anExampleObject'} + , anotherKey = {doingThisBecauseOf: 'referential equality'} + , testMap = new Map(); - testMap.set(aKey, 'aValue'); - testMap.set(anotherKey, 'anotherValue'); + testMap.set(aKey, 'aValue'); + testMap.set(anotherKey, 'anotherValue'); - assert.hasAnyKeys(testMap, [ aKey ]); - assert.hasAnyKeys(testMap, [ 'thisDoesNotExist', 'thisToo', aKey ]); - assert.hasAllKeys(testMap, [ aKey, anotherKey ]); + assert.hasAnyKeys(testMap, [ aKey ]); + assert.hasAnyKeys(testMap, [ 'thisDoesNotExist', 'thisToo', aKey ]); + assert.hasAllKeys(testMap, [ aKey, anotherKey ]); - assert.containsAllKeys(testMap, [ aKey ]); - assert.doesNotHaveAllKeys(testMap, [ aKey, {iDoNot: 'exist'} ]); + assert.containsAllKeys(testMap, [ aKey ]); + assert.doesNotHaveAllKeys(testMap, [ aKey, {iDoNot: 'exist'} ]); - assert.doesNotHaveAnyKeys(testMap, [ {iDoNot: 'exist'} ]); - assert.doesNotHaveAnyKeys(testMap, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); - assert.doesNotHaveAllKeys(testMap, [ 'thisDoesNotExist', 'thisToo', anotherKey ]); + assert.doesNotHaveAnyKeys(testMap, [ {iDoNot: 'exist'} ]); + assert.doesNotHaveAnyKeys(testMap, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); + assert.doesNotHaveAllKeys(testMap, [ 'thisDoesNotExist', 'thisToo', anotherKey ]); - assert.doesNotHaveAnyKeys(testMap, [ {iDoNot: 'exist'}, 'thisDoesNotExist' ]); - assert.doesNotHaveAnyKeys(testMap, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); - assert.doesNotHaveAllKeys(testMap, [ aKey, {iDoNot: 'exist'} ]); + assert.doesNotHaveAnyKeys(testMap, [ {iDoNot: 'exist'}, 'thisDoesNotExist' ]); + assert.doesNotHaveAnyKeys(testMap, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); + assert.doesNotHaveAllKeys(testMap, [ aKey, {iDoNot: 'exist'} ]); - // Ensure the assertions above use strict equality - assert.doesNotHaveAnyKeys(testMap, {thisIs: 'anExampleObject'}); - assert.doesNotHaveAllKeys(testMap, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); + // Ensure the assertions above use strict equality + assert.doesNotHaveAnyKeys(testMap, {thisIs: 'anExampleObject'}); + assert.doesNotHaveAllKeys(testMap, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); - err(function(){ - assert.hasAnyKeys(testMap, [ {thisIs: 'anExampleObject'} ]); - }); + err(function(){ + assert.hasAnyKeys(testMap, [ {thisIs: 'anExampleObject'} ]); + }); - err(function(){ - assert.hasAllKeys(testMap, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); - }); + err(function(){ + assert.hasAllKeys(testMap, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); + }); - err(function(){ - assert.containsAllKeys(testMap, [ {thisIs: 'anExampleObject'} ]); - }); + err(function(){ + assert.containsAllKeys(testMap, [ {thisIs: 'anExampleObject'} ]); + }); - // Tests for the deep variations of the keys assertion - assert.hasAnyDeepKeys(testMap, {thisIs: 'anExampleObject'}); - assert.hasAnyDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {three: 'three'}]); - assert.hasAnyDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + // Tests for the deep variations of the keys assertion + assert.hasAnyDeepKeys(testMap, {thisIs: 'anExampleObject'}); + assert.hasAnyDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {three: 'three'}]); + assert.hasAnyDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - assert.hasAllDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + assert.hasAllDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - assert.containsAllDeepKeys(testMap, {thisIs: 'anExampleObject'}); - assert.containsAllDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + assert.containsAllDeepKeys(testMap, {thisIs: 'anExampleObject'}); + assert.containsAllDeepKeys(testMap, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - assert.doesNotHaveAnyDeepKeys(testMap, {thisDoesNot: 'exist'}); - assert.doesNotHaveAnyDeepKeys(testMap, [{twenty: 'twenty'}, {fifty: 'fifty'}]); + assert.doesNotHaveAnyDeepKeys(testMap, {thisDoesNot: 'exist'}); + assert.doesNotHaveAnyDeepKeys(testMap, [{twenty: 'twenty'}, {fifty: 'fifty'}]); - assert.doesNotHaveAllDeepKeys(testMap, {thisDoesNot: 'exist'}); - assert.doesNotHaveAllDeepKeys(testMap, [{twenty: 'twenty'}, {thisIs: 'anExampleObject'}]); + assert.doesNotHaveAllDeepKeys(testMap, {thisDoesNot: 'exist'}); + assert.doesNotHaveAllDeepKeys(testMap, [{twenty: 'twenty'}, {thisIs: 'anExampleObject'}]); - var weirdMapKey1 = Object.create(null) - , weirdMapKey2 = {toString: NaN} - , weirdMapKey3 = [] - , weirdMap = new Map(); + var weirdMapKey1 = Object.create(null) + , weirdMapKey2 = {toString: NaN} + , weirdMapKey3 = [] + , weirdMap = new Map(); - weirdMap.set(weirdMapKey1, 'val1'); - weirdMap.set(weirdMapKey2, 'val2'); + weirdMap.set(weirdMapKey1, 'val1'); + weirdMap.set(weirdMapKey2, 'val2'); - assert.hasAllKeys(weirdMap, [weirdMapKey1, weirdMapKey2]); - assert.doesNotHaveAllKeys(weirdMap, [weirdMapKey1, weirdMapKey3]); + assert.hasAllKeys(weirdMap, [weirdMapKey1, weirdMapKey2]); + assert.doesNotHaveAllKeys(weirdMap, [weirdMapKey1, weirdMapKey3]); - if (typeof Symbol === 'function') { - var symMapKey1 = Symbol() - , symMapKey2 = Symbol() - , symMapKey3 = Symbol() - , symMap = new Map(); + var symMapKey1 = Symbol() + , symMapKey2 = Symbol() + , symMapKey3 = Symbol() + , symMap = new Map(); - symMap.set(symMapKey1, 'val1'); - symMap.set(symMapKey2, 'val2'); + symMap.set(symMapKey1, 'val1'); + symMap.set(symMapKey2, 'val2'); - assert.hasAllKeys(symMap, [symMapKey1, symMapKey2]); - assert.hasAnyKeys(symMap, [symMapKey1, symMapKey3]); - assert.containsAllKeys(symMap, [symMapKey2, symMapKey1]); + assert.hasAllKeys(symMap, [symMapKey1, symMapKey2]); + assert.hasAnyKeys(symMap, [symMapKey1, symMapKey3]); + assert.containsAllKeys(symMap, [symMapKey2, symMapKey1]); - assert.doesNotHaveAllKeys(symMap, [symMapKey1, symMapKey3]); - assert.doesNotHaveAnyKeys(symMap, [symMapKey3]); - } + assert.doesNotHaveAllKeys(symMap, [symMapKey1, symMapKey3]); + assert.doesNotHaveAnyKeys(symMap, [symMapKey3]); - var errMap = new Map(); + var errMap = new Map(); - errMap.set({1: 20}, 'number'); + errMap.set({1: 20}, 'number'); - err(function(){ - assert.hasAllKeys(errMap, [], 'blah'); - }, "blah: keys required"); + err(function(){ + assert.hasAllKeys(errMap, [], 'blah'); + }, "blah: keys required"); - err(function(){ - assert.containsAllKeys(errMap, [], 'blah'); - }, "blah: keys required"); + err(function(){ + assert.containsAllKeys(errMap, [], 'blah'); + }, "blah: keys required"); - err(function(){ - assert.doesNotHaveAllKeys(errMap, [], 'blah'); - }, "blah: keys required"); + err(function(){ + assert.doesNotHaveAllKeys(errMap, [], 'blah'); + }, "blah: keys required"); - err(function(){ - assert.hasAnyKeys(errMap, [], 'blah'); - }, "blah: keys required"); + err(function(){ + assert.hasAnyKeys(errMap, [], 'blah'); + }, "blah: keys required"); - err(function(){ - assert.doesNotHaveAnyKeys(errMap, [], 'blah'); - }, "blah: keys required"); - - // Uncomment this after solving https://github.com/chaijs/chai/issues/662 - // This should fail because of referential equality (this is a strict comparison) - // err(function(){ - // assert.containsAllKeys(new Map([[{foo: 1}, 'bar']]), { foo: 1 }); - // }, 'expected [ [ { foo: 1 }, 'bar' ] ] to contain key { foo: 1 }'); - - // err(function(){ - // assert.containsAllDeepKeys(new Map([[{foo: 1}, 'bar']]), { iDoNotExist: 0 }) - // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - } + err(function(){ + assert.doesNotHaveAnyKeys(errMap, [], 'blah'); + }, "blah: keys required"); - if (typeof Set !== 'undefined') { - // Not using Set constructor args because not supported in IE 11. - var aKey = {thisIs: 'anExampleObject'} - , anotherKey = {doingThisBecauseOf: 'referential equality'} - , testSet = new Set(); + // Uncomment this after solving https://github.com/chaijs/chai/issues/662 + // This should fail because of referential equality (this is a strict comparison) + // err(function(){ + // assert.containsAllKeys(new Map([[{foo: 1}, 'bar']]), { foo: 1 }); + // }, 'expected [ [ { foo: 1 }, 'bar' ] ] to contain key { foo: 1 }'); - testSet.add(aKey); - testSet.add(anotherKey); + // err(function(){ + // assert.containsAllDeepKeys(new Map([[{foo: 1}, 'bar']]), { iDoNotExist: 0 }) + // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - assert.hasAnyKeys(testSet, [ aKey ]); - assert.hasAnyKeys(testSet, [ 20, 1, aKey ]); - assert.hasAllKeys(testSet, [ aKey, anotherKey ]); + var aKey = {thisIs: 'anExampleObject'} + , anotherKey = {doingThisBecauseOf: 'referential equality'} + , testSet = new Set(); - assert.containsAllKeys(testSet, [ aKey ]); - assert.doesNotHaveAllKeys(testSet, [ aKey, {iDoNot: 'exist'} ]); + testSet.add(aKey); + testSet.add(anotherKey); - assert.doesNotHaveAnyKeys(testSet, [ {iDoNot: 'exist'} ]); - assert.doesNotHaveAnyKeys(testSet, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); - assert.doesNotHaveAllKeys(testSet, [ 'thisDoesNotExist', 'thisToo', anotherKey ]); + assert.hasAnyKeys(testSet, [ aKey ]); + assert.hasAnyKeys(testSet, [ 20, 1, aKey ]); + assert.hasAllKeys(testSet, [ aKey, anotherKey ]); - assert.doesNotHaveAnyKeys(testSet, [ {iDoNot: 'exist'}, 'thisDoesNotExist' ]); - assert.doesNotHaveAnyKeys(testSet, [ 20, 1, {iDoNot: 'exist'} ]); - assert.doesNotHaveAllKeys(testSet, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); + assert.containsAllKeys(testSet, [ aKey ]); + assert.doesNotHaveAllKeys(testSet, [ aKey, {iDoNot: 'exist'} ]); - // Ensure the assertions above use strict equality - assert.doesNotHaveAnyKeys(testSet, {thisIs: 'anExampleObject'}); - assert.doesNotHaveAllKeys(testSet, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); + assert.doesNotHaveAnyKeys(testSet, [ {iDoNot: 'exist'} ]); + assert.doesNotHaveAnyKeys(testSet, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); + assert.doesNotHaveAllKeys(testSet, [ 'thisDoesNotExist', 'thisToo', anotherKey ]); - err(function(){ - assert.hasAnyKeys(testSet, [ {thisIs: 'anExampleObject'} ]); - }); + assert.doesNotHaveAnyKeys(testSet, [ {iDoNot: 'exist'}, 'thisDoesNotExist' ]); + assert.doesNotHaveAnyKeys(testSet, [ 20, 1, {iDoNot: 'exist'} ]); + assert.doesNotHaveAllKeys(testSet, [ 'thisDoesNotExist', 'thisToo', {iDoNot: 'exist'} ]); - err(function(){ - assert.hasAllKeys(testSet, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); - }); + // Ensure the assertions above use strict equality + assert.doesNotHaveAnyKeys(testSet, {thisIs: 'anExampleObject'}); + assert.doesNotHaveAllKeys(testSet, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); - err(function(){ - assert.containsAllKeys(testSet, [ {thisIs: 'anExampleObject'} ]); - }); + err(function(){ + assert.hasAnyKeys(testSet, [ {thisIs: 'anExampleObject'} ]); + }); - // Tests for the deep variations of the keys assertion - assert.hasAnyDeepKeys(testSet, {thisIs: 'anExampleObject'}); - assert.hasAnyDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {three: 'three'}]); - assert.hasAnyDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + err(function(){ + assert.hasAllKeys(testSet, [ {thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'} ]); + }); - assert.hasAllDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + err(function(){ + assert.containsAllKeys(testSet, [ {thisIs: 'anExampleObject'} ]); + }); - assert.containsAllDeepKeys(testSet, {thisIs: 'anExampleObject'}); - assert.containsAllDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + // Tests for the deep variations of the keys assertion + assert.hasAnyDeepKeys(testSet, {thisIs: 'anExampleObject'}); + assert.hasAnyDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {three: 'three'}]); + assert.hasAnyDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - assert.doesNotHaveAnyDeepKeys(testSet, {twenty: 'twenty'}); - assert.doesNotHaveAnyDeepKeys(testSet, [{twenty: 'twenty'}, {fifty: 'fifty'}]); + assert.hasAllDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - assert.doesNotHaveAllDeepKeys(testSet, {twenty: 'twenty'}); - assert.doesNotHaveAllDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {fifty: 'fifty'}]); + assert.containsAllDeepKeys(testSet, {thisIs: 'anExampleObject'}); + assert.containsAllDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - var weirdSetKey1 = Object.create(null) - , weirdSetKey2 = {toString: NaN} - , weirdSetKey3 = [] - , weirdSet = new Set(); + assert.doesNotHaveAnyDeepKeys(testSet, {twenty: 'twenty'}); + assert.doesNotHaveAnyDeepKeys(testSet, [{twenty: 'twenty'}, {fifty: 'fifty'}]); - weirdSet.add(weirdSetKey1); - weirdSet.add(weirdSetKey2); + assert.doesNotHaveAllDeepKeys(testSet, {twenty: 'twenty'}); + assert.doesNotHaveAllDeepKeys(testSet, [{thisIs: 'anExampleObject'}, {fifty: 'fifty'}]); - assert.hasAllKeys(weirdSet, [weirdSetKey1, weirdSetKey2]); - assert.doesNotHaveAllKeys(weirdSet, [weirdSetKey1, weirdSetKey3]); + var weirdSetKey1 = Object.create(null) + , weirdSetKey2 = {toString: NaN} + , weirdSetKey3 = [] + , weirdSet = new Set(); - if (typeof Symbol === 'function') { - var symSetKey1 = Symbol() - , symSetKey2 = Symbol() - , symSetKey3 = Symbol() - , symSet = new Set(); + weirdSet.add(weirdSetKey1); + weirdSet.add(weirdSetKey2); - symSet.add(symSetKey1); - symSet.add(symSetKey2); + assert.hasAllKeys(weirdSet, [weirdSetKey1, weirdSetKey2]); + assert.doesNotHaveAllKeys(weirdSet, [weirdSetKey1, weirdSetKey3]); - assert.hasAllKeys(symSet, [symSetKey1, symSetKey2]); - assert.hasAnyKeys(symSet, [symSetKey1, symSetKey3]); - assert.containsAllKeys(symSet, [symSetKey2, symSetKey1]); + var symSetKey1 = Symbol() + , symSetKey2 = Symbol() + , symSetKey3 = Symbol() + , symSet = new Set(); - assert.doesNotHaveAllKeys(symSet, [symSetKey1, symSetKey3]); - assert.doesNotHaveAnyKeys(symSet, [symSetKey3]); - } + symSet.add(symSetKey1); + symSet.add(symSetKey2); - var errSet = new Set(); + assert.hasAllKeys(symSet, [symSetKey1, symSetKey2]); + assert.hasAnyKeys(symSet, [symSetKey1, symSetKey3]); + assert.containsAllKeys(symSet, [symSetKey2, symSetKey1]); - errSet.add({1: 20}); - errSet.add('number'); + assert.doesNotHaveAllKeys(symSet, [symSetKey1, symSetKey3]); + assert.doesNotHaveAnyKeys(symSet, [symSetKey3]); - err(function(){ - assert.hasAllKeys(errSet, [], 'blah'); - }, "blah: keys required"); + var errSet = new Set(); - err(function(){ - assert.containsAllKeys(errSet, [], 'blah'); - }, "blah: keys required"); + errSet.add({1: 20}); + errSet.add('number'); - err(function(){ - assert.doesNotHaveAllKeys(errSet, [], 'blah'); - }, "blah: keys required"); + err(function(){ + assert.hasAllKeys(errSet, [], 'blah'); + }, "blah: keys required"); - err(function(){ - assert.hasAnyKeys(errSet, [], 'blah'); - }, "blah: keys required"); + err(function(){ + assert.containsAllKeys(errSet, [], 'blah'); + }, "blah: keys required"); - err(function(){ - assert.doesNotHaveAnyKeys(errSet, [], 'blah'); - }, "blah: keys required"); - - // Uncomment this after solving https://github.com/chaijs/chai/issues/662 - // This should fail because of referential equality (this is a strict comparison) - // err(function(){ - // assert.containsAllKeys(new Set([{foo: 1}]), { foo: 1 }); - // }, 'expected [ [ { foo: 1 }, 'bar' ] ] to contain key { foo: 1 }'); - - // err(function(){ - // assert.containsAllDeepKeys(new Set([{foo: 1}]), { iDoNotExist: 0 }) - // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - } + err(function(){ + assert.doesNotHaveAllKeys(errSet, [], 'blah'); + }, "blah: keys required"); + + err(function(){ + assert.hasAnyKeys(errSet, [], 'blah'); + }, "blah: keys required"); + + err(function(){ + assert.doesNotHaveAnyKeys(errSet, [], 'blah'); + }, "blah: keys required"); + + // Uncomment this after solving https://github.com/chaijs/chai/issues/662 + // This should fail because of referential equality (this is a strict comparison) + // err(function(){ + // assert.containsAllKeys(new Set([{foo: 1}]), { foo: 1 }); + // }, 'expected [ [ { foo: 1 }, 'bar' ] ] to contain key { foo: 1 }'); + + // err(function(){ + // assert.containsAllDeepKeys(new Set([{foo: 1}]), { iDoNotExist: 0 }) + // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); err(function(){ assert.hasAllKeys({ foo: 1 }, [], 'blah'); @@ -1468,33 +1412,29 @@ describe('assert', function () { assert.lengthOf(1, 5); }, "expected 1 to have property \'length\'"); - if (typeof Map === 'function') { - assert.lengthOf(new Map, 0); + assert.lengthOf(new Map(), 0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); + var map = new Map(); + map.set('a', 1); + map.set('b', 2); - assert.lengthOf(map, 2); + assert.lengthOf(map, 2); - err(function(){ - assert.lengthOf(map, 3, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2 } to have a size of 3 but got 2"); - } + err(function(){ + assert.lengthOf(map, 3, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2 } to have a size of 3 but got 2"); - if (typeof Set === 'function') { - assert.lengthOf(new Set, 0); + assert.lengthOf(new Set(), 0); - var set = new Set; - set.add(1); - set.add(2); + var set = new Set(); + set.add(1); + set.add(2); - assert.lengthOf(set, 2); + assert.lengthOf(set, 2); - err(function(){ - assert.lengthOf(set, 3, 'blah'); - }, "blah: expected Set{ 1, 2 } to have a size of 3 but got 2"); - } + err(function(){ + assert.lengthOf(set, 3, 'blah'); + }, "blah: expected Set{ 1, 2 } to have a size of 3 but got 2"); }); it('match', function () { @@ -2556,18 +2496,16 @@ describe('assert', function () { assert[isExtensible](undefined); }, 'expected undefined to be extensible'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - isExtensible: function() { - throw new TypeError(); - } - }); - - err(function() { - // isExtensible should not suppress errors, thrown in proxy traps - assert[isExtensible](proxy); - }, { name: 'TypeError' }, true); - } + var proxy = new Proxy({}, { + isExtensible: function() { + throw new TypeError(); + } + }); + + err(function() { + // isExtensible should not suppress errors, thrown in proxy traps + assert[isExtensible](proxy); + }, { name: 'TypeError' }, true); }); }); @@ -2588,23 +2526,18 @@ describe('assert', function () { assert[isNotExtensible]('foo'); assert[isNotExtensible](false); assert[isNotExtensible](undefined); + assert[isNotExtensible](Symbol()); - if (typeof Symbol === 'function') { - assert[isNotExtensible](Symbol()); - } + var proxy = new Proxy({}, { + isExtensible: function() { + throw new TypeError(); + } + }); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - isExtensible: function() { - throw new TypeError(); - } - }); - - err(function() { - // isNotExtensible should not suppress errors, thrown in proxy traps - assert[isNotExtensible](proxy); - }, { name: 'TypeError' }, true); - } + err(function() { + // isNotExtensible should not suppress errors, thrown in proxy traps + assert[isNotExtensible](proxy); + }, { name: 'TypeError' }, true); }); }); @@ -2625,26 +2558,21 @@ describe('assert', function () { assert[isSealed]('foo'); assert[isSealed](false); assert[isSealed](undefined); + assert[isSealed](Symbol()); - if (typeof Symbol === 'function') { - assert[isSealed](Symbol()); - } - - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isSealed will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isSealed will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // isSealed should not suppress errors, thrown in proxy traps - assert[isSealed](proxy); - }, { name: 'TypeError' }, true); - } + err(function() { + // isSealed should not suppress errors, thrown in proxy traps + assert[isSealed](proxy); + }, { name: 'TypeError' }, true); }); }); @@ -2680,21 +2608,19 @@ describe('assert', function () { assert[isNotSealed](undefined); }, 'expected undefined to not be sealed'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isSealed will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isSealed will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // isNotSealed should not suppress errors, thrown in proxy traps - assert[isNotSealed](proxy); - }, { name: 'TypeError' }, true); - } + err(function() { + // isNotSealed should not suppress errors, thrown in proxy traps + assert[isNotSealed](proxy); + }, { name: 'TypeError' }, true); }); }); @@ -2715,26 +2641,21 @@ describe('assert', function () { assert[isFrozen]('foo'); assert[isFrozen](false); assert[isFrozen](undefined); + assert[isFrozen](Symbol()); - if (typeof Symbol === 'function') { - assert[isFrozen](Symbol()); - } - - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isFrozen will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isFrozen will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // isFrozen should not suppress errors, thrown in proxy traps - assert[isFrozen](proxy); - }, { name: 'TypeError' }, true); - } + err(function() { + // isFrozen should not suppress errors, thrown in proxy traps + assert[isFrozen](proxy); + }, { name: 'TypeError' }, true); }); }); @@ -2770,21 +2691,19 @@ describe('assert', function () { assert[isNotFrozen](undefined); }, 'expected undefined to not be frozen'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isFrozen will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isFrozen will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // isNotFrozen should not suppress errors, thrown in proxy traps - assert[isNotFrozen](proxy); - }, { name: 'TypeError' }, true); - } + err(function() { + // isNotFrozen should not suppress errors, thrown in proxy traps + assert[isNotFrozen](proxy); + }, { name: 'TypeError' }, true); }); }); @@ -2795,36 +2714,27 @@ describe('assert', function () { assert[isEmpty](''); assert[isEmpty]([]); - assert[isEmpty](new FakeArgs); + assert[isEmpty](new FakeArgs()); assert[isEmpty]({}); - if (typeof WeakMap === 'function') { - err(function(){ - assert[isEmpty](new WeakMap, 'blah'); - }, "blah: .empty was passed a weak collection"); - } - - if (typeof WeakSet === 'function') { - err(function(){ - assert[isEmpty](new WeakSet, 'blah'); - }, "blah: .empty was passed a weak collection"); - } + err(function(){ + assert[isEmpty](new WeakMap(), 'blah'); + }, "blah: .empty was passed a weak collection"); - if (typeof Map === 'function') { - assert[isEmpty](new Map); + err(function(){ + assert[isEmpty](new WeakSet(), 'blah'); + }, "blah: .empty was passed a weak collection"); - var map = new Map; - map.key = 'val'; - assert[isEmpty](map); - } + assert[isEmpty](new Map()); - if (typeof Set === 'function') { - assert[isEmpty](new Set); + var map = new Map(); + map.key = 'val'; + assert[isEmpty](map); + assert[isEmpty](new Set()); - var set = new Set; - set.key = 'val'; - assert[isEmpty](set); - } + var set = new Set(); + set.key = 'val'; + assert[isEmpty](set); err(function(){ assert[isEmpty]('foo', 'blah'); @@ -2870,15 +2780,13 @@ describe('assert', function () { assert[isEmpty](false); }, ".empty was passed non-string primitive false"); - if (typeof Symbol !== 'undefined') { - err(function(){ - assert[isEmpty](Symbol()); - }, ".empty was passed non-string primitive Symbol()"); + err(function(){ + assert[isEmpty](Symbol()); + }, ".empty was passed non-string primitive Symbol()"); - err(function(){ - assert[isEmpty](Symbol.iterator); - }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); - } + err(function(){ + assert[isEmpty](Symbol.iterator); + }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); err(function(){ assert[isEmpty](function() {}, 'blah'); @@ -2902,39 +2810,29 @@ describe('assert', function () { assert[isNotEmpty]({arguments: 0}); assert[isNotEmpty]({foo: 'bar'}); - if (typeof WeakMap === 'function') { - err(function(){ - assert[isNotEmpty](new WeakMap, 'blah'); - }, "blah: .empty was passed a weak collection"); - } + err(function(){ + assert[isNotEmpty](new WeakMap(), 'blah'); + }, "blah: .empty was passed a weak collection"); - if (typeof WeakSet === 'function') { - err(function(){ - assert[isNotEmpty](new WeakSet, 'blah'); - }, "blah: .empty was passed a weak collection"); - } + err(function(){ + assert[isNotEmpty](new WeakSet(), 'blah'); + }, "blah: .empty was passed a weak collection"); - if (typeof Map === 'function') { - // Not using Map constructor args because not supported in IE 11. - var map = new Map; - map.set('a', 1); - assert[isNotEmpty](map); + var map = new Map(); + map.set('a', 1); + assert[isNotEmpty](map); - err(function(){ - assert[isNotEmpty](new Map); - }, "expected Map{} not to be empty"); - } + err(function(){ + assert[isNotEmpty](new Map()); + }, "expected Map{} not to be empty"); - if (typeof Set === 'function') { - // Not using Set constructor args because not supported in IE 11. - var set = new Set; - set.add(1); - assert[isNotEmpty](set); + var set = new Set(); + set.add(1); + assert[isNotEmpty](set); - err(function(){ - assert[isNotEmpty](new Set); - }, "expected Set{} not to be empty"); - } + err(function(){ + assert[isNotEmpty](new Set()); + }, "expected Set{} not to be empty"); err(function(){ assert[isNotEmpty]('', 'blah'); @@ -2945,7 +2843,7 @@ describe('assert', function () { }, "expected [] not to be empty"); err(function(){ - assert[isNotEmpty](new FakeArgs); + assert[isNotEmpty](new FakeArgs()); }, "expected FakeArgs{} not to be empty"); err(function(){ @@ -2980,15 +2878,13 @@ describe('assert', function () { assert[isNotEmpty](false); }, ".empty was passed non-string primitive false"); - if (typeof Symbol !== 'undefined') { - err(function(){ - assert[isNotEmpty](Symbol()); - }, ".empty was passed non-string primitive Symbol()"); + err(function(){ + assert[isNotEmpty](Symbol()); + }, ".empty was passed non-string primitive Symbol()"); - err(function(){ - assert[isNotEmpty](Symbol.iterator); - }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); - } + err(function(){ + assert[isNotEmpty](Symbol.iterator); + }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); err(function(){ assert[isNotEmpty](function() {}, 'blah'); diff --git a/test/configuration.js b/test/configuration.js index 09e1b498..b5ac839d 100644 --- a/test/configuration.js +++ b/test/configuration.js @@ -105,10 +105,7 @@ describe('configuration', function () { it('should include Chai frames in stack trace', function () { expect(caughtErr.stack).to.contain('propertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.contain('proxyGetter'); - } + expect(caughtErr.stack).to.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -131,10 +128,7 @@ describe('configuration', function () { it('should include Chai frames in stack trace', function () { expect(caughtErr.stack).to.contain('overwritingPropertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.contain('proxyGetter'); - } + expect(caughtErr.stack).to.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -247,10 +241,7 @@ describe('configuration', function () { it('should not include Chai frames in stack trace', function () { expect(caughtErr.stack).to.not.contain('propertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.not.contain('proxyGetter'); - } + expect(caughtErr.stack).to.not.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -273,10 +264,7 @@ describe('configuration', function () { it('should not include Chai frames in stack trace', function () { expect(caughtErr.stack).to.not.contain('overwritingPropertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.not.contain('proxyGetter'); - } + expect(caughtErr.stack).to.not.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -411,10 +399,7 @@ describe('configuration', function () { it('should include Chai frames in stack trace', function () { expect(caughtErr.stack).to.contain('propertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.contain('proxyGetter'); - } + expect(caughtErr.stack).to.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -437,10 +422,7 @@ describe('configuration', function () { it('should include Chai frames in stack trace', function () { expect(caughtErr.stack).to.contain('overwritingPropertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.contain('proxyGetter'); - } + expect(caughtErr.stack).to.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -553,10 +535,7 @@ describe('configuration', function () { it('should not include Chai frames in stack trace', function () { expect(caughtErr.stack).to.not.contain('propertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.not.contain('proxyGetter'); - } + expect(caughtErr.stack).to.not.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -579,10 +558,7 @@ describe('configuration', function () { it('should not include Chai frames in stack trace', function () { expect(caughtErr.stack).to.not.contain('overwritingPropertyGetter'); - - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(caughtErr.stack).to.not.contain('proxyGetter'); - } + expect(caughtErr.stack).to.not.contain('proxyGetter'); }); it('should include user frames in stack trace', function () { @@ -767,11 +743,7 @@ describe('configuration', function () { describe('when true', function() { it('should use proxy unless user\'s environment doesn\'t support', function() { - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(readNoExistentProperty).to.throw('Invalid Chai property: tue'); - } else { - expect(readNoExistentProperty).to.not.throw('Invalid Chai property: tue'); - } + expect(readNoExistentProperty).to.throw('Invalid Chai property: tue'); }); }); @@ -806,13 +778,8 @@ describe('configuration', function () { it('should throw for properties which are not on the `proxyExcludedKeys` Array in an environment with proxy support', function() { chai.config.proxyExcludedKeys = []; - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - expect(readNoExistentProperty('then')).to.throw('Invalid Chai property: then'); - expect(readNoExistentProperty('inspect')).to.throw('Invalid Chai property: inspect'); - } else { - expect(readNoExistentProperty('then')).to.not.throw(); - expect(readNoExistentProperty('inspect')).to.not.throw(); - } + expect(readNoExistentProperty('then')).to.throw('Invalid Chai property: then'); + expect(readNoExistentProperty('inspect')).to.throw('Invalid Chai property: inspect'); }); }); diff --git a/test/expect.js b/test/expect.js index d5247655..ba03c8a2 100644 --- a/test/expect.js +++ b/test/expect.js @@ -52,8 +52,6 @@ describe('expect', function () { }); describe('proxify', function () { - if (typeof Proxy === 'undefined' || typeof Reflect === 'undefined') return; - it('throws when invalid property follows expect', function () { err(function () { expect(42).pizza; @@ -371,10 +369,7 @@ describe('expect', function () { expect([]).to.be.a('array'); expect(function() {}).to.be.a('function'); expect(null).to.be.a('null'); - - if (typeof Symbol === 'function') { - expect(Symbol()).to.be.a('symbol'); - } + expect(Symbol()).to.be.a('symbol'); err(function(){ expect(5).to.not.be.a('number', 'blah'); @@ -519,31 +514,29 @@ describe('expect', function () { expect(t).to.an.instanceof(Thing); }, 'The instanceof assertion needs a constructor but Function was given.', true) - if (typeof Symbol !== 'undefined' && typeof Symbol.hasInstance !== 'undefined') { - err(function(){ - expect(new Foo()).to.an.instanceof(Symbol()); - }, "The instanceof assertion needs a constructor but Symbol was given."); - - err(function() { - var FakeConstructor = {}; - var fakeInstanceB = 4; - FakeConstructor[Symbol.hasInstance] = function (val) { - return val === 3; - }; - - expect(fakeInstanceB).to.be.an.instanceof(FakeConstructor); - }, 'expected 4 to be an instance of an unnamed constructor') - - err(function() { - var FakeConstructor = {}; - var fakeInstanceB = 4; - FakeConstructor[Symbol.hasInstance] = function (val) { - return val === 4; - }; - - expect(fakeInstanceB).to.not.be.an.instanceof(FakeConstructor); - }, 'expected 4 to not be an instance of an unnamed constructor') - } + err(function(){ + expect(new Foo()).to.an.instanceof(Symbol()); + }, "The instanceof assertion needs a constructor but Symbol was given."); + + err(function() { + var FakeConstructor = {}; + var fakeInstanceB = 4; + FakeConstructor[Symbol.hasInstance] = function (val) { + return val === 3; + }; + + expect(fakeInstanceB).to.be.an.instanceof(FakeConstructor); + }, 'expected 4 to be an instance of an unnamed constructor') + + err(function() { + var FakeConstructor = {}; + var fakeInstanceB = 4; + FakeConstructor[Symbol.hasInstance] = function (val) { + return val === 4; + }; + + expect(fakeInstanceB).to.not.be.an.instanceof(FakeConstructor); + }, 'expected 4 to not be an instance of an unnamed constructor') err(function(){ expect(3).to.an.instanceof(Foo, 'blah'); @@ -644,47 +637,43 @@ describe('expect', function () { expect(1).to.have.lengthOf.within(5, 7, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - expect(new Map).to.have.length.within(0, 0); - expect(new Map).to.have.lengthOf.within(0, 0); + expect(new Map()).to.have.length.within(0, 0); + expect(new Map()).to.have.lengthOf.within(0, 0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map(); + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - expect(map).to.have.length.within(2, 4); - expect(map).to.have.lengthOf.within(2, 4); + expect(map).to.have.length.within(2, 4); + expect(map).to.have.lengthOf.within(2, 4); - err(function () { - expect(map).to.have.length.within(5, 7, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); + err(function () { + expect(map).to.have.length.within(5, 7, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); - err(function () { - expect(map).to.have.lengthOf.within(5, 7, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); - } + err(function () { + expect(map).to.have.lengthOf.within(5, 7, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); - if (typeof Set === 'function') { - expect(new Set).to.have.length.within(0, 0); - expect(new Set).to.have.lengthOf.within(0, 0); + expect(new Set()).to.have.length.within(0, 0); + expect(new Set()).to.have.lengthOf.within(0, 0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set(); + set.add(1); + set.add(2); + set.add(3); - expect(set).to.have.length.within(2, 4); - expect(set).to.have.lengthOf.within(2, 4); + expect(set).to.have.length.within(2, 4); + expect(set).to.have.lengthOf.within(2, 4); - err(function () { - expect(set).to.have.length.within(5, 7, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); + err(function () { + expect(set).to.have.length.within(5, 7, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); - err(function () { - expect(set).to.have.lengthOf.within(5, 7, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); - } + err(function () { + expect(set).to.have.lengthOf.within(5, 7, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size within 5..7"); }); it('within(start, finish) (dates)', function(){ @@ -819,47 +808,43 @@ describe('expect', function () { expect(1).to.have.lengthOf.above(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - expect(new Map).to.have.length.above(-1); - expect(new Map).to.have.lengthOf.above(-1); + expect(new Map()).to.have.length.above(-1); + expect(new Map()).to.have.lengthOf.above(-1); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map(); + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - expect(map).to.have.length.above(2); - expect(map).to.have.lengthOf.above(2); + expect(map).to.have.length.above(2); + expect(map).to.have.lengthOf.above(2); - err(function () { - expect(map).to.have.length.above(5, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); + err(function () { + expect(map).to.have.length.above(5, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); - err(function () { - expect(map).to.have.lengthOf.above(5, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); - } + err(function () { + expect(map).to.have.lengthOf.above(5, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); - if (typeof Set === 'function') { - expect(new Set).to.have.length.above(-1); - expect(new Set).to.have.lengthOf.above(-1); + expect(new Set()).to.have.length.above(-1); + expect(new Set()).to.have.lengthOf.above(-1); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set(); + set.add(1); + set.add(2); + set.add(3); - expect(set).to.have.length.above(2); - expect(set).to.have.lengthOf.above(2); + expect(set).to.have.length.above(2); + expect(set).to.have.lengthOf.above(2); - err(function () { - expect(set).to.have.length.above(5, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); + err(function () { + expect(set).to.have.length.above(5, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); - err(function () { - expect(set).to.have.lengthOf.above(5, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); - } + err(function () { + expect(set).to.have.lengthOf.above(5, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size above 5 but got 3"); }); it('above(n) (dates)', function(){ @@ -986,47 +971,43 @@ describe('expect', function () { expect(1).to.have.lengthOf.at.least(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - expect(new Map).to.have.length.of.at.least(0); - expect(new Map).to.have.lengthOf.at.least(0); + expect(new Map()).to.have.length.of.at.least(0); + expect(new Map()).to.have.lengthOf.at.least(0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map(); + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - expect(map).to.have.length.of.at.least(3); - expect(map).to.have.lengthOf.at.least(3); + expect(map).to.have.length.of.at.least(3); + expect(map).to.have.lengthOf.at.least(3); - err(function () { - expect(map).to.have.length.of.at.least(4, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); + err(function () { + expect(map).to.have.length.of.at.least(4, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); - err(function () { - expect(map).to.have.lengthOf.at.least(4, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); - } + err(function () { + expect(map).to.have.lengthOf.at.least(4, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); - if (typeof Set === 'function') { - expect(new Set).to.have.length.of.at.least(0); - expect(new Set).to.have.lengthOf.at.least(0); + expect(new Set()).to.have.length.of.at.least(0); + expect(new Set()).to.have.lengthOf.at.least(0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set(); + set.add(1); + set.add(2); + set.add(3); - expect(set).to.have.length.of.at.least(3); - expect(set).to.have.lengthOf.at.least(3); + expect(set).to.have.length.of.at.least(3); + expect(set).to.have.lengthOf.at.least(3); - err(function () { - expect(set).to.have.length.of.at.least(4, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); + err(function () { + expect(set).to.have.length.of.at.least(4, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); - err(function () { - expect(set).to.have.lengthOf.at.least(4, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); - } + err(function () { + expect(set).to.have.lengthOf.at.least(4, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at least 4 but got 3"); }); it('below(n)', function(){ @@ -1107,47 +1088,43 @@ describe('expect', function () { expect(1).to.have.lengthOf.below(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - expect(new Map).to.have.length.below(1); - expect(new Map).to.have.lengthOf.below(1); + expect(new Map()).to.have.length.below(1); + expect(new Map()).to.have.lengthOf.below(1); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map(); + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - expect(map).to.have.length.below(4); - expect(map).to.have.lengthOf.below(4); + expect(map).to.have.length.below(4); + expect(map).to.have.lengthOf.below(4); - err(function () { - expect(map).to.have.length.below(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); + err(function () { + expect(map).to.have.length.below(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); - err(function () { - expect(map).to.have.lengthOf.below(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); - } + err(function () { + expect(map).to.have.lengthOf.below(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); - if (typeof Set === 'function') { - expect(new Set).to.have.length.below(1); - expect(new Set).to.have.lengthOf.below(1); + expect(new Set()).to.have.length.below(1); + expect(new Set()).to.have.lengthOf.below(1); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set(); + set.add(1); + set.add(2); + set.add(3); - expect(set).to.have.length.below(4); - expect(set).to.have.lengthOf.below(4); + expect(set).to.have.length.below(4); + expect(set).to.have.lengthOf.below(4); - err(function () { - expect(set).to.have.length.below(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); + err(function () { + expect(set).to.have.length.below(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); - err(function () { - expect(set).to.have.lengthOf.below(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); - } + err(function () { + expect(set).to.have.lengthOf.below(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size below 2 but got 3"); }); it('below(n) (dates)', function(){ @@ -1278,47 +1255,43 @@ describe('expect', function () { expect(1).to.have.lengthOf.at.most(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - if (typeof Map === 'function') { - expect(new Map).to.have.length.of.at.most(0); - expect(new Map).to.have.lengthOf.at.most(0); + expect(new Map()).to.have.length.of.at.most(0); + expect(new Map()).to.have.lengthOf.at.most(0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map(); + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - expect(map).to.have.length.of.at.most(3); - expect(map).to.have.lengthOf.at.most(3); + expect(map).to.have.length.of.at.most(3); + expect(map).to.have.lengthOf.at.most(3); - err(function () { - expect(map).to.have.length.of.at.most(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); + err(function () { + expect(map).to.have.length.of.at.most(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); - err(function () { - expect(map).to.have.lengthOf.at.most(2, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); - } + err(function () { + expect(map).to.have.lengthOf.at.most(2, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); - if (typeof Set === 'function') { - expect(new Set).to.have.length.of.at.most(0); - expect(new Set).to.have.lengthOf.at.most(0); + expect(new Set()).to.have.length.of.at.most(0); + expect(new Set()).to.have.lengthOf.at.most(0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set(); + set.add(1); + set.add(2); + set.add(3); - expect(set).to.have.length.of.at.most(3); - expect(set).to.have.lengthOf.at.most(3); + expect(set).to.have.length.of.at.most(3); + expect(set).to.have.lengthOf.at.most(3); - err(function () { - expect(set).to.have.length.of.at.most(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); + err(function () { + expect(set).to.have.length.of.at.most(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); - err(function () { - expect(set).to.have.lengthOf.at.most(2, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); - } + err(function () { + expect(set).to.have.lengthOf.at.most(2, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to have a size at most 2 but got 3"); }); it('most(n) (dates)', function(){ @@ -1424,47 +1397,43 @@ describe('expect', function () { expect('asd').to.not.have.lengthOf(3, 'blah'); }, "blah: expected 'asd' to not have a length of 3"); - if (typeof Map === 'function') { - expect(new Map).to.have.length(0); - expect(new Map).to.have.lengthOf(0); + expect(new Map()).to.have.length(0); + expect(new Map()).to.have.lengthOf(0); - var map = new Map; - map.set('a', 1); - map.set('b', 2); - map.set('c', 3); + var map = new Map(); + map.set('a', 1); + map.set('b', 2); + map.set('c', 3); - expect(map).to.have.length(3); - expect(map).to.have.lengthOf(3); + expect(map).to.have.length(3); + expect(map).to.have.lengthOf(3); - err(function(){ - expect(map).to.not.have.length(3, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); + err(function(){ + expect(map).to.not.have.length(3, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); - err(function(){ - expect(map).to.not.have.lengthOf(3, 'blah'); - }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); - } + err(function(){ + expect(map).to.not.have.lengthOf(3, 'blah'); + }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); - if (typeof Set === 'function') { - expect(new Set).to.have.length(0); - expect(new Set).to.have.lengthOf(0); + expect(new Set()).to.have.length(0); + expect(new Set()).to.have.lengthOf(0); - var set = new Set; - set.add(1); - set.add(2); - set.add(3); + var set = new Set(); + set.add(1); + set.add(2); + set.add(3); - expect(set).to.have.length(3); - expect(set).to.have.lengthOf(3); + expect(set).to.have.length(3); + expect(set).to.have.lengthOf(3); - err(function(){ - expect(set).to.not.have.length(3, 'blah'); - }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); + err(function(){ + expect(set).to.not.have.length(3, 'blah'); + }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); - err(function(){ - expect(set).to.not.have.lengthOf(3, 'blah');; - }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); - } + err(function(){ + expect(set).to.not.have.lengthOf(3, 'blah');; + }, "blah: expected Set{ 1, 2, 3 } to not have a size of 3"); }); it('eql(val)', function(){ @@ -1473,34 +1442,30 @@ describe('expect', function () { expect(1).to.eql(1); expect('4').to.not.eql(4); - if (typeof Symbol === 'function') { - var sym = Symbol(); - expect(sym).to.eql(sym); - } + var sym = Symbol(); + expect(sym).to.eql(sym); err(function(){ expect(4).to.eql(3, 'blah'); }, 'blah: expected 4 to deeply equal 3'); }); - if ('undefined' !== typeof Buffer) { - it('Buffer eql()', function () { - expect(Buffer.from([ 1 ])).to.eql(Buffer.from([ 1 ])); + it('Buffer eql()', function () { + if (typeof Buffer === 'undefined') return; - err(function () { - expect(Buffer.from([ 0 ])).to.eql(Buffer.from([ 1 ])); - }, 'expected Buffer[ 0 ] to deeply equal Buffer[ 1 ]'); - }); - } + expect(Buffer.from([ 1 ])).to.eql(Buffer.from([ 1 ])); + + err(function () { + expect(Buffer.from([ 0 ])).to.eql(Buffer.from([ 1 ])); + }, 'expected Buffer[ 0 ] to deeply equal Buffer[ 1 ]'); + }); it('equal(val)', function(){ expect('test').to.equal('test'); expect(1).to.equal(1); - if (typeof Symbol === 'function') { - var sym = Symbol(); - expect(sym).to.equal(sym); - } + var sym = Symbol(); + expect(sym).to.equal(sym); err(function(){ expect(4).to.equal(3, 'blah'); @@ -1585,64 +1550,56 @@ describe('expect', function () { expect('foo').not.to.be.empty; expect([]).to.be.empty; expect(['foo']).not.to.be.empty; - expect(new FakeArgs).to.be.empty; + expect(new FakeArgs()).to.be.empty; expect({arguments: 0}).not.to.be.empty; expect({}).to.be.empty; expect({foo: 'bar'}).not.to.be.empty; - if (typeof WeakMap === 'function') { - err(function(){ - expect(new WeakMap, 'blah').not.to.be.empty; - }, "blah: .empty was passed a weak collection"); - } + err(function(){ + expect(new WeakMap(), 'blah').not.to.be.empty; + }, "blah: .empty was passed a weak collection"); - if (typeof WeakSet === 'function') { - err(function(){ - expect(new WeakSet, 'blah').not.to.be.empty; - }, "blah: .empty was passed a weak collection"); - } + err(function(){ + expect(new WeakSet(), 'blah').not.to.be.empty; + }, "blah: .empty was passed a weak collection"); - if (typeof Map === 'function') { - expect(new Map).to.be.empty; + expect(new Map()).to.be.empty; - // Not using Map constructor args because not supported in IE 11. - var map = new Map; - map.set('a', 1); - expect(map).not.to.be.empty; + // Not using Map constructor args because not supported in IE 11. + var map = new Map(); + map.set('a', 1); + expect(map).not.to.be.empty; - err(function(){ - expect(new Map).not.to.be.empty; - }, "expected Map{} not to be empty"); + err(function(){ + expect(new Map()).not.to.be.empty; + }, "expected Map{} not to be empty"); - map = new Map; - map.key = 'val'; - expect(map).to.be.empty; + map = new Map(); + map.key = 'val'; + expect(map).to.be.empty; - err(function(){ - expect(map).not.to.be.empty; - }, "expected Map{} not to be empty"); - } + err(function(){ + expect(map).not.to.be.empty; + }, "expected Map{} not to be empty"); - if (typeof Set === 'function') { - expect(new Set).to.be.empty; + expect(new Set()).to.be.empty; - // Not using Set constructor args because not supported in IE 11. - var set = new Set; - set.add(1); - expect(set).not.to.be.empty; + // Not using Set constructor args because not supported in IE 11. + var set = new Set(); + set.add(1); + expect(set).not.to.be.empty; - err(function(){ - expect(new Set).not.to.be.empty; - }, "expected Set{} not to be empty"); + err(function(){ + expect(new Set()).not.to.be.empty; + }, "expected Set{} not to be empty"); - set = new Set; - set.key = 'val'; - expect(set).to.be.empty; + set = new Set(); + set.key = 'val'; + expect(set).to.be.empty; - err(function(){ - expect(set).not.to.be.empty; - }, "expected Set{} not to be empty"); - } + err(function(){ + expect(set).not.to.be.empty; + }, "expected Set{} not to be empty"); err(function(){ expect('', 'blah').not.to.be.empty; @@ -1661,7 +1618,7 @@ describe('expect', function () { }, "expected [ \'foo\' ] to be empty"); err(function(){ - expect(new FakeArgs).not.to.be.empty; + expect(new FakeArgs()).not.to.be.empty; }, "expected FakeArgs{} not to be empty"); err(function(){ @@ -1716,15 +1673,13 @@ describe('expect', function () { expect(false).to.be.empty; }, ".empty was passed non-string primitive false"); - if (typeof Symbol !== 'undefined') { - err(function(){ - expect(Symbol()).to.be.empty; - }, ".empty was passed non-string primitive Symbol()"); + err(function(){ + expect(Symbol()).to.be.empty; + }, ".empty was passed non-string primitive Symbol()"); - err(function(){ - expect(Symbol.iterator).to.be.empty; - }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); - } + err(function(){ + expect(Symbol.iterator).to.be.empty; + }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); err(function(){ expect(function() {}, 'blah').to.be.empty; @@ -2275,13 +2230,10 @@ describe('expect', function () { // .include should work with Error objects and objects with a custom // `@@toStringTag`. expect(new Error('foo')).to.include({message: 'foo'}); - if (typeof Symbol !== 'undefined' - && typeof Symbol.toStringTag !== 'undefined') { - var customObj = {a: 1}; - customObj[Symbol.toStringTag] = 'foo'; + var customObj = {a: 1}; + customObj[Symbol.toStringTag] = 'foo'; - expect(customObj).to.include({a: 1}); - } + expect(customObj).to.include({a: 1}); var obj1 = {a: 1} , obj2 = {b: 2}; @@ -2292,59 +2244,51 @@ describe('expect', function () { expect({foo: obj1, bar: obj2}).to.not.include({foo: {a: 1}}); expect({foo: obj1, bar: obj2}).to.not.include({foo: obj1, bar: {b: 2}}); - if (typeof Map === 'function') { - var map = new Map(); - var val = [{a: 1}]; - map.set('a', val); - map.set('b', 2); - map.set('c', -0); - map.set('d', NaN); - - expect(map).to.include(val); - expect(map).to.not.include([{a: 1}]); - expect(map).to.include(2); - expect(map).to.not.include(3); - expect(map).to.include(0); - expect(map).to.include(NaN); - } - - if (typeof Set === 'function') { - var set = new Set(); - var val = [{a: 1}]; - set.add(val); - set.add(2); - set.add(-0); - set.add(NaN); - - expect(set).to.include(val); - expect(set).to.not.include([{a: 1}]); - expect(set).to.include(2); - expect(set).to.not.include(3); - if (set.has(0)) { - // This test is skipped in IE11 because (contrary to spec) IE11 uses - // SameValue instead of SameValueZero equality for sets. - expect(set).to.include(0); - } - expect(set).to.include(NaN); + var map = new Map(); + var val = [{a: 1}]; + map.set('a', val); + map.set('b', 2); + map.set('c', -0); + map.set('d', NaN); + + expect(map).to.include(val); + expect(map).to.not.include([{a: 1}]); + expect(map).to.include(2); + expect(map).to.not.include(3); + expect(map).to.include(0); + expect(map).to.include(NaN); + + var set = new Set(); + var val = [{a: 1}]; + set.add(val); + set.add(2); + set.add(-0); + set.add(NaN); + + expect(set).to.include(val); + expect(set).to.not.include([{a: 1}]); + expect(set).to.include(2); + expect(set).to.not.include(3); + if (set.has(0)) { + // This test is skipped in IE11 because (contrary to spec) IE11 uses + // SameValue instead of SameValueZero equality for sets. + expect(set).to.include(0); } + expect(set).to.include(NaN); - if (typeof WeakSet === 'function') { - var ws = new WeakSet(); - var val = [{a: 1}]; - ws.add(val); + var ws = new WeakSet(); + var val = [{a: 1}]; + ws.add(val); - expect(ws).to.include(val); - expect(ws).to.not.include([{a: 1}]); - expect(ws).to.not.include({}); - } + expect(ws).to.include(val); + expect(ws).to.not.include([{a: 1}]); + expect(ws).to.not.include({}); - if (typeof Symbol === 'function') { - var sym1 = Symbol() - , sym2 = Symbol() - , sym3 = Symbol(); - expect([sym1, sym2]).to.include(sym1); - expect([sym1, sym2]).to.not.include(sym3); - } + var sym1 = Symbol() + , sym2 = Symbol() + , sym3 = Symbol(); + expect([sym1, sym2]).to.include(sym1); + expect([sym1, sym2]).to.not.include(sym3); err(function(){ expect(['foo']).to.include('bar', 'blah'); @@ -2467,25 +2411,19 @@ describe('expect', function () { expect({foo: obj1, bar: obj2}).to.not.deep.include({baz: {a: 1}}); expect({foo: obj1, bar: obj2}).to.not.deep.include({foo: {a: 1}, bar: {b: 9}}); - if (typeof Map === 'function') { - var map = new Map(); - map.set(1, [{a: 1}]); + var map = new Map(); + map.set(1, [{a: 1}]); - expect(map).to.deep.include([{a: 1}]); - } + expect(map).to.deep.include([{a: 1}]); - if (typeof Set === 'function') { - var set = new Set(); - set.add([{a: 1}]); + var set = new Set(); + set.add([{a: 1}]); - expect(set).to.deep.include([{a: 1}]); - } + expect(set).to.deep.include([{a: 1}]); - if (typeof WeakSet === 'function') { - err(function() { - expect(new WeakSet()).to.deep.include({}, 'foo'); - }, 'foo: unable to use .deep.include with WeakSet'); - } + err(function() { + expect(new WeakSet()).to.deep.include({}, 'foo'); + }, 'foo: unable to use .deep.include with WeakSet'); err(function () { expect([obj1, obj2]).to.deep.include({a: 9}, 'blah'); @@ -2686,286 +2624,276 @@ describe('expect', function () { expect(obj).to.have.all.keys([enumProp1, enumProp2]); expect(obj).to.not.have.all.keys([enumProp1, enumProp2, nonEnumProp]); - if (typeof Symbol === 'function') { - var sym1 = Symbol('sym1') - , sym2 = Symbol('sym2') - , sym3 = Symbol('sym3') - , str = 'str' - , obj = {}; + var sym1 = Symbol('sym1') + , sym2 = Symbol('sym2') + , sym3 = Symbol('sym3') + , str = 'str' + , obj = {}; - obj[sym1] = 'sym1'; - obj[sym2] = 'sym2'; - obj[str] = 'str'; + obj[sym1] = 'sym1'; + obj[sym2] = 'sym2'; + obj[str] = 'str'; - Object.defineProperty(obj, sym3, { - enumerable: false, - value: 'sym3' - }); + Object.defineProperty(obj, sym3, { + enumerable: false, + value: 'sym3' + }); - expect(obj).to.have.all.keys([sym1, sym2, str]); - expect(obj).to.not.have.all.keys([sym1, sym2, sym3, str]); - } + expect(obj).to.have.all.keys([sym1, sym2, str]); + expect(obj).to.not.have.all.keys([sym1, sym2, sym3, str]); - if (typeof Map !== 'undefined') { - // Not using Map constructor args because not supported in IE 11. - var aKey = {thisIs: 'anExampleObject'} - , anotherKey = {doingThisBecauseOf: 'referential equality'} - , testMap = new Map(); + // Not using Map constructor args because not supported in IE 11. + var aKey = {thisIs: 'anExampleObject'} + , anotherKey = {doingThisBecauseOf: 'referential equality'} + , testMap = new Map(); - testMap.set(aKey, 'aValue'); - testMap.set(anotherKey, 'anotherValue'); + testMap.set(aKey, 'aValue'); + testMap.set(anotherKey, 'anotherValue'); - expect(testMap).to.have.any.keys(aKey); - expect(testMap).to.have.any.keys('thisDoesNotExist', 'thisToo', aKey); - expect(testMap).to.have.all.keys(aKey, anotherKey); + expect(testMap).to.have.any.keys(aKey); + expect(testMap).to.have.any.keys('thisDoesNotExist', 'thisToo', aKey); + expect(testMap).to.have.all.keys(aKey, anotherKey); - expect(testMap).to.contain.all.keys(aKey); - expect(testMap).to.not.contain.all.keys(aKey, 'thisDoesNotExist'); + expect(testMap).to.contain.all.keys(aKey); + expect(testMap).to.not.contain.all.keys(aKey, 'thisDoesNotExist'); - expect(testMap).to.not.have.any.keys({iDoNot: 'exist'}); - expect(testMap).to.not.have.any.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); - expect(testMap).to.not.have.all.keys('thisDoesNotExist', 'thisToo', anotherKey); + expect(testMap).to.not.have.any.keys({iDoNot: 'exist'}); + expect(testMap).to.not.have.any.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); + expect(testMap).to.not.have.all.keys('thisDoesNotExist', 'thisToo', anotherKey); - expect(testMap).to.have.any.keys([aKey]); - expect(testMap).to.have.any.keys([20, 1, aKey]); - expect(testMap).to.have.all.keys([aKey, anotherKey]); + expect(testMap).to.have.any.keys([aKey]); + expect(testMap).to.have.any.keys([20, 1, aKey]); + expect(testMap).to.have.all.keys([aKey, anotherKey]); - expect(testMap).to.not.have.any.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); - expect(testMap).to.not.have.any.keys([20, 1, {13: 37}]); - expect(testMap).to.not.have.all.keys([aKey, {'iDoNot': 'exist'}]); + expect(testMap).to.not.have.any.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); + expect(testMap).to.not.have.any.keys([20, 1, {13: 37}]); + expect(testMap).to.not.have.all.keys([aKey, {'iDoNot': 'exist'}]); - // Ensure the assertions above use strict equality - err(function() { - expect(testMap).to.have.any.keys({thisIs: 'anExampleObject'}); - }); + // Ensure the assertions above use strict equality + err(function() { + expect(testMap).to.have.any.keys({thisIs: 'anExampleObject'}); + }); - err(function() { - expect(testMap).to.have.all.keys({thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}); - }); + err(function() { + expect(testMap).to.have.all.keys({thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}); + }); - err(function() { - expect(testMap).to.contain.all.keys({thisIs: 'anExampleObject'}); - }); + err(function() { + expect(testMap).to.contain.all.keys({thisIs: 'anExampleObject'}); + }); - err(function() { - expect(testMap).to.have.any.keys([{thisIs: 'anExampleObject'}]); - }); + err(function() { + expect(testMap).to.have.any.keys([{thisIs: 'anExampleObject'}]); + }); - err(function() { - expect(testMap).to.have.all.keys([{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - }); + err(function() { + expect(testMap).to.have.all.keys([{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + }); - // Using the same assertions as above but with `.deep` flag instead of using referential equality - expect(testMap).to.have.any.deep.keys({thisIs: 'anExampleObject'}); - expect(testMap).to.have.any.deep.keys('thisDoesNotExist', 'thisToo', {thisIs: 'anExampleObject'}); + // Using the same assertions as above but with `.deep` flag instead of using referential equality + expect(testMap).to.have.any.deep.keys({thisIs: 'anExampleObject'}); + expect(testMap).to.have.any.deep.keys('thisDoesNotExist', 'thisToo', {thisIs: 'anExampleObject'}); - expect(testMap).to.contain.all.deep.keys({thisIs: 'anExampleObject'}); - expect(testMap).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist'); + expect(testMap).to.contain.all.deep.keys({thisIs: 'anExampleObject'}); + expect(testMap).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist'); - expect(testMap).to.not.have.any.deep.keys({iDoNot: 'exist'}); - expect(testMap).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); - expect(testMap).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality'}); + expect(testMap).to.not.have.any.deep.keys({iDoNot: 'exist'}); + expect(testMap).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); + expect(testMap).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality'}); - expect(testMap).to.have.any.deep.keys([{thisIs: 'anExampleObject'}]); - expect(testMap).to.have.any.deep.keys([20, 1, {thisIs: 'anExampleObject'}]); + expect(testMap).to.have.any.deep.keys([{thisIs: 'anExampleObject'}]); + expect(testMap).to.have.any.deep.keys([20, 1, {thisIs: 'anExampleObject'}]); - expect(testMap).to.have.all.deep.keys({thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}); + expect(testMap).to.have.all.deep.keys({thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}); - expect(testMap).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); - expect(testMap).to.not.have.any.deep.keys([20, 1, {13: 37}]); - expect(testMap).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]); + expect(testMap).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); + expect(testMap).to.not.have.any.deep.keys([20, 1, {13: 37}]); + expect(testMap).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]); - var weirdMapKey1 = Object.create(null) - , weirdMapKey2 = {toString: NaN} - , weirdMapKey3 = [] - , weirdMap = new Map(); + var weirdMapKey1 = Object.create(null) + , weirdMapKey2 = {toString: NaN} + , weirdMapKey3 = [] + , weirdMap = new Map(); - weirdMap.set(weirdMapKey1, 'val1'); - weirdMap.set(weirdMapKey2, 'val2'); + weirdMap.set(weirdMapKey1, 'val1'); + weirdMap.set(weirdMapKey2, 'val2'); - expect(weirdMap).to.have.all.keys([weirdMapKey1, weirdMapKey2]); - expect(weirdMap).to.not.have.all.keys([weirdMapKey1, weirdMapKey3]); + expect(weirdMap).to.have.all.keys([weirdMapKey1, weirdMapKey2]); + expect(weirdMap).to.not.have.all.keys([weirdMapKey1, weirdMapKey3]); - if (typeof Symbol === 'function') { - var symMapKey1 = Symbol() - , symMapKey2 = Symbol() - , symMapKey3 = Symbol() - , symMap = new Map(); + var symMapKey1 = Symbol() + , symMapKey2 = Symbol() + , symMapKey3 = Symbol() + , symMap = new Map(); - symMap.set(symMapKey1, 'val1'); - symMap.set(symMapKey2, 'val2'); + symMap.set(symMapKey1, 'val1'); + symMap.set(symMapKey2, 'val2'); - expect(symMap).to.have.all.keys(symMapKey1, symMapKey2); - expect(symMap).to.have.any.keys(symMapKey1, symMapKey3); - expect(symMap).to.contain.all.keys(symMapKey2, symMapKey1); - expect(symMap).to.contain.any.keys(symMapKey3, symMapKey1); + expect(symMap).to.have.all.keys(symMapKey1, symMapKey2); + expect(symMap).to.have.any.keys(symMapKey1, symMapKey3); + expect(symMap).to.contain.all.keys(symMapKey2, symMapKey1); + expect(symMap).to.contain.any.keys(symMapKey3, symMapKey1); - expect(symMap).to.not.have.all.keys(symMapKey1, symMapKey3); - expect(symMap).to.not.have.any.keys(symMapKey3); - expect(symMap).to.not.contain.all.keys(symMapKey3, symMapKey1); - expect(symMap).to.not.contain.any.keys(symMapKey3); - } + expect(symMap).to.not.have.all.keys(symMapKey1, symMapKey3); + expect(symMap).to.not.have.any.keys(symMapKey3); + expect(symMap).to.not.contain.all.keys(symMapKey3, symMapKey1); + expect(symMap).to.not.contain.any.keys(symMapKey3); - var errMap = new Map(); + var errMap = new Map(); - errMap.set({ foo: 1 }); + errMap.set({ foo: 1 }); - err(function(){ - expect(errMap, 'blah').to.have.keys(); - }, "blah: keys required"); + err(function(){ + expect(errMap, 'blah').to.have.keys(); + }, "blah: keys required"); - err(function(){ - expect(errMap).to.have.keys([]); - }, "keys required"); + err(function(){ + expect(errMap).to.have.keys([]); + }, "keys required"); - err(function(){ - expect(errMap).to.contain.keys(); - }, "keys required"); + err(function(){ + expect(errMap).to.contain.keys(); + }, "keys required"); - err(function(){ - expect(errMap).to.contain.keys([]); - }, "keys required"); - - // Uncomment this after solving https://github.com/chaijs/chai/issues/662 - // This should fail because of referential equality (this is a strict comparison) - // err(function(){ - // expect(new Map([[{foo: 1}, 'bar']])).to.contain.keys({ foo: 1 }); - // }, 'expected [ [ { foo: 1 }, 'bar' ] ] to contain key { foo: 1 }'); - - // err(function(){ - // expect(new Map([[{foo: 1}, 'bar']])).to.contain.deep.keys({ iDoNotExist: 0 }) - // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - } + err(function(){ + expect(errMap).to.contain.keys([]); + }, "keys required"); - if (typeof Set !== 'undefined') { - // Not using Set constructor args because not supported in IE 11. - var aKey = {thisIs: 'anExampleObject'} - , anotherKey = {doingThisBecauseOf: 'referential equality'} - , testSet = new Set(); + // Uncomment this after solving https://github.com/chaijs/chai/issues/662 + // This should fail because of referential equality (this is a strict comparison) + // err(function(){ + // expect(new Map([[{foo: 1}, 'bar']])).to.contain.keys({ foo: 1 }); + // }, 'expected [ [ { foo: 1 }, 'bar' ] ] to contain key { foo: 1 }'); - testSet.add(aKey); - testSet.add(anotherKey); + // err(function(){ + // expect(new Map([[{foo: 1}, 'bar']])).to.contain.deep.keys({ iDoNotExist: 0 }) + // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - expect(testSet).to.have.any.keys(aKey); - expect(testSet).to.have.any.keys('thisDoesNotExist', 'thisToo', aKey); - expect(testSet).to.have.all.keys(aKey, anotherKey); + // Not using Set constructor args because not supported in IE 11. + var aKey = {thisIs: 'anExampleObject'} + , anotherKey = {doingThisBecauseOf: 'referential equality'} + , testSet = new Set(); - expect(testSet).to.contain.all.keys(aKey); - expect(testSet).to.not.contain.all.keys(aKey, 'thisDoesNotExist'); + testSet.add(aKey); + testSet.add(anotherKey); - expect(testSet).to.not.have.any.keys({iDoNot: 'exist'}); - expect(testSet).to.not.have.any.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); - expect(testSet).to.not.have.all.keys('thisDoesNotExist', 'thisToo', anotherKey); + expect(testSet).to.have.any.keys(aKey); + expect(testSet).to.have.any.keys('thisDoesNotExist', 'thisToo', aKey); + expect(testSet).to.have.all.keys(aKey, anotherKey); - expect(testSet).to.have.any.keys([aKey]); - expect(testSet).to.have.any.keys([20, 1, aKey]); - expect(testSet).to.have.all.keys([aKey, anotherKey]); + expect(testSet).to.contain.all.keys(aKey); + expect(testSet).to.not.contain.all.keys(aKey, 'thisDoesNotExist'); - expect(testSet).to.not.have.any.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); - expect(testSet).to.not.have.any.keys([20, 1, {13: 37}]); - expect(testSet).to.not.have.all.keys([aKey, {'iDoNot': 'exist'}]); + expect(testSet).to.not.have.any.keys({iDoNot: 'exist'}); + expect(testSet).to.not.have.any.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); + expect(testSet).to.not.have.all.keys('thisDoesNotExist', 'thisToo', anotherKey); - // Ensure the assertions above use strict equality - err(function() { - expect(testSet).to.have.any.keys({thisIs: 'anExampleObject'}); - }); + expect(testSet).to.have.any.keys([aKey]); + expect(testSet).to.have.any.keys([20, 1, aKey]); + expect(testSet).to.have.all.keys([aKey, anotherKey]); - err(function() { - expect(testSet).to.have.all.keys({thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}); - }); + expect(testSet).to.not.have.any.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); + expect(testSet).to.not.have.any.keys([20, 1, {13: 37}]); + expect(testSet).to.not.have.all.keys([aKey, {'iDoNot': 'exist'}]); - err(function() { - expect(testSet).to.contain.all.keys({thisIs: 'anExampleObject'}); - }); + // Ensure the assertions above use strict equality + err(function() { + expect(testSet).to.have.any.keys({thisIs: 'anExampleObject'}); + }); - err(function() { - expect(testSet).to.have.any.keys([{thisIs: 'anExampleObject'}]); - }); + err(function() { + expect(testSet).to.have.all.keys({thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}); + }); - err(function() { - expect(testSet).to.have.all.keys([{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - }); + err(function() { + expect(testSet).to.contain.all.keys({thisIs: 'anExampleObject'}); + }); - // Using the same assertions as above but with `.deep` flag instead of using referential equality - expect(testSet).to.have.any.deep.keys({thisIs: 'anExampleObject'}); - expect(testSet).to.have.any.deep.keys('thisDoesNotExist', 'thisToo', {thisIs: 'anExampleObject'}); + err(function() { + expect(testSet).to.have.any.keys([{thisIs: 'anExampleObject'}]); + }); - expect(testSet).to.contain.all.deep.keys({thisIs: 'anExampleObject'}); - expect(testSet).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist'); + err(function() { + expect(testSet).to.have.all.keys([{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + }); - expect(testSet).to.not.have.any.deep.keys({iDoNot: 'exist'}); - expect(testSet).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); - expect(testSet).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality'}); + // Using the same assertions as above but with `.deep` flag instead of using referential equality + expect(testSet).to.have.any.deep.keys({thisIs: 'anExampleObject'}); + expect(testSet).to.have.any.deep.keys('thisDoesNotExist', 'thisToo', {thisIs: 'anExampleObject'}); - expect(testSet).to.have.any.deep.keys([{thisIs: 'anExampleObject'}]); - expect(testSet).to.have.any.deep.keys([20, 1, {thisIs: 'anExampleObject'}]); + expect(testSet).to.contain.all.deep.keys({thisIs: 'anExampleObject'}); + expect(testSet).to.not.contain.all.deep.keys({thisIs: 'anExampleObject'}, 'thisDoesNotExist'); - expect(testSet).to.have.all.deep.keys([{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); + expect(testSet).to.not.have.any.deep.keys({iDoNot: 'exist'}); + expect(testSet).to.not.have.any.deep.keys('thisIsNotAkey', {iDoNot: 'exist'}, {33: 20}); + expect(testSet).to.not.have.all.deep.keys('thisDoesNotExist', 'thisToo', {doingThisBecauseOf: 'referential equality'}); - expect(testSet).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); - expect(testSet).to.not.have.any.deep.keys([20, 1, {13: 37}]); - expect(testSet).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]); + expect(testSet).to.have.any.deep.keys([{thisIs: 'anExampleObject'}]); + expect(testSet).to.have.any.deep.keys([20, 1, {thisIs: 'anExampleObject'}]); - var weirdSetKey1 = Object.create(null) - , weirdSetKey2 = {toString: NaN} - , weirdSetKey3 = [] - , weirdSet = new Set(); + expect(testSet).to.have.all.deep.keys([{thisIs: 'anExampleObject'}, {doingThisBecauseOf: 'referential equality'}]); - weirdSet.add(weirdSetKey1); - weirdSet.add(weirdSetKey2); + expect(testSet).to.not.have.any.deep.keys([{13: 37}, 'thisDoesNotExist', 'thisToo']); + expect(testSet).to.not.have.any.deep.keys([20, 1, {13: 37}]); + expect(testSet).to.not.have.all.deep.keys([{thisIs: 'anExampleObject'}, {'iDoNot': 'exist'}]); - expect(weirdSet).to.have.all.keys([weirdSetKey1, weirdSetKey2]); - expect(weirdSet).to.not.have.all.keys([weirdSetKey1, weirdSetKey3]); + var weirdSetKey1 = Object.create(null) + , weirdSetKey2 = {toString: NaN} + , weirdSetKey3 = [] + , weirdSet = new Set(); - if (typeof Symbol === 'function') { - var symSetKey1 = Symbol() - , symSetKey2 = Symbol() - , symSetKey3 = Symbol() - , symSet = new Set(); + weirdSet.add(weirdSetKey1); + weirdSet.add(weirdSetKey2); - symSet.add(symSetKey1); - symSet.add(symSetKey2); + expect(weirdSet).to.have.all.keys([weirdSetKey1, weirdSetKey2]); + expect(weirdSet).to.not.have.all.keys([weirdSetKey1, weirdSetKey3]); - expect(symSet).to.have.all.keys(symSetKey1, symSetKey2); - expect(symSet).to.have.any.keys(symSetKey1, symSetKey3); - expect(symSet).to.contain.all.keys(symSetKey2, symSetKey1); - expect(symSet).to.contain.any.keys(symSetKey3, symSetKey1); + var symSetKey1 = Symbol() + , symSetKey2 = Symbol() + , symSetKey3 = Symbol() + , symSet = new Set(); - expect(symSet).to.not.have.all.keys(symSetKey1, symSetKey3); - expect(symSet).to.not.have.any.keys(symSetKey3); - expect(symSet).to.not.contain.all.keys(symSetKey3, symSetKey1); - expect(symSet).to.not.contain.any.keys(symSetKey3); - } + symSet.add(symSetKey1); + symSet.add(symSetKey2); - var errSet = new Set(); - errSet.add({ foo: 1}); + expect(symSet).to.have.all.keys(symSetKey1, symSetKey2); + expect(symSet).to.have.any.keys(symSetKey1, symSetKey3); + expect(symSet).to.contain.all.keys(symSetKey2, symSetKey1); + expect(symSet).to.contain.any.keys(symSetKey3, symSetKey1); - err(function(){ - expect(errSet, 'blah').to.have.keys(); - }, "blah: keys required"); + expect(symSet).to.not.have.all.keys(symSetKey1, symSetKey3); + expect(symSet).to.not.have.any.keys(symSetKey3); + expect(symSet).to.not.contain.all.keys(symSetKey3, symSetKey1); + expect(symSet).to.not.contain.any.keys(symSetKey3); - err(function(){ - expect(errSet).to.have.keys([]); - }, "keys required"); + var errSet = new Set(); + errSet.add({ foo: 1}); - err(function(){ - expect(errSet).to.contain.keys(); - }, "keys required"); + err(function(){ + expect(errSet, 'blah').to.have.keys(); + }, "blah: keys required"); - err(function(){ - expect(errSet).to.contain.keys([]); - }, "keys required"); - - // Uncomment this after solving https://github.com/chaijs/chai/issues/662 - // This should fail because of referential equality (this is a strict comparison) - // err(function(){ - // expect(new Set([{foo: 1}])).to.contain.keys({ foo: 1 }); - // }, 'expected [ { foo: 1 } ] to deeply contain key { foo: 1 }'); - - // err(function(){ - // expect(new Set([{foo: 1}])).to.contain.deep.keys({ iDoNotExist: 0 }); - // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); - } + err(function(){ + expect(errSet).to.have.keys([]); + }, "keys required"); + + err(function(){ + expect(errSet).to.contain.keys(); + }, "keys required"); + + err(function(){ + expect(errSet).to.contain.keys([]); + }, "keys required"); + + // Uncomment this after solving https://github.com/chaijs/chai/issues/662 + // This should fail because of referential equality (this is a strict comparison) + // err(function(){ + // expect(new Set([{foo: 1}])).to.contain.keys({ foo: 1 }); + // }, 'expected [ { foo: 1 } ] to deeply contain key { foo: 1 }'); + + // err(function(){ + // expect(new Set([{foo: 1}])).to.contain.deep.keys({ iDoNotExist: 0 }); + // }, 'expected [ { foo: 1 } ] to deeply contain key { iDoNotExist: 0 }'); err(function(){ expect({ foo: 1 }, 'blah').to.have.keys(); @@ -3873,9 +3801,7 @@ describe('expect', function () { expect(false).to.not.be.extensible; expect(undefined).to.not.be.extensible; - if (typeof Symbol === 'function') { - expect(Symbol()).to.not.be.extensible; - } + expect(Symbol()).to.not.be.extensible; err(function() { expect(42).to.be.extensible; @@ -3897,18 +3823,16 @@ describe('expect', function () { expect(undefined).to.be.extensible; }, 'expected undefined to be extensible'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - isExtensible: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + isExtensible: function() { + throw new TypeError(); + } + }); - err(function() { - // .extensible should not suppress errors, thrown in proxy traps - expect(proxy).to.be.extensible; - }, { name: 'TypeError' }, true); - } + err(function() { + // .extensible should not suppress errors, thrown in proxy traps + expect(proxy).to.be.extensible; + }, { name: 'TypeError' }, true); }); it('sealed', function() { @@ -3932,10 +3856,7 @@ describe('expect', function () { expect('foo').to.be.sealed; expect(false).to.be.sealed; expect(undefined).to.be.sealed; - - if (typeof Symbol === 'function') { - expect(Symbol()).to.be.sealed; - } + expect(Symbol()).to.be.sealed; err(function() { expect(42).to.not.be.sealed; @@ -3957,21 +3878,19 @@ describe('expect', function () { expect(undefined).to.not.be.sealed; }, 'expected undefined to not be sealed'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isSealed will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isSealed will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // .sealed should not suppress errors, thrown in proxy traps - expect(proxy).to.be.sealed; - }, { name: 'TypeError' }, true); - } + err(function() { + // .sealed should not suppress errors, thrown in proxy traps + expect(proxy).to.be.sealed; + }, { name: 'TypeError' }, true); }); it('frozen', function() { @@ -3995,10 +3914,7 @@ describe('expect', function () { expect('foo').to.be.frozen; expect(false).to.be.frozen; expect(undefined).to.be.frozen; - - if (typeof Symbol === 'function') { - expect(Symbol()).to.be.frozen; - } + expect(Symbol()).to.be.frozen; err(function() { expect(42).to.not.be.frozen; @@ -4020,20 +3936,18 @@ describe('expect', function () { expect(undefined).to.not.be.frozen; }, 'expected undefined to not be frozen'); - if (typeof Proxy === 'function') { - var proxy = new Proxy({}, { - ownKeys: function() { - throw new TypeError(); - } - }); + var proxy = new Proxy({}, { + ownKeys: function() { + throw new TypeError(); + } + }); - // Object.isFrozen will call ownKeys trap only if object is not extensible - Object.preventExtensions(proxy); + // Object.isFrozen will call ownKeys trap only if object is not extensible + Object.preventExtensions(proxy); - err(function() { - // .frozen should not suppress errors, thrown in proxy traps - expect(proxy).to.be.frozen; - }, { name: 'TypeError' }, true); - } + err(function() { + // .frozen should not suppress errors, thrown in proxy traps + expect(proxy).to.be.frozen; + }, { name: 'TypeError' }, true); }); }); diff --git a/test/globalErr.js b/test/globalErr.js index a93f7738..d51b3fe8 100644 --- a/test/globalErr.js +++ b/test/globalErr.js @@ -186,12 +186,12 @@ describe('globalErr', function () { , undefined ]; - if (typeof Symbol === 'function') vals.push(Symbol()); - if (typeof Map === 'function') vals.push(new Map()); - if (typeof WeakMap === 'function') vals.push(new WeakMap()); - if (typeof Set === 'function') vals.push(new Set()); - if (typeof WeakSet === 'function') vals.push(new WeakSet()); - if (typeof Promise === 'function') vals.push(new Promise(noop)); + vals.push(Symbol()); + vals.push(new Map()); + vals.push(new Set()); + vals.push(new WeakMap()); + vals.push(new WeakSet()); + vals.push(new Promise(noop)); vals.forEach(function (val) { err(function () { err(val) }, 'Invalid fn') @@ -207,12 +207,12 @@ describe('globalErr', function () { , null ]; - if (typeof Symbol === 'function') vals.push(Symbol()); - if (typeof Map === 'function') vals.push(new Map()); - if (typeof WeakMap === 'function') vals.push(new WeakMap()); - if (typeof Set === 'function') vals.push(new Set()); - if (typeof WeakSet === 'function') vals.push(new WeakSet()); - if (typeof Promise === 'function') vals.push(new Promise(noop)); + vals.push(Symbol()); + vals.push(new Map()); + vals.push(new WeakMap()); + vals.push(new Set()); + vals.push(new WeakSet()); + vals.push(new Promise(noop)); vals.forEach(function (val) { err(function () { diff --git a/test/should.js b/test/should.js index adb94d94..f205b023 100644 --- a/test/should.js +++ b/test/should.js @@ -585,10 +585,10 @@ describe('should', function() { (1).should.have.lengthOf.within(5,7, 'blah'); }, "blah: expected 1 to have property 'length'"); - (new Map).should.have.length.within(0, 0); - (new Map).should.have.lengthOf.within(0, 0); + (new Map()).should.have.length.within(0, 0); + (new Map()).should.have.lengthOf.within(0, 0); - var map = new Map; + var map = new Map(); map.set('a', 1); map.set('b', 2); map.set('c', 3); @@ -604,10 +604,10 @@ describe('should', function() { map.should.have.lengthOf.within(5, 7, 'blah'); }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size within 5..7"); - (new Set).should.have.length.within(0, 0); - (new Set).should.have.lengthOf.within(0, 0); + (new Set()).should.have.length.within(0, 0); + (new Set()).should.have.lengthOf.within(0, 0); - var set = new Set; + var set = new Set(); set.add(1); set.add(2); set.add(3); @@ -728,10 +728,10 @@ describe('should', function() { (1).should.have.lengthOf.above(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - (new Map).should.have.length.above(-1); - (new Map).should.have.lengthOf.above(-1); + (new Map()).should.have.length.above(-1); + (new Map()).should.have.lengthOf.above(-1); - var map = new Map; + var map = new Map(); map.set('a', 1); map.set('b', 2); map.set('c', 3); @@ -747,10 +747,10 @@ describe('should', function() { map.should.have.lengthOf.above(5, 'blah'); }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size above 5 but got 3"); - (new Set).should.have.length.above(-1); - (new Set).should.have.lengthOf.above(-1); + (new Set()).should.have.length.above(-1); + (new Set()).should.have.lengthOf.above(-1); - var set = new Set; + var set = new Set(); set.add(1); set.add(2); set.add(3); @@ -846,10 +846,10 @@ describe('should', function() { (1).should.not.be.at.least(null, 'blah'); }, "blah: the argument to least must be a number"); - (new Map).should.have.length.of.at.least(0); - (new Map).should.have.lengthOf.at.least(0); + (new Map()).should.have.length.of.at.least(0); + (new Map()).should.have.lengthOf.at.least(0); - var map = new Map; + var map = new Map(); map.set('a', 1); map.set('b', 2); map.set('c', 3); @@ -865,10 +865,10 @@ describe('should', function() { map.should.have.lengthOf.at.least(4, 'blah'); }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at least 4 but got 3"); - (new Set).should.have.length.of.at.least(0); - (new Set).should.have.lengthOf.at.least(0); + (new Set()).should.have.length.of.at.least(0); + (new Set()).should.have.lengthOf.at.least(0); - var set = new Set; + var set = new Set(); set.add(1); set.add(2); set.add(3); @@ -931,10 +931,10 @@ describe('should', function() { (1).should.have.lengthOf.below(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - (new Map).should.have.length.below(1); - (new Map).should.have.lengthOf.below(1); + (new Map()).should.have.length.below(1); + (new Map()).should.have.lengthOf.below(1); - var map = new Map; + var map = new Map(); map.set('a', 1); map.set('b', 2); map.set('c', 3); @@ -950,10 +950,10 @@ describe('should', function() { map.should.have.lengthOf.below(2, 'blah'); }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size below 2 but got 3"); - (new Set).should.have.length.below(1); - (new Set).should.have.lengthOf.below(1); + (new Set()).should.have.length.below(1); + (new Set()).should.have.lengthOf.below(1); - var set = new Set; + var set = new Set(); set.add(1); set.add(2); set.add(3); @@ -1057,10 +1057,10 @@ describe('should', function() { (1).should.have.lengthOf.at.most(0, 'blah'); }, "blah: expected 1 to have property 'length'"); - (new Map).should.have.length.of.at.most(0); - (new Map).should.have.lengthOf.at.most(0); + (new Map()).should.have.length.of.at.most(0); + (new Map()).should.have.lengthOf.at.most(0); - var map = new Map; + var map = new Map(); map.set('a', 1); map.set('b', 2); map.set('c', 3); @@ -1076,10 +1076,10 @@ describe('should', function() { map.should.have.lengthOf.at.most(2, 'blah'); }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to have a size at most 2 but got 3"); - (new Set).should.have.length.of.at.most(0); - (new Set).should.have.lengthOf.at.most(0); + (new Set()).should.have.length.of.at.most(0); + (new Set()).should.have.lengthOf.at.most(0); - var set = new Set; + var set = new Set(); set.add(1); set.add(2); set.add(3); @@ -1186,10 +1186,10 @@ describe('should', function() { 'asd'.should.not.have.lengthOf(3, 'blah'); }, "blah: expected 'asd' to not have a length of 3"); - (new Map).should.have.length(0); - (new Map).should.have.lengthOf(0); + (new Map()).should.have.length(0); + (new Map()).should.have.lengthOf(0); - var map = new Map; + var map = new Map(); map.set('a', 1); map.set('b', 2); map.set('c', 3); @@ -1205,10 +1205,10 @@ describe('should', function() { map.should.not.have.lengthOf(3, 'blah'); }, "blah: expected Map{ 'a' => 1, 'b' => 2, 'c' => 3 } to not have a size of 3"); - (new Set).should.have.length(0); - (new Set).should.have.lengthOf(0); + (new Set()).should.have.length(0); + (new Set()).should.have.lengthOf(0); - var set = new Set; + var set = new Set(); set.add(1); set.add(2); set.add(3); @@ -1291,31 +1291,31 @@ describe('should', function() { 'foo'.should.not.be.empty; ([]).should.be.empty; (['foo']).should.not.be.empty; - (new FakeArgs).should.be.empty; + (new FakeArgs()).should.be.empty; ({arguments: 0}).should.not.be.empty; ({}).should.be.empty; ({foo: 'bar'}).should.not.be.empty; err(function(){ - (new WeakMap).should.not.be.empty; + (new WeakMap()).should.not.be.empty; }, ".empty was passed a weak collection"); err(function(){ - (new WeakSet).should.not.be.empty; + (new WeakSet()).should.not.be.empty; }, ".empty was passed a weak collection"); - (new Map).should.be.empty; + (new Map()).should.be.empty; // Not using Map constructor args because not supported in IE 11. - var map = new Map; + var map = new Map(); map.set('a', 1); map.should.not.be.empty; err(function(){ - (new Map).should.not.be.empty; + (new Map()).should.not.be.empty; }, "expected Map{} not to be empty"); - map = new Map; + map = new Map(); map.key = 'val'; map.should.be.empty; @@ -1323,18 +1323,18 @@ describe('should', function() { map.should.not.be.empty; }, "expected Map{} not to be empty"); - (new Set).should.be.empty; + (new Set()).should.be.empty; // Not using Set constructor args because not supported in IE 11. - var set = new Set; + var set = new Set(); set.add(1); set.should.not.be.empty; err(function(){ - (new Set).should.not.be.empty; + (new Set()).should.not.be.empty; }, "expected Set{} not to be empty"); - set = new Set; + set = new Set(); set.key = 'val'; set.should.be.empty; @@ -1359,7 +1359,7 @@ describe('should', function() { }, "expected [ \'foo\' ] to be empty"); err(function(){ - (new FakeArgs).should.not.be.empty; + (new FakeArgs()).should.not.be.empty; }, "expected FakeArgs{} not to be empty"); err(function(){ @@ -1390,15 +1390,13 @@ describe('should', function() { false.should.be.empty; }, ".empty was passed non-string primitive false"); - if (typeof Symbol !== 'undefined') { - err(function(){ - Symbol().should.be.empty; - }, ".empty was passed non-string primitive Symbol()"); + err(function(){ + Symbol().should.be.empty; + }, ".empty was passed non-string primitive Symbol()"); - err(function(){ - Symbol.iterator.should.be.empty; - }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); - } + err(function(){ + Symbol.iterator.should.be.empty; + }, ".empty was passed non-string primitive Symbol(Symbol.iterator)"); err(function(){ (function() {}).should.be.empty; @@ -1812,13 +1810,10 @@ describe('should', function() { // .include should work with Error objects and objects with a custom // `@@toStringTag`. (new Error('foo')).should.include({message: 'foo'}); - if (typeof Symbol !== 'undefined' - && typeof Symbol.toStringTag !== 'undefined') { - var customObj = {a: 1}; - customObj[Symbol.toStringTag] = 'foo'; + var customObj = {a: 1}; + customObj[Symbol.toStringTag] = 'foo'; - customObj.should.include({a: 1}); - } + customObj.should.include({a: 1}); ({a: 1}).should.include({'toString': Object.prototype.toString}); diff --git a/test/utilities.js b/test/utilities.js index 5a00da46..3e956352 100644 --- a/test/utilities.js +++ b/test/utilities.js @@ -750,8 +750,6 @@ describe('utilities', function () { }); it('inspect Symbol', function () { - if (typeof Symbol !== 'function') return; - chai.use(function (_chai, _) { expect(_.inspect(Symbol())).to.equal('Symbol()'); expect(_.inspect(Symbol('cat'))).to.equal('Symbol(cat)'); @@ -759,8 +757,6 @@ describe('utilities', function () { }); it('inspect BigInt', function () { - if (typeof BigInt !== 'function') return; - chai.use(function (_chai, _) { expect(_.inspect(BigInt(0))).to.equal('0n'); expect(_.inspect(BigInt(1234))).to.equal('1234n'); @@ -1089,11 +1085,9 @@ describe('utilities', function () { expect(cbi({'cat': [['dog', 1]]}, {'cat': [['dog', 2]]})).to.equal(-1); expect(cbi({'cat': [['dog', 2]]}, {'cat': [['dog', 1]]})).to.equal(1); - if (typeof Symbol === 'function') { - // "Symbol(c" is less than "Symbol(d" - expect(cbi(Symbol('cat'), Symbol('dog'))).to.equal(-1); - expect(cbi(Symbol('dog'), Symbol('cat'))).to.equal(1); - } + // "Symbol(c" is less than "Symbol(d" + expect(cbi(Symbol('cat'), Symbol('dog'))).to.equal(-1); + expect(cbi(Symbol('dog'), Symbol('cat'))).to.equal(1); }); }); @@ -1116,8 +1110,6 @@ describe('utilities', function () { }); it('returns enumerable symbols only', function () { - if (typeof Symbol !== 'function') return; - var cat = Symbol('cat') , dog = Symbol('dog') , frog = Symbol('frog') @@ -1165,8 +1157,6 @@ describe('utilities', function () { }); it('returns enumerable property names and symbols', function () { - if (typeof Symbol !== 'function') return; - var cat = Symbol('cat') , dog = Symbol('dog') , frog = Symbol('frog') @@ -1193,8 +1183,6 @@ describe('utilities', function () { }); describe('proxified object', function () { - if (typeof Proxy === 'undefined' || typeof Reflect === 'undefined') return; - var proxify; beforeEach(function () { @@ -1324,27 +1312,15 @@ describe('utilities', function () { chai.config.useProxy = origUseProxy; }); - if (typeof Proxy !== 'undefined' && typeof Reflect !== 'undefined') { - it("returns true if Proxy and Reflect are defined, and useProxy is true", function () { - expect(isProxyEnabled()).to.be.true; - }); - - it("returns false if Proxy and Reflect are defined, and useProxy is false", function () { - chai.config.useProxy = false; - - expect(isProxyEnabled()).to.be.false; - }); - } else { - it("returns false if Proxy and/or Reflect are undefined, and useProxy is true", function () { - expect(isProxyEnabled()).to.be.false; - }); + it("returns true if Proxy and Reflect are defined, and useProxy is true", function () { + expect(isProxyEnabled()).to.be.true; + }); - it("returns false if Proxy and/or Reflect are undefined, and useProxy is false", function () { - chai.config.useProxy = false; + it("returns false if Proxy and Reflect are defined, and useProxy is false", function () { + chai.config.useProxy = false; - expect(isProxyEnabled()).to.be.false; - }); - } + expect(isProxyEnabled()).to.be.false; + }); }); describe('getOperator', function() { From e7f768e1d6061cf9efc5872f3420b58614883a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 1 Feb 2024 07:50:39 +0100 Subject: [PATCH 13/30] Cleanup jsdoc comments (#1596) * Remove unused import * Replace unknown tag `@api public` with `@public` * Remove empty line between jsdoc comment and function * Replace all instance of type `Mixed` with `unknown` * Set correct namespace for expect --- lib/chai/interface/assert.js | 560 +++++++++++++---------------------- lib/chai/interface/expect.js | 10 +- lib/chai/interface/should.js | 33 +-- 3 files changed, 232 insertions(+), 371 deletions(-) diff --git a/lib/chai/interface/assert.js b/lib/chai/interface/assert.js index 24ceff36..e802e79a 100644 --- a/lib/chai/interface/assert.js +++ b/lib/chai/interface/assert.js @@ -8,7 +8,6 @@ import * as chai from '../../../index.js'; import {Assertion} from '../assertion.js'; import {flag, inspect} from '../utils/index.js'; import {AssertionError} from 'assertion-error'; -import {type} from '../utils/type-detect.js'; /** * ### assert(expression, message) @@ -18,13 +17,12 @@ import {type} from '../utils/type-detect.js'; * assert('foo' !== 'bar', 'foo is not bar'); * assert(Array.isArray([]), 'empty arrays are arrays'); * - * @param {Mixed} expression to test for truthiness + * @param {unknown} expression to test for truthiness * @param {String} message to display on error * @name assert * @namespace Assert - * @api public + * @public */ - function assert(express, errmsg) { var test = new Assertion(null, null, chai.assert, true); test.assert( @@ -50,14 +48,13 @@ export {assert}; * assert.fail(1, 2, undefined, ">"); * * @name fail - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @param {String} operator * @namespace Assert - * @api public + * @public */ - assert.fail = function (actual, expected, message, operator) { if (arguments.length < 2) { // Comply with Node's fail([message]) interface @@ -84,12 +81,11 @@ assert.fail = function (actual, expected, message, operator) { * * @name isOk * @alias ok - * @param {Mixed} object to test + * @param {unknown} object to test * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isOk = function (val, msg) { new Assertion(val, msg, assert.isOk, true).is.ok; }; @@ -104,12 +100,11 @@ assert.isOk = function (val, msg) { * * @name isNotOk * @alias notOk - * @param {Mixed} object to test + * @param {unknown} object to test * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotOk = function (val, msg) { new Assertion(val, msg, assert.isNotOk, true).is.not.ok; }; @@ -122,13 +117,12 @@ assert.isNotOk = function (val, msg) { * assert.equal(3, '3', '== coerces values to strings'); * * @name equal - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.equal = function (act, exp, msg) { var test = new Assertion(act, msg, assert.equal, true); @@ -150,13 +144,12 @@ assert.equal = function (act, exp, msg) { * assert.notEqual(3, 4, 'these numbers are not equal'); * * @name notEqual - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notEqual = function (act, exp, msg) { var test = new Assertion(act, msg, assert.notEqual, true); @@ -178,13 +171,12 @@ assert.notEqual = function (act, exp, msg) { * assert.strictEqual(true, true, 'these booleans are strictly equal'); * * @name strictEqual - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.strictEqual = function (act, exp, msg) { new Assertion(act, msg, assert.strictEqual, true).to.equal(exp); }; @@ -197,13 +189,12 @@ assert.strictEqual = function (act, exp, msg) { * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); * * @name notStrictEqual - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notStrictEqual = function (act, exp, msg) { new Assertion(act, msg, assert.notStrictEqual, true).to.not.equal(exp); }; @@ -216,14 +207,13 @@ assert.notStrictEqual = function (act, exp, msg) { * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); * * @name deepEqual - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @alias deepStrictEqual * @namespace Assert - * @api public + * @public */ - assert.deepEqual = assert.deepStrictEqual = function (act, exp, msg) { new Assertion(act, msg, assert.deepEqual, true).to.eql(exp); }; @@ -236,13 +226,12 @@ assert.deepEqual = assert.deepStrictEqual = function (act, exp, msg) { * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); * * @name notDeepEqual - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notDeepEqual = function (act, exp, msg) { new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp); }; @@ -255,13 +244,12 @@ assert.notDeepEqual = function (act, exp, msg) { * assert.isAbove(5, 2, '5 is strictly greater than 2'); * * @name isAbove - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAbove + * @param {unknown} valueToCheck + * @param {unknown} valueToBeAbove * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isAbove = function (val, abv, msg) { new Assertion(val, msg, assert.isAbove, true).to.be.above(abv); }; @@ -275,13 +263,12 @@ assert.isAbove = function (val, abv, msg) { * assert.isAtLeast(3, 3, '3 is greater or equal to 3'); * * @name isAtLeast - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAtLeast + * @param {unknown} valueToCheck + * @param {unknown} valueToBeAtLeast * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isAtLeast = function (val, atlst, msg) { new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst); }; @@ -294,13 +281,12 @@ assert.isAtLeast = function (val, atlst, msg) { * assert.isBelow(3, 6, '3 is strictly less than 6'); * * @name isBelow - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeBelow + * @param {unknown} valueToCheck + * @param {unknown} valueToBeBelow * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isBelow = function (val, blw, msg) { new Assertion(val, msg, assert.isBelow, true).to.be.below(blw); }; @@ -314,13 +300,12 @@ assert.isBelow = function (val, blw, msg) { * assert.isAtMost(4, 4, '4 is less than or equal to 4'); * * @name isAtMost - * @param {Mixed} valueToCheck - * @param {Mixed} valueToBeAtMost + * @param {unknown} valueToCheck + * @param {unknown} valueToBeAtMost * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isAtMost = function (val, atmst, msg) { new Assertion(val, msg, assert.isAtMost, true).to.be.most(atmst); }; @@ -334,12 +319,11 @@ assert.isAtMost = function (val, atmst, msg) { * assert.isTrue(teaServed, 'the tea has been served'); * * @name isTrue - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isTrue = function (val, msg) { new Assertion(val, msg, assert.isTrue, true).is['true']; }; @@ -353,12 +337,11 @@ assert.isTrue = function (val, msg) { * assert.isNotTrue(tea, 'great, time for tea!'); * * @name isNotTrue - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotTrue = function (val, msg) { new Assertion(val, msg, assert.isNotTrue, true).to.not.equal(true); }; @@ -372,12 +355,11 @@ assert.isNotTrue = function (val, msg) { * assert.isFalse(teaServed, 'no tea yet? hmm...'); * * @name isFalse - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isFalse = function (val, msg) { new Assertion(val, msg, assert.isFalse, true).is['false']; }; @@ -391,12 +373,11 @@ assert.isFalse = function (val, msg) { * assert.isNotFalse(tea, 'great, time for tea!'); * * @name isNotFalse - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotFalse = function (val, msg) { new Assertion(val, msg, assert.isNotFalse, true).to.not.equal(false); }; @@ -409,12 +390,11 @@ assert.isNotFalse = function (val, msg) { * assert.isNull(err, 'there was no error'); * * @name isNull - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNull = function (val, msg) { new Assertion(val, msg, assert.isNull, true).to.equal(null); }; @@ -428,12 +408,11 @@ assert.isNull = function (val, msg) { * assert.isNotNull(tea, 'great, time for tea!'); * * @name isNotNull - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotNull = function (val, msg) { new Assertion(val, msg, assert.isNotNull, true).to.not.equal(null); }; @@ -446,12 +425,11 @@ assert.isNotNull = function (val, msg) { * assert.isNaN(NaN, 'NaN is NaN'); * * @name isNaN - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNaN = function (val, msg) { new Assertion(val, msg, assert.isNaN, true).to.be.NaN; }; @@ -464,12 +442,11 @@ assert.isNaN = function (val, msg) { * assert.isNotNaN(4, '4 is not NaN'); * * @name isNotNaN - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public - */ -assert.isNotNaN = function (val, msg) { + * @public + */assert.isNotNaN = function (val, msg) { new Assertion(val, msg, assert.isNotNaN, true).not.to.be.NaN; }; @@ -483,12 +460,11 @@ assert.isNotNaN = function (val, msg) { * assert.exists(foo, 'foo is neither `null` nor `undefined`'); * * @name exists - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.exists = function (val, msg) { new Assertion(val, msg, assert.exists, true).to.exist; }; @@ -505,12 +481,11 @@ assert.exists = function (val, msg) { * assert.notExists(baz, 'baz is either null or undefined'); * * @name notExists - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notExists = function (val, msg) { new Assertion(val, msg, assert.notExists, true).to.not.exist; }; @@ -524,12 +499,11 @@ assert.notExists = function (val, msg) { * assert.isUndefined(tea, 'no tea defined'); * * @name isUndefined - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isUndefined = function (val, msg) { new Assertion(val, msg, assert.isUndefined, true).to.equal(undefined); }; @@ -543,12 +517,11 @@ assert.isUndefined = function (val, msg) { * assert.isDefined(tea, 'tea has been defined'); * * @name isDefined - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isDefined = function (val, msg) { new Assertion(val, msg, assert.isDefined, true).to.not.equal(undefined); }; @@ -562,12 +535,11 @@ assert.isDefined = function (val, msg) { * assert.isCallable(serveTea, 'great, we can have tea now'); * * @name isCallable - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public - */ -assert.isCallable = function (val, msg) { + * @public + */assert.isCallable = function (val, msg) { new Assertion(val, msg, assert.isCallable, true).is.callable; } @@ -580,12 +552,11 @@ assert.isCallable = function (val, msg) { * assert.isNotCallable(serveTea, 'great, we have listed the steps'); * * @name isNotCallable - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public - */ -assert.isNotCallable = function (val, msg) { + * @public + */assert.isNotCallable = function (val, msg) { new Assertion(val, msg, assert.isNotCallable, true).is.not.callable; }; @@ -599,12 +570,11 @@ assert.isNotCallable = function (val, msg) { * assert.isObject(selection, 'tea selection is an object'); * * @name isObject - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isObject = function (val, msg) { new Assertion(val, msg, assert.isObject, true).to.be.a('object'); }; @@ -619,12 +589,11 @@ assert.isObject = function (val, msg) { * assert.isNotObject(null, 'null is not an object'); * * @name isNotObject - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotObject = function (val, msg) { new Assertion(val, msg, assert.isNotObject, true).to.not.be.a('object'); }; @@ -638,12 +607,11 @@ assert.isNotObject = function (val, msg) { * assert.isArray(menu, 'what kind of tea do we want?'); * * @name isArray - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isArray = function (val, msg) { new Assertion(val, msg, assert.isArray, true).to.be.an('array'); }; @@ -657,12 +625,11 @@ assert.isArray = function (val, msg) { * assert.isNotArray(menu, 'what kind of tea do we want?'); * * @name isNotArray - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotArray = function (val, msg) { new Assertion(val, msg, assert.isNotArray, true).to.not.be.an('array'); }; @@ -676,12 +643,11 @@ assert.isNotArray = function (val, msg) { * assert.isString(teaOrder, 'order placed'); * * @name isString - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isString = function (val, msg) { new Assertion(val, msg, assert.isString, true).to.be.a('string'); }; @@ -695,12 +661,11 @@ assert.isString = function (val, msg) { * assert.isNotString(teaOrder, 'order placed'); * * @name isNotString - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotString = function (val, msg) { new Assertion(val, msg, assert.isNotString, true).to.not.be.a('string'); }; @@ -717,9 +682,8 @@ assert.isNotString = function (val, msg) { * @param {Number} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNumber = function (val, msg) { new Assertion(val, msg, assert.isNumber, true).to.be.a('number'); }; @@ -733,12 +697,11 @@ assert.isNumber = function (val, msg) { * assert.isNotNumber(cups, 'how many cups'); * * @name isNotNumber - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotNumber = function (val, msg) { new Assertion(val, msg, assert.isNotNumber, true).to.not.be.a('number'); }; @@ -757,9 +720,8 @@ assert.isNotNumber = function (val, msg) { * @param {Number} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isFinite = function (val, msg) { new Assertion(val, msg, assert.isFinite, true).to.be.finite; }; @@ -776,12 +738,11 @@ assert.isFinite = function (val, msg) { * assert.isBoolean(teaServed, 'has tea been served'); * * @name isBoolean - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isBoolean = function (val, msg) { new Assertion(val, msg, assert.isBoolean, true).to.be.a('boolean'); }; @@ -798,12 +759,11 @@ assert.isBoolean = function (val, msg) { * assert.isNotBoolean(teaServed, 'has tea been served'); * * @name isNotBoolean - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.isNotBoolean = function (val, msg) { new Assertion(val, msg, assert.isNotBoolean, true).to.not.be.a('boolean'); }; @@ -822,13 +782,12 @@ assert.isNotBoolean = function (val, msg) { * assert.typeOf(undefined, 'undefined', 'we have an undefined'); * * @name typeOf - * @param {Mixed} value + * @param {unknown} value * @param {String} name * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.typeOf = function (val, type, msg) { new Assertion(val, msg, assert.typeOf, true).to.be.a(type); }; @@ -842,13 +801,12 @@ assert.typeOf = function (val, type, msg) { * assert.notTypeOf('tea', 'number', 'strings are not numbers'); * * @name notTypeOf - * @param {Mixed} value + * @param {unknown} value * @param {String} typeof name * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notTypeOf = function (val, type, msg) { new Assertion(val, msg, assert.notTypeOf, true).to.not.be.a(type); }; @@ -868,9 +826,8 @@ assert.notTypeOf = function (val, type, msg) { * @param {Constructor} constructor * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.instanceOf = function (val, type, msg) { new Assertion(val, msg, assert.instanceOf, true).to.be.instanceOf(type); }; @@ -890,9 +847,8 @@ assert.instanceOf = function (val, type, msg) { * @param {Constructor} constructor * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notInstanceOf = function (val, type, msg) { new Assertion(val, msg, assert.notInstanceOf, true) .to.not.be.instanceOf(type); @@ -923,12 +879,11 @@ assert.notInstanceOf = function (val, type, msg) { * * @name include * @param {Array|String} haystack - * @param {Mixed} needle + * @param {unknown} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.include = function (exp, inc, msg) { new Assertion(exp, msg, assert.include, true).include(inc); }; @@ -959,12 +914,11 @@ assert.include = function (exp, inc, msg) { * * @name notInclude * @param {Array|String} haystack - * @param {Mixed} needle + * @param {unknown} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notInclude = function (exp, inc, msg) { new Assertion(exp, msg, assert.notInclude, true).not.include(inc); }; @@ -984,12 +938,11 @@ assert.notInclude = function (exp, inc, msg) { * * @name deepInclude * @param {Array|String} haystack - * @param {Mixed} needle + * @param {unknown} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.deepInclude = function (exp, inc, msg) { new Assertion(exp, msg, assert.deepInclude, true).deep.include(inc); }; @@ -1009,12 +962,11 @@ assert.deepInclude = function (exp, inc, msg) { * * @name notDeepInclude * @param {Array|String} haystack - * @param {Mixed} needle + * @param {unknown} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notDeepInclude = function (exp, inc, msg) { new Assertion(exp, msg, assert.notDeepInclude, true).not.deep.include(inc); }; @@ -1037,9 +989,8 @@ assert.notDeepInclude = function (exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.nestedInclude = function (exp, inc, msg) { new Assertion(exp, msg, assert.nestedInclude, true).nested.include(inc); }; @@ -1062,9 +1013,8 @@ assert.nestedInclude = function (exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notNestedInclude = function (exp, inc, msg) { new Assertion(exp, msg, assert.notNestedInclude, true) .not.nested.include(inc); @@ -1088,9 +1038,8 @@ assert.notNestedInclude = function (exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.deepNestedInclude = function(exp, inc, msg) { new Assertion(exp, msg, assert.deepNestedInclude, true) .deep.nested.include(inc); @@ -1114,9 +1063,8 @@ assert.deepNestedInclude = function(exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notDeepNestedInclude = function(exp, inc, msg) { new Assertion(exp, msg, assert.notDeepNestedInclude, true) .not.deep.nested.include(inc); @@ -1136,9 +1084,8 @@ assert.notDeepNestedInclude = function(exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.ownInclude = function(exp, inc, msg) { new Assertion(exp, msg, assert.ownInclude, true).own.include(inc); }; @@ -1159,9 +1106,8 @@ assert.ownInclude = function(exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notOwnInclude = function(exp, inc, msg) { new Assertion(exp, msg, assert.notOwnInclude, true).not.own.include(inc); }; @@ -1180,9 +1126,8 @@ assert.notOwnInclude = function(exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.deepOwnInclude = function(exp, inc, msg) { new Assertion(exp, msg, assert.deepOwnInclude, true) .deep.own.include(inc); @@ -1202,9 +1147,8 @@ assert.deepOwnInclude = function(exp, inc, msg) { * @param {Object} needle * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notDeepOwnInclude = function(exp, inc, msg) { new Assertion(exp, msg, assert.notDeepOwnInclude, true) .not.deep.own.include(inc); @@ -1218,13 +1162,12 @@ assert.notDeepOwnInclude = function(exp, inc, msg) { * assert.match('foobar', /^foo/, 'regexp matches'); * * @name match - * @param {Mixed} value + * @param {unknown} value * @param {RegExp} regexp * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.match = function (exp, re, msg) { new Assertion(exp, msg, assert.match, true).to.match(re); }; @@ -1237,13 +1180,12 @@ assert.match = function (exp, re, msg) { * assert.notMatch('foobar', /^foo/, 'regexp does not match'); * * @name notMatch - * @param {Mixed} value + * @param {unknown} value * @param {RegExp} regexp * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notMatch = function (exp, re, msg) { new Assertion(exp, msg, assert.notMatch, true).to.not.match(re); }; @@ -1262,9 +1204,8 @@ assert.notMatch = function (exp, re, msg) { * @param {String} property * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.property = function (obj, prop, msg) { new Assertion(obj, msg, assert.property, true).to.have.property(prop); }; @@ -1282,9 +1223,8 @@ assert.property = function (obj, prop, msg) { * @param {String} property * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notProperty = function (obj, prop, msg) { new Assertion(obj, msg, assert.notProperty, true) .to.not.have.property(prop); @@ -1302,12 +1242,11 @@ assert.notProperty = function (obj, prop, msg) { * @name propertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.propertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.propertyVal, true) .to.have.property(prop, val); @@ -1326,12 +1265,11 @@ assert.propertyVal = function (obj, prop, val, msg) { * @name notPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notPropertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.notPropertyVal, true) .to.not.have.property(prop, val); @@ -1348,12 +1286,11 @@ assert.notPropertyVal = function (obj, prop, val, msg) { * @name deepPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.deepPropertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.deepPropertyVal, true) .to.have.deep.property(prop, val); @@ -1372,12 +1309,11 @@ assert.deepPropertyVal = function (obj, prop, val, msg) { * @name notDeepPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notDeepPropertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.notDeepPropertyVal, true) .to.not.have.deep.property(prop, val); @@ -1395,9 +1331,8 @@ assert.notDeepPropertyVal = function (obj, prop, val, msg) { * @param {Object} object * @param {String} property * @param {String} message - * @api public + * @public */ - assert.ownProperty = function (obj, prop, msg) { new Assertion(obj, msg, assert.ownProperty, true) .to.have.own.property(prop); @@ -1416,9 +1351,8 @@ assert.ownProperty = function (obj, prop, msg) { * @param {Object} object * @param {String} property * @param {String} message - * @api public + * @public */ - assert.notOwnProperty = function (obj, prop, msg) { new Assertion(obj, msg, assert.notOwnProperty, true) .to.not.have.own.property(prop); @@ -1436,11 +1370,10 @@ assert.notOwnProperty = function (obj, prop, msg) { * @name ownPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message - * @api public + * @public */ - assert.ownPropertyVal = function (obj, prop, value, msg) { new Assertion(obj, msg, assert.ownPropertyVal, true) .to.have.own.property(prop, value); @@ -1459,11 +1392,10 @@ assert.ownPropertyVal = function (obj, prop, value, msg) { * @name notOwnPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message - * @api public + * @public */ - assert.notOwnPropertyVal = function (obj, prop, value, msg) { new Assertion(obj, msg, assert.notOwnPropertyVal, true) .to.not.have.own.property(prop, value); @@ -1481,11 +1413,10 @@ assert.notOwnPropertyVal = function (obj, prop, value, msg) { * @name deepOwnPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message - * @api public + * @public */ - assert.deepOwnPropertyVal = function (obj, prop, value, msg) { new Assertion(obj, msg, assert.deepOwnPropertyVal, true) .to.have.deep.own.property(prop, value); @@ -1506,11 +1437,10 @@ assert.deepOwnPropertyVal = function (obj, prop, value, msg) { * @name notDeepOwnPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message - * @api public + * @public */ - assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) { new Assertion(obj, msg, assert.notDeepOwnPropertyVal, true) .to.not.have.deep.own.property(prop, value); @@ -1530,9 +1460,8 @@ assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) { * @param {String} property * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.nestedProperty = function (obj, prop, msg) { new Assertion(obj, msg, assert.nestedProperty, true) .to.have.nested.property(prop); @@ -1552,9 +1481,8 @@ assert.nestedProperty = function (obj, prop, msg) { * @param {String} property * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notNestedProperty = function (obj, prop, msg) { new Assertion(obj, msg, assert.notNestedProperty, true) .to.not.have.nested.property(prop); @@ -1572,12 +1500,11 @@ assert.notNestedProperty = function (obj, prop, msg) { * @name nestedPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.nestedPropertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.nestedPropertyVal, true) .to.have.nested.property(prop, val); @@ -1596,12 +1523,11 @@ assert.nestedPropertyVal = function (obj, prop, val, msg) { * @name notNestedPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notNestedPropertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.notNestedPropertyVal, true) .to.not.have.nested.property(prop, val); @@ -1619,12 +1545,11 @@ assert.notNestedPropertyVal = function (obj, prop, val, msg) { * @name deepNestedPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.deepNestedPropertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.deepNestedPropertyVal, true) .to.have.deep.nested.property(prop, val); @@ -1644,12 +1569,11 @@ assert.deepNestedPropertyVal = function (obj, prop, val, msg) { * @name notDeepNestedPropertyVal * @param {Object} object * @param {String} property - * @param {Mixed} value + * @param {unknown} value * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notDeepNestedPropertyVal = function (obj, prop, val, msg) { new Assertion(obj, msg, assert.notDeepNestedPropertyVal, true) .to.not.have.deep.nested.property(prop, val); @@ -1666,13 +1590,12 @@ assert.notDeepNestedPropertyVal = function (obj, prop, val, msg) { * assert.lengthOf(new Map([['a',1],['b',2],['c',3]]), 3, 'map has size of 3'); * * @name lengthOf - * @param {Mixed} object + * @param {unknown} object * @param {Number} length * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.lengthOf = function (exp, len, msg) { new Assertion(exp, msg, assert.lengthOf, true).to.have.lengthOf(len); }; @@ -1690,13 +1613,12 @@ assert.lengthOf = function (exp, len, msg) { * assert.hasAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); * * @name hasAnyKeys - * @param {Mixed} object + * @param {unknown} object * @param {Array|Object} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.hasAnyKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.hasAnyKeys, true).to.have.any.keys(keys); } @@ -1714,13 +1636,12 @@ assert.hasAnyKeys = function (obj, keys, msg) { * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); * * @name hasAllKeys - * @param {Mixed} object + * @param {unknown} object * @param {String[]} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.hasAllKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.hasAllKeys, true).to.have.all.keys(keys); } @@ -1742,13 +1663,12 @@ assert.hasAllKeys = function (obj, keys, msg) { * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); * * @name containsAllKeys - * @param {Mixed} object + * @param {unknown} object * @param {String[]} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.containsAllKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.containsAllKeys, true) .to.contain.all.keys(keys); @@ -1767,13 +1687,12 @@ assert.containsAllKeys = function (obj, keys, msg) { * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); * * @name doesNotHaveAnyKeys - * @param {Mixed} object + * @param {unknown} object * @param {String[]} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.doesNotHaveAnyKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.doesNotHaveAnyKeys, true) .to.not.have.any.keys(keys); @@ -1792,13 +1711,12 @@ assert.doesNotHaveAnyKeys = function (obj, keys, msg) { * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); * * @name doesNotHaveAllKeys - * @param {Mixed} object + * @param {unknown} object * @param {String[]} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.doesNotHaveAllKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.doesNotHaveAllKeys, true) .to.not.have.all.keys(keys); @@ -1821,13 +1739,12 @@ assert.doesNotHaveAllKeys = function (obj, keys, msg) { * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); * * @name hasAnyDeepKeys - * @param {Mixed} object + * @param {unknown} object * @param {Array|Object} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.hasAnyDeepKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.hasAnyDeepKeys, true) .to.have.any.deep.keys(keys); @@ -1848,13 +1765,12 @@ assert.hasAnyDeepKeys = function (obj, keys, msg) { * assert.hasAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); * * @name hasAllDeepKeys - * @param {Mixed} object + * @param {unknown} object * @param {Array|Object} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.hasAllDeepKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.hasAllDeepKeys, true) .to.have.all.deep.keys(keys); @@ -1875,13 +1791,12 @@ assert.hasAllDeepKeys = function (obj, keys, msg) { * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); * * @name containsAllDeepKeys - * @param {Mixed} object + * @param {unknown} object * @param {Array|Object} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.containsAllDeepKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.containsAllDeepKeys, true) .to.contain.all.deep.keys(keys); @@ -1902,13 +1817,12 @@ assert.containsAllDeepKeys = function (obj, keys, msg) { * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); * * @name doesNotHaveAnyDeepKeys - * @param {Mixed} object + * @param {unknown} object * @param {Array|Object} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.doesNotHaveAnyDeepKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.doesNotHaveAnyDeepKeys, true) .to.not.have.any.deep.keys(keys); @@ -1929,13 +1843,12 @@ assert.doesNotHaveAnyDeepKeys = function (obj, keys, msg) { * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {fifty: 'fifty'}]); * * @name doesNotHaveAllDeepKeys - * @param {Mixed} object + * @param {unknown} object * @param {Array|Object} keys * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.doesNotHaveAllDeepKeys = function (obj, keys, msg) { new Assertion(obj, msg, assert.doesNotHaveAllDeepKeys, true) .to.not.have.all.deep.keys(keys); @@ -1969,9 +1882,8 @@ assert.doesNotHaveAllDeepKeys = function (obj, keys, msg) { * @param {String} message * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Assert - * @api public + * @public */ - assert.throws = function (fn, errorLike, errMsgMatcher, msg) { if ('string' === typeof errorLike || errorLike instanceof RegExp) { errMsgMatcher = errorLike; @@ -2009,9 +1921,8 @@ assert.throws = function (fn, errorLike, errMsgMatcher, msg) { * @param {String} message * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Assert - * @api public + * @public */ - assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) { if ('string' === typeof errorLike || errorLike instanceof RegExp) { errMsgMatcher = errorLike; @@ -2031,14 +1942,13 @@ assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) { * assert.operator(1, '>', 2, 'this will fail'); * * @name operator - * @param {Mixed} val1 + * @param {unknown} val1 * @param {String} operator - * @param {Mixed} val2 + * @param {unknown} val2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.operator = function (val, operator, val2, msg) { var ok; switch(operator) { @@ -2094,9 +2004,8 @@ assert.operator = function (val, operator, val2, msg) { * @param {Number} delta * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.closeTo = function (act, exp, delta, msg) { new Assertion(act, msg, assert.closeTo, true).to.be.closeTo(exp, delta); }; @@ -2114,9 +2023,8 @@ assert.closeTo = function (act, exp, delta, msg) { * @param {Number} delta * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.approximately = function (act, exp, delta, msg) { new Assertion(act, msg, assert.approximately, true) .to.be.approximately(exp, delta); @@ -2135,9 +2043,8 @@ assert.approximately = function (act, exp, delta, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.sameMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.sameMembers, true) .to.have.same.members(set2); @@ -2156,9 +2063,8 @@ assert.sameMembers = function (set1, set2, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notSameMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.notSameMembers, true) .to.not.have.same.members(set2); @@ -2177,9 +2083,8 @@ assert.notSameMembers = function (set1, set2, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.sameDeepMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.sameDeepMembers, true) .to.have.same.deep.members(set2); @@ -2198,9 +2103,8 @@ assert.sameDeepMembers = function (set1, set2, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notSameDeepMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.notSameDeepMembers, true) .to.not.have.same.deep.members(set2); @@ -2219,9 +2123,8 @@ assert.notSameDeepMembers = function (set1, set2, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.sameOrderedMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.sameOrderedMembers, true) .to.have.same.ordered.members(set2); @@ -2240,9 +2143,8 @@ assert.sameOrderedMembers = function (set1, set2, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notSameOrderedMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.notSameOrderedMembers, true) .to.not.have.same.ordered.members(set2); @@ -2261,9 +2163,8 @@ assert.notSameOrderedMembers = function (set1, set2, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.sameDeepOrderedMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.sameDeepOrderedMembers, true) .to.have.same.deep.ordered.members(set2); @@ -2283,9 +2184,8 @@ assert.sameDeepOrderedMembers = function (set1, set2, msg) { * @param {Array} set2 * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notSameDeepOrderedMembers = function (set1, set2, msg) { new Assertion(set1, msg, assert.notSameDeepOrderedMembers, true) .to.not.have.same.deep.ordered.members(set2); @@ -2304,9 +2204,8 @@ assert.notSameDeepOrderedMembers = function (set1, set2, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.includeMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.includeMembers, true) .to.include.members(subset); @@ -2325,9 +2224,8 @@ assert.includeMembers = function (superset, subset, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notIncludeMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.notIncludeMembers, true) .to.not.include.members(subset); @@ -2346,9 +2244,8 @@ assert.notIncludeMembers = function (superset, subset, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.includeDeepMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.includeDeepMembers, true) .to.include.deep.members(subset); @@ -2367,9 +2264,8 @@ assert.includeDeepMembers = function (superset, subset, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notIncludeDeepMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.notIncludeDeepMembers, true) .to.not.include.deep.members(subset); @@ -2389,9 +2285,8 @@ assert.notIncludeDeepMembers = function (superset, subset, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.includeOrderedMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.includeOrderedMembers, true) .to.include.ordered.members(subset); @@ -2412,9 +2307,8 @@ assert.includeOrderedMembers = function (superset, subset, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notIncludeOrderedMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.notIncludeOrderedMembers, true) .to.not.include.ordered.members(subset); @@ -2434,9 +2328,8 @@ assert.notIncludeOrderedMembers = function (superset, subset, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.includeDeepOrderedMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.includeDeepOrderedMembers, true) .to.include.deep.ordered.members(subset); @@ -2458,9 +2351,8 @@ assert.includeDeepOrderedMembers = function (superset, subset, msg) { * @param {Array} subset * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.notIncludeDeepOrderedMembers = function (superset, subset, msg) { new Assertion(superset, msg, assert.notIncludeDeepOrderedMembers, true) .to.not.include.deep.ordered.members(subset); @@ -2478,9 +2370,8 @@ assert.notIncludeDeepOrderedMembers = function (superset, subset, msg) { * @param {Array<*>} list * @param {String} message * @namespace Assert - * @api public + * @public */ - assert.oneOf = function (inList, list, msg) { new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list); } @@ -2500,9 +2391,8 @@ assert.oneOf = function (inList, list, msg) { * @param {String} property name _optional_ * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.changes = function (fn, obj, prop, msg) { if (arguments.length === 3 && typeof obj === 'function') { msg = prop; @@ -2528,9 +2418,8 @@ assert.changes = function (fn, obj, prop, msg) { * @param {Number} change amount (delta) * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.changesBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { var tmpMsg = delta; @@ -2560,9 +2449,8 @@ assert.changesBy = function (fn, obj, prop, delta, msg) { * @param {String} property name _optional_ * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.doesNotChange = function (fn, obj, prop, msg) { if (arguments.length === 3 && typeof obj === 'function') { msg = prop; @@ -2589,9 +2477,8 @@ assert.doesNotChange = function (fn, obj, prop, msg) { * @param {Number} change amount (delta) * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.changesButNotBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { var tmpMsg = delta; @@ -2621,9 +2508,8 @@ assert.changesButNotBy = function (fn, obj, prop, delta, msg) { * @param {String} property name _optional_ * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.increases = function (fn, obj, prop, msg) { if (arguments.length === 3 && typeof obj === 'function') { msg = prop; @@ -2650,9 +2536,8 @@ assert.increases = function (fn, obj, prop, msg) { * @param {Number} change amount (delta) * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.increasesBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { var tmpMsg = delta; @@ -2682,9 +2567,8 @@ assert.increasesBy = function (fn, obj, prop, delta, msg) { * @param {String} property name _optional_ * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.doesNotIncrease = function (fn, obj, prop, msg) { if (arguments.length === 3 && typeof obj === 'function') { msg = prop; @@ -2711,9 +2595,8 @@ assert.doesNotIncrease = function (fn, obj, prop, msg) { * @param {Number} change amount (delta) * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.increasesButNotBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { var tmpMsg = delta; @@ -2743,9 +2626,8 @@ assert.increasesButNotBy = function (fn, obj, prop, delta, msg) { * @param {String} property name _optional_ * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.decreases = function (fn, obj, prop, msg) { if (arguments.length === 3 && typeof obj === 'function') { msg = prop; @@ -2772,9 +2654,8 @@ assert.decreases = function (fn, obj, prop, msg) { * @param {Number} change amount (delta) * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.decreasesBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { var tmpMsg = delta; @@ -2804,9 +2685,8 @@ assert.decreasesBy = function (fn, obj, prop, delta, msg) { * @param {String} property name _optional_ * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.doesNotDecrease = function (fn, obj, prop, msg) { if (arguments.length === 3 && typeof obj === 'function') { msg = prop; @@ -2833,9 +2713,8 @@ assert.doesNotDecrease = function (fn, obj, prop, msg) { * @param {Number} change amount (delta) * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { var tmpMsg = delta; @@ -2866,9 +2745,8 @@ assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) { * @param {Number} change amount (delta) * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { var tmpMsg = delta; @@ -2896,9 +2774,8 @@ assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) { * @name ifError * @param {Object} object * @namespace Assert - * @api public + * @public */ - assert.ifError = function (val) { if (val) { throw(val); @@ -2917,9 +2794,8 @@ assert.ifError = function (val) { * @param {Object} object * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isExtensible = function (obj, msg) { new Assertion(obj, msg, assert.isExtensible, true).to.be.extensible; }; @@ -2942,9 +2818,8 @@ assert.isExtensible = function (obj, msg) { * @param {Object} object * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isNotExtensible = function (obj, msg) { new Assertion(obj, msg, assert.isNotExtensible, true).to.not.be.extensible; }; @@ -2966,9 +2841,8 @@ assert.isNotExtensible = function (obj, msg) { * @param {Object} object * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isSealed = function (obj, msg) { new Assertion(obj, msg, assert.isSealed, true).to.be.sealed; }; @@ -2985,9 +2859,8 @@ assert.isSealed = function (obj, msg) { * @param {Object} object * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isNotSealed = function (obj, msg) { new Assertion(obj, msg, assert.isNotSealed, true).to.not.be.sealed; }; @@ -3006,9 +2879,8 @@ assert.isNotSealed = function (obj, msg) { * @param {Object} object * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isFrozen = function (obj, msg) { new Assertion(obj, msg, assert.isFrozen, true).to.be.frozen; }; @@ -3025,9 +2897,8 @@ assert.isFrozen = function (obj, msg) { * @param {Object} object * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isNotFrozen = function (obj, msg) { new Assertion(obj, msg, assert.isNotFrozen, true).to.not.be.frozen; }; @@ -3051,9 +2922,8 @@ assert.isNotFrozen = function (obj, msg) { * @param {Object|Array|String|Map|Set} target * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isEmpty = function(val, msg) { new Assertion(val, msg, assert.isEmpty, true).to.be.empty; }; @@ -3077,9 +2947,8 @@ assert.isEmpty = function(val, msg) { * @param {Object|Array|String|Map|Set} target * @param {String} message _optional_ * @namespace Assert - * @api public + * @public */ - assert.isNotEmpty = function(val, msg) { new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty; }; @@ -3087,7 +2956,6 @@ assert.isNotEmpty = function(val, msg) { /*! * Aliases. */ - (function alias(name, as){ assert[as] = assert[name]; return alias; diff --git a/lib/chai/interface/expect.js b/lib/chai/interface/expect.js index 70a9416c..286044a1 100644 --- a/lib/chai/interface/expect.js +++ b/lib/chai/interface/expect.js @@ -13,6 +13,7 @@ function expect(val, message) { } export {expect}; + /** * ### .fail([message]) * ### .fail(actual, expected, [message], [operator]) @@ -27,14 +28,13 @@ export {expect}; * expect.fail(1, 2, undefined, ">"); * * @name fail - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @param {String} operator - * @namespace BDD - * @api public + * @namespace expect + * @public */ - expect.fail = function (actual, expected, message, operator) { if (arguments.length < 2) { message = actual; diff --git a/lib/chai/interface/should.js b/lib/chai/interface/should.js index 8269a58b..3a2c235d 100644 --- a/lib/chai/interface/should.js +++ b/lib/chai/interface/should.js @@ -57,14 +57,13 @@ function loadShould () { * * * @name fail - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @param {String} operator * @namespace BDD - * @api public + * @public */ - should.fail = function (actual, expected, message, operator) { if (arguments.length < 2) { message = actual; @@ -87,13 +86,12 @@ function loadShould () { * should.equal(3, '3', '== coerces values to strings'); * * @name equal - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @namespace Should - * @api public + * @public */ - should.equal = function (val1, val2, msg) { new Assertion(val1, msg).to.equal(val2); }; @@ -119,9 +117,8 @@ function loadShould () { * @param {String} message * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Should - * @api public + * @public */ - should.Throw = function (fn, errt, errs, msg) { new Assertion(fn, msg).to.Throw(errt, errs); }; @@ -137,9 +134,8 @@ function loadShould () { * * @name exist * @namespace Should - * @api public + * @public */ - should.exist = function (val, msg) { new Assertion(val, msg).to.exist; } @@ -155,13 +151,12 @@ function loadShould () { * should.not.equal(3, 4, 'these numbers are not equal'); * * @name not.equal - * @param {Mixed} actual - * @param {Mixed} expected + * @param {unknown} actual + * @param {unknown} expected * @param {String} message * @namespace Should - * @api public + * @public */ - should.not.equal = function (val1, val2, msg) { new Assertion(val1, msg).to.not.equal(val2); }; @@ -183,9 +178,8 @@ function loadShould () { * @param {String} message * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Should - * @api public + * @public */ - should.not.Throw = function (fn, errt, errs, msg) { new Assertion(fn, msg).to.not.Throw(errt, errs); }; @@ -201,9 +195,8 @@ function loadShould () { * * @name not.exist * @namespace Should - * @api public + * @public */ - should.not.exist = function (val, msg) { new Assertion(val, msg).to.not.exist; } From 640d93221f1781a8e2fe3f25a892f01bdbeb86ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 1 Feb 2024 20:42:38 +0100 Subject: [PATCH 14/30] Convert comments in "legal comments" format to jsdoc (#1598) See https://esbuild.github.io/api/#legal-comments --- lib/chai.js | 36 +---- lib/chai/assertion.js | 5 +- lib/chai/interface/assert.js | 4 +- lib/chai/utils/addChainableMethod.js | 6 +- lib/chai/utils/compareByInspect.js | 4 - lib/chai/utils/getMessage.js | 4 - lib/chai/utils/getOwnEnumerableProperties.js | 4 - lib/chai/utils/index.js | 139 ++++--------------- lib/chai/utils/objDisplay.js | 4 - lib/chai/utils/test.js | 4 - 10 files changed, 40 insertions(+), 170 deletions(-) diff --git a/lib/chai.js b/lib/chai.js index 7569595c..ca7be863 100644 --- a/lib/chai.js +++ b/lib/chai.js @@ -15,10 +15,7 @@ import {assert} from './chai/interface/assert.js'; const used = []; -/*! - * Assertion Error - */ - +// Assertion Error export {AssertionError}; /** @@ -30,7 +27,6 @@ export {AssertionError}; * @returns {this} for chaining * @api public */ - export function use(fn) { const exports = { AssertionError, @@ -50,38 +46,20 @@ export function use(fn) { return exports; }; -/*! - * Utility Functions - */ - +// Utility Functions export {util}; -/*! - * Configuration - */ - +// Configuration export {config}; -/*! - * Primary `Assertion` prototype - */ - +// Primary `Assertion` prototype export * from './chai/assertion.js'; -/*! - * Expect interface - */ - +// Expect interface export * from './chai/interface/expect.js'; -/*! - * Should interface - */ - +// Should interface export * from './chai/interface/should.js'; -/*! - * Assert interface - */ - +// Assert interface export * from './chai/interface/assert.js'; diff --git a/lib/chai/assertion.js b/lib/chai/assertion.js index c8c416d1..e8e1e597 100644 --- a/lib/chai/assertion.js +++ b/lib/chai/assertion.js @@ -9,7 +9,7 @@ import {config} from './config.js'; import {AssertionError} from 'assertion-error'; import * as util from './utils/index.js'; -/*! +/** * Assertion Constructor * * Creates object for chaining. @@ -147,14 +147,13 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, } }; -/*! +/** * ### ._obj * * Quick reference to stored `actual` value for plugin developers. * * @api private */ - Object.defineProperty(Assertion.prototype, '_obj', { get: function () { return util.flag(this, 'object'); diff --git a/lib/chai/interface/assert.js b/lib/chai/interface/assert.js index e802e79a..3c1eb2d3 100644 --- a/lib/chai/interface/assert.js +++ b/lib/chai/interface/assert.js @@ -2761,7 +2761,7 @@ assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) { .to.decrease(obj, prop).but.not.by(delta); } -/*! +/** * ### .ifError(object) * * Asserts if value is not a false value, and throws if it is a true value. @@ -2953,7 +2953,7 @@ assert.isNotEmpty = function(val, msg) { new Assertion(val, msg, assert.isNotEmpty, true).to.not.be.empty; }; -/*! +/** * Aliases. */ (function alias(name, as){ diff --git a/lib/chai/utils/addChainableMethod.js b/lib/chai/utils/addChainableMethod.js index aaf8baaa..2205b5ea 100644 --- a/lib/chai/utils/addChainableMethod.js +++ b/lib/chai/utils/addChainableMethod.js @@ -4,17 +4,13 @@ * MIT Licensed */ -/*! - * Module dependencies - */ - import {Assertion} from '../assertion.js'; import {addLengthGuard} from './addLengthGuard.js'; import {flag} from './flag.js'; import {proxify} from './proxify.js'; import {transferFlags} from './transferFlags.js'; -/*! +/** * Module variables */ diff --git a/lib/chai/utils/compareByInspect.js b/lib/chai/utils/compareByInspect.js index ff9f9817..829de728 100644 --- a/lib/chai/utils/compareByInspect.js +++ b/lib/chai/utils/compareByInspect.js @@ -4,10 +4,6 @@ * MIT Licensed */ -/*! - * Module dependencies - */ - import {inspect} from './inspect.js'; /** diff --git a/lib/chai/utils/getMessage.js b/lib/chai/utils/getMessage.js index 97c4826e..83e59974 100644 --- a/lib/chai/utils/getMessage.js +++ b/lib/chai/utils/getMessage.js @@ -4,10 +4,6 @@ * MIT Licensed */ -/*! - * Module dependencies - */ - import {flag} from './flag.js'; import {getActual} from './getActual.js'; import {objDisplay} from './objDisplay.js'; diff --git a/lib/chai/utils/getOwnEnumerableProperties.js b/lib/chai/utils/getOwnEnumerableProperties.js index a54b1100..ac69b502 100644 --- a/lib/chai/utils/getOwnEnumerableProperties.js +++ b/lib/chai/utils/getOwnEnumerableProperties.js @@ -4,10 +4,6 @@ * MIT Licensed */ -/*! - * Module dependencies - */ - import {getOwnEnumerablePropertySymbols} from './getOwnEnumerablePropertySymbols.js'; /** diff --git a/lib/chai/utils/index.js b/lib/chai/utils/index.js index 4b9eba8b..5f52828c 100644 --- a/lib/chai/utils/index.js +++ b/lib/chai/utils/index.js @@ -4,171 +4,88 @@ * MIT Licensed */ -/*! - * Dependencies that are used for multiple exports are required here only once - */ - +// Dependencies that are used for multiple exports are required here only once import * as checkError from 'check-error'; -/*! - * test utility - */ - +// test utility export {test} from './test.js'; -/*! - * type utility - */ - +// type utility export {type} from './type-detect.js'; -/*! - * expectTypes utility - */ +// expectTypes utility export {expectTypes} from './expectTypes.js'; -/*! - * message utility - */ - +// message utility export {getMessage} from './getMessage.js'; -/*! - * actual utility - */ - +// actual utility export {getActual} from './getActual.js'; -/*! - * Inspect util - */ - +// Inspect util export {inspect} from './inspect.js'; -/*! - * Object Display util - */ - +// Object Display util export {objDisplay} from './objDisplay.js'; -/*! - * Flag utility - */ - +// Flag utility export {flag} from './flag.js'; -/*! - * Flag transferring utility - */ - +// Flag transferring utility export {transferFlags} from './transferFlags.js'; -/*! - * Deep equal utility - */ - +// Deep equal utility export {default as eql} from 'deep-eql'; -/*! - * Deep path info - */ - +// Deep path info export {getPathInfo, hasProperty} from 'pathval'; -/*! - * Function name - */ - +// Function name export function getName(fn) { return fn.name } -/*! - * add Property - */ - +// add Property export {addProperty} from './addProperty.js'; -/*! - * add Method - */ - +// add Method export {addMethod} from './addMethod.js'; -/*! - * overwrite Property - */ - +// overwrite Property export {overwriteProperty} from './overwriteProperty.js'; -/*! - * overwrite Method - */ - +// overwrite Method export {overwriteMethod} from './overwriteMethod.js'; -/*! - * Add a chainable method - */ - +// Add a chainable method export {addChainableMethod} from './addChainableMethod.js'; -/*! - * Overwrite chainable method - */ - +// Overwrite chainable method export {overwriteChainableMethod} from './overwriteChainableMethod.js'; -/*! - * Compare by inspect method - */ - +// Compare by inspect method export {compareByInspect} from './compareByInspect.js'; -/*! - * Get own enumerable property symbols method - */ - +// Get own enumerable property symbols method export {getOwnEnumerablePropertySymbols} from './getOwnEnumerablePropertySymbols.js'; -/*! - * Get own enumerable properties method - */ - +// Get own enumerable properties method export {getOwnEnumerableProperties} from './getOwnEnumerableProperties.js'; -/*! - * Checks error against a given set of criteria - */ - +// Checks error against a given set of criteria export {checkError}; -/*! - * Proxify util - */ - +// Proxify util export {proxify} from './proxify.js'; -/*! - * addLengthGuard util - */ - +// addLengthGuard util export {addLengthGuard} from './addLengthGuard.js'; -/*! - * isProxyEnabled helper - */ - +// isProxyEnabled helper export {isProxyEnabled} from './isProxyEnabled.js'; -/*! - * isNaN method - */ - +// isNaN method export {isNaN} from './isNaN.js'; -/*! - * getOperator method - */ - +// getOperator method export {getOperator} from './getOperator.js'; diff --git a/lib/chai/utils/objDisplay.js b/lib/chai/utils/objDisplay.js index 5a8383c0..c04f12df 100644 --- a/lib/chai/utils/objDisplay.js +++ b/lib/chai/utils/objDisplay.js @@ -4,10 +4,6 @@ * MIT Licensed */ -/*! - * Module dependencies - */ - import {inspect} from './inspect.js'; import {config} from '../config.js'; diff --git a/lib/chai/utils/test.js b/lib/chai/utils/test.js index 19a47dbe..5a400bdb 100644 --- a/lib/chai/utils/test.js +++ b/lib/chai/utils/test.js @@ -4,10 +4,6 @@ * MIT Licensed */ -/*! - * Module dependencies - */ - import {flag} from './flag.js'; /** From d5045735e094a0ea18055a5718f0fabd4f6065b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Sun, 11 Feb 2024 11:40:05 +0100 Subject: [PATCH 15/30] Implement `iterable` assertion (#1592) * Implement `iterator` assertion * Consider `string` to be iterable * Revert changes to `isSubsetOf` * Move iterable check out of `an()` function --- lib/chai/core/assertions.js | 33 ++++++++++++++++++++++++++++++++- lib/chai/interface/assert.js | 27 +++++++++++++++++++++++++++ test/assert.js | 27 +++++++++++++++++++++++++++ test/expect.js | 27 +++++++++++++++++++++++++++ test/should.js | 19 +++++++++++++++++++ 5 files changed, 132 insertions(+), 1 deletion(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 0a55c58e..28f021cf 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -3133,7 +3133,6 @@ function isSubsetOf(subset, superset, cmp, contains, ordered) { * @namespace BDD * @api public */ - Assertion.addMethod('members', function (subset, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -3170,6 +3169,38 @@ Assertion.addMethod('members', function (subset, msg) { ); }); +/** + * ### .iterable + * + * Asserts that the target is an iterable, which means that it has a iterator. + * + * expect([1, 2]).to.be.iterable; + * + * Add `.not` earlier in the chain to negate `.iterable`. + * + * expect(1).to.not.be.iterable; + * expect(true).to.not.be.iterable; + * + * A custom error message can be given as the second argument to `expect`. + * + * expect(1, 'nooo why fail??').to.be.iterable; + * + * @name iterable + * @namespace BDD + * @api public + */ +Assertion.addProperty('iterable', function(msg) { + if (msg) flag(this, 'message', msg); + var obj = flag(this, 'object'); + + this.assert( + obj != undefined && obj[Symbol.iterator] + , 'expected #{this} to be an iterable' + , 'expected #{this} to not be an iterable' + , obj + ); +}); + /** * ### .oneOf(list[, msg]) * diff --git a/lib/chai/interface/assert.js b/lib/chai/interface/assert.js index 3c1eb2d3..a4488247 100644 --- a/lib/chai/interface/assert.js +++ b/lib/chai/interface/assert.js @@ -2376,6 +2376,33 @@ assert.oneOf = function (inList, list, msg) { new Assertion(inList, msg, assert.oneOf, true).to.be.oneOf(list); } +/** + * ### isIterable(obj, [message]) + * + * Asserts that the target is an iterable, which means that it has a iterator + * with the exception of `String.` + * + * assert.isIterable([1, 2]); + * + * @param {unknown} obj + * @param {string} [msg] + * @namespace Assert + * @api public + */ +assert.isIterable = function(obj, msg) { + if (obj == undefined || !obj[Symbol.iterator]) { + msg = msg ? + `${msg} expected ${inspect(obj)} to be an iterable` : + `expected ${inspect(obj)} to be an iterable`; + + throw new AssertionError( + msg, + undefined, + assert.isIterable + ); + } +} + /** * ### .changes(function, object, property, [message]) * diff --git a/test/assert.js b/test/assert.js index 1416f120..dbbfc39d 100644 --- a/test/assert.js +++ b/test/assert.js @@ -2315,6 +2315,33 @@ describe('assert', function () { }, 'blah: the argument to most must be a number'); }); + it('iterable', function() { + assert.isIterable([1, 2, 3]); + assert.isIterable(new Map([[1, 'one'], [2, 'two'], [3, 'three']])); + assert.isIterable(new Set([1, 2, 3])); + assert.isIterable('hello'); + + err(function() { + assert.isIterable(42); + }, 'expected 42 to be an iterable'); + + err(function() { + assert.isIterable(undefined); + }, 'expected undefined to be an iterable'); + + err(function() { + assert.isIterable(null); + }, 'expected null to be an iterable'); + + err(function() { + assert.isIterable(true); + }, 'expected true to be an iterable'); + + err(function() { + assert.isIterable({ key: 'value' }); + }, 'expected { key: \'value\' } to be an iterable'); + }); + it('change', function() { var obj = { value: 10, str: 'foo' }, heroes = ['spiderman', 'superman'], diff --git a/test/expect.js b/test/expect.js index ba03c8a2..fb0d0960 100644 --- a/test/expect.js +++ b/test/expect.js @@ -3569,6 +3569,33 @@ describe('expect', function () { }, 'expected [ { a: 1 }, { b: 2 }, { c: 3 } ] to not be an ordered superset of [ { a: 1 }, { b: 2 } ]'); }); + it('iterable', function() { + expect([1, 2, 3]).to.be.iterable; + expect(new Map([[1, 'one'], [2, 'two'], [3, 'three']])).to.be.iterable; + expect(new Set([1, 2, 3])).to.be.iterable; + expect('hello').to.be.iterable; + + err(function() { + expect(42).to.be.iterable; + }, 'expected 42 to be an iterable'); + + err(function() { + expect(undefined).to.be.iterable; + }, 'expected undefined to be an iterable'); + + err(function() { + expect(null).to.be.iterable; + }, 'expected null to be an iterable'); + + err(function() { + expect(true).to.be.iterable; + }, 'expected true to be an iterable'); + + err(function() { + expect({ key: 'value' }).to.be.iterable; + }, 'expected { key: \'value\' } to be an iterable'); + }) + it('change', function() { var obj = { value: 10, str: 'foo' }, heroes = ['spiderman', 'superman'], diff --git a/test/should.js b/test/should.js index f205b023..487d4a0a 100644 --- a/test/should.js +++ b/test/should.js @@ -2937,6 +2937,25 @@ describe('should', function() { }, 'expected [ { a: 1 }, { b: 2 }, { c: 3 } ] to not be an ordered superset of [ { a: 1 }, { b: 2 } ]'); }); + it ('iterable', function() { + ([1, 2, 3]).should.be.iterable; + (new Map([[1, 'one'], [2, 'two'], [3, 'three']])).should.be.iterable; + (new Set([1, 2, 3])).should.be.iterable; + ('hello').should.be.iterable; + + err(function() { + (42).should.be.iterable; + }, 'expected 42 to be an iterable'); + + err(function() { + (true).should.be.iterable; + }, 'expected true to be an iterable'); + + err(function() { + ({ key: 'value' }).should.be.iterable; + }, 'expected { key: \'value\' } to be an iterable'); + }) + it('change', function() { var obj = { value: 10, str: 'foo' }, heroes = ['spiderman', 'superman'], From f2243394a25183fa6c43f178ac6e0dea60dd6f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=83=81=EB=91=90?= <102564722+developer-bandi@users.noreply.github.com> Date: Mon, 12 Feb 2024 21:32:37 +0900 Subject: [PATCH 16/30] Assert interface fix (#1601) * fix: notOwnInclude, notDeepOwnInclude description * fix: assert method example code fix --- lib/chai/interface/assert.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/chai/interface/assert.js b/lib/chai/interface/assert.js index a4488247..2d9fd9a3 100644 --- a/lib/chai/interface/assert.js +++ b/lib/chai/interface/assert.js @@ -1093,7 +1093,7 @@ assert.ownInclude = function(exp, inc, msg) { /** * ### .notOwnInclude(haystack, needle, [message]) * - * Asserts that 'haystack' includes 'needle'. + * Asserts that 'haystack' does not include 'needle'. * Can be used to assert the absence of a subset of properties in an * object while ignoring inherited properties. * @@ -1136,7 +1136,7 @@ assert.deepOwnInclude = function(exp, inc, msg) { /** * ### .notDeepOwnInclude(haystack, needle, [message]) * - * Asserts that 'haystack' includes 'needle'. + * Asserts that 'haystack' does not include 'needle'. * Can be used to assert the absence of a subset of properties in an * object while ignoring inherited properties and checking for deep equality. * @@ -1633,7 +1633,7 @@ assert.hasAnyKeys = function (obj, keys, msg) { * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, ['foo', 'bar', 'baz']); * assert.hasAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337]); * assert.hasAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); - * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); * * @name hasAllKeys * @param {unknown} object @@ -1659,8 +1659,8 @@ assert.hasAllKeys = function (obj, keys, msg) { * assert.containsAllKeys({foo: 1, bar: 2, baz: 3}, {foo: 30, bar: 99, baz: 1337}); * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}]); * assert.containsAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{foo: 1}, 'key']); - * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}]); - * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{foo: 'bar'}, 'anotherKey']); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}]); + * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); * * @name containsAllKeys * @param {unknown} object @@ -1684,7 +1684,7 @@ assert.containsAllKeys = function (obj, keys, msg) { * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); * assert.doesNotHaveAnyKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); * assert.doesNotHaveAnyKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); - * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']); * * @name doesNotHaveAnyKeys * @param {unknown} object @@ -1708,7 +1708,7 @@ assert.doesNotHaveAnyKeys = function (obj, keys, msg) { * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, ['one', 'two', 'example']); * assert.doesNotHaveAllKeys({foo: 1, bar: 2, baz: 3}, {one: 1, two: 2, example: 'foo'}); * assert.doesNotHaveAllKeys(new Map([[{foo: 1}, 'bar'], ['key', 'value']]), [{one: 'two'}, 'example']); - * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey'], [{one: 'two'}, 'example']); + * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']); * * @name doesNotHaveAllKeys * @param {unknown} object From 1ba37b56108240524dc1ebdac07d0d4919e6f39c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Mon, 12 Feb 2024 13:32:49 +0100 Subject: [PATCH 17/30] Set support in same members (#1583) * Implement `iterator` assertion * Move JSDoc to it's function * Add support for Sets in `members` assertion * Add `sameMembers` test for `Set` * Update tests * Implement `iterable` assertion * Change `iterable` implementation to a property * Make changes after merging * Add more tests for members equality --- lib/chai/core/assertions.js | 9 ++++++--- test/assert.js | 6 ++++-- test/expect.js | 13 ++++++++----- test/should.js | 9 ++++++--- 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 28f021cf..7b3b1a4b 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -3037,7 +3037,9 @@ Assertion.addMethod('closeTo', closeTo); Assertion.addMethod('approximately', closeTo); // Note: Duplicates are ignored if testing for inclusion instead of sameness. -function isSubsetOf(subset, superset, cmp, contains, ordered) { +function isSubsetOf(_subset, _superset, cmp, contains, ordered) { + let superset = Array.from(_superset); + let subset = Array.from(_subset); if (!contains) { if (subset.length !== superset.length) return false; superset = superset.slice(); @@ -3139,8 +3141,8 @@ Assertion.addMethod('members', function (subset, msg) { , flagMsg = flag(this, 'message') , ssfi = flag(this, 'ssfi'); - new Assertion(obj, flagMsg, ssfi, true).to.be.an('array'); - new Assertion(subset, flagMsg, ssfi, true).to.be.an('array'); + new Assertion(obj, flagMsg, ssfi, true).to.be.iterable; + new Assertion(subset, flagMsg, ssfi, true).to.be.iterable; var contains = flag(this, 'contains'); var ordered = flag(this, 'ordered'); @@ -3175,6 +3177,7 @@ Assertion.addMethod('members', function (subset, msg) { * Asserts that the target is an iterable, which means that it has a iterator. * * expect([1, 2]).to.be.iterable; + * expect("foobar").to.be.iterable; * * Add `.not` earlier in the chain to negate `.iterable`. * diff --git a/test/assert.js b/test/assert.js index dbbfc39d..c469dda1 100644 --- a/test/assert.js +++ b/test/assert.js @@ -1909,6 +1909,8 @@ describe('assert', function () { assert.sameMembers([4, 2], [4, 2]); assert.sameMembers([4, 2, 2], [4, 2, 2]); + assert.sameMembers(new Set([1,2,3]), new Set([3,2,1])); + err(function() { assert.sameMembers([], [1, 2], 'blah'); }, 'blah: expected [] to have the same members as [ 1, 2 ]'); @@ -1919,11 +1921,11 @@ describe('assert', function () { err(function () { assert.sameMembers({}, [], 'blah'); - }, 'blah: expected {} to be an array'); + }, 'blah: expected {} to be an iterable'); err(function () { assert.sameMembers([], {}, 'blah'); - }, 'blah: expected {} to be an array'); + }, 'blah: expected {} to be an iterable'); }); it('notSameMembers', function() { diff --git a/test/expect.js b/test/expect.js index fb0d0960..ad702cf7 100644 --- a/test/expect.js +++ b/test/expect.js @@ -3397,9 +3397,11 @@ describe('expect', function () { }); it('same.members', function() { - expect([5, 4]).to.have.same.members([4, 5]); expect([5, 4]).to.have.same.members([5, 4]); + expect([5, 4]).to.have.same.members([4, 5]); expect([5, 4, 4]).to.have.same.members([5, 4, 4]); + expect(new Set([5, 4])).to.have.same.members([4, 5]); + expect([5, 4]).to.not.have.same.members([]); expect([5, 4]).to.not.have.same.members([6, 3]); expect([5, 4]).to.not.have.same.members([5, 4, 2]); @@ -3407,6 +3409,7 @@ describe('expect', function () { expect([5, 4, 4]).to.not.have.same.members([5, 4]); expect([5, 4, 4]).to.not.have.same.members([5, 4, 3]); expect([5, 4, 3]).to.not.have.same.members([5, 4, 4]); + expect(new Set([5, 4])).to.not.have.same.members([4]); }); it('members', function() { @@ -3436,19 +3439,19 @@ describe('expect', function () { err(function () { expect({}).members([], 'blah'); - }, 'blah: expected {} to be an array'); + }, 'blah: expected {} to be an iterable'); err(function () { expect({}, 'blah').members([]); - }, 'blah: expected {} to be an array'); + }, 'blah: expected {} to be an iterable'); err(function () { expect([]).members({}, 'blah'); - }, 'blah: expected {} to be an array'); + }, 'blah: expected {} to be an iterable'); err(function () { expect([], 'blah').members({}); - }, 'blah: expected {} to be an array'); + }, 'blah: expected {} to be an iterable'); }); it('deep.members', function() { diff --git a/test/should.js b/test/should.js index 487d4a0a..baa7891f 100644 --- a/test/should.js +++ b/test/should.js @@ -2815,11 +2815,11 @@ describe('should', function() { err(function() { 'foo'.should.include.members([12], 'blah'); - }, "blah: expected 'foo' to be an array"); + }, "blah: expected 'foo' to be a superset of [ 12 ]"); err(function() { [1, 2, 3].should.include.members('o', 'blah'); - }, "blah: expected 'o' to be an array"); + }, "blah: expected [ 1, 2, 3 ] to be a superset of 'o'"); }); it('memberEquals', function() { @@ -2827,12 +2827,15 @@ describe('should', function() { [5, 4].should.have.same.members([5, 4]); [5, 4, 4].should.have.same.members([5, 4, 4]); [].should.have.same.members([]); + (new Set([])).should.have.same.members(new Set([])); + (new Set([1,2,3])).should.have.same.members(new Set([3,2,1])); [5, 4].should.not.have.same.members([5, 4, 4]); [5, 4, 4].should.not.have.same.members([5, 4]); [5, 4, 4].should.not.have.same.members([5, 4, 3]); [5, 4, 3].should.not.have.same.members([5, 4, 4]); [{a: 1}].should.not.have.same.members([{a: 1}]); + (new Set([1,2,3])).should.not.have.same.members(new Set([2,1])); err(function() { [1, 2, 3].should.have.same.members([], 'blah'); @@ -2840,7 +2843,7 @@ describe('should', function() { err(function() { [1, 2, 3].should.have.same.members(4, 'blah'); - }, 'blah: expected 4 to be an array'); + }, 'blah: expected 4 to be an iterable'); }); it('deep.members', function() { From 2cf92f564a881e93ea3d925bdd6a43f3c497537d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Mon, 12 Feb 2024 14:56:17 +0100 Subject: [PATCH 18/30] Fix publish script (#1602) * Don't publish to GPR * Update node and actions versions * Install playwright before testing and publishing --- .github/workflows/npm-publish.yml | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 2b9c0f90..415e1452 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -11,37 +11,25 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - run: npm ci + - run: npx playwright install --with-deps + - run: npm run build --if-present - run: npm test publish-npm: needs: build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm publish env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 18 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 936c0ca9a4b60193364b9e6e4338bb69f2f28a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Mon, 12 Feb 2024 15:04:33 +0100 Subject: [PATCH 19/30] 5.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 02d36da6..be668933 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "Veselin Todorov ", "John Firebaugh " ], - "version": "5.0.3", + "version": "5.1.0", "repository": { "type": "git", "url": "https://github.com/chaijs/chai" From 8475d2a2e5a4830d3e2a4ce77e8f4cc9dc299ed7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Mon, 19 Feb 2024 23:23:39 +0100 Subject: [PATCH 20/30] Set up ESLint for JSDoc comments (#1605) * Set up ESLint * Fix violations --- eslint.config.js | 12 + lib/chai.js | 4 +- lib/chai/assertion.js | 56 +- lib/chai/config.js | 42 +- lib/chai/core/assertions.js | 408 ++++---- lib/chai/interface/assert.js | 803 +++++++-------- lib/chai/interface/expect.js | 9 +- lib/chai/interface/should.js | 50 +- lib/chai/utils/addChainableMethod.js | 11 +- lib/chai/utils/addLengthGuard.js | 6 +- lib/chai/utils/addMethod.js | 11 +- lib/chai/utils/addProperty.js | 11 +- lib/chai/utils/compareByInspect.js | 9 +- lib/chai/utils/expectTypes.js | 15 +- lib/chai/utils/flag.js | 10 +- lib/chai/utils/getActual.js | 6 +- lib/chai/utils/getEnumerableProperties.js | 5 +- lib/chai/utils/getMessage.js | 8 +- lib/chai/utils/getOperator.js | 12 +- lib/chai/utils/getOwnEnumerableProperties.js | 5 +- .../utils/getOwnEnumerablePropertySymbols.js | 5 +- lib/chai/utils/getProperties.js | 8 +- lib/chai/utils/index.js | 7 +- lib/chai/utils/inspect.js | 9 +- lib/chai/utils/isNaN.js | 6 +- lib/chai/utils/isProxyEnabled.js | 2 +- lib/chai/utils/objDisplay.js | 5 +- lib/chai/utils/overwriteChainableMethod.js | 15 +- lib/chai/utils/overwriteMethod.js | 21 +- lib/chai/utils/overwriteProperty.js | 22 +- lib/chai/utils/proxify.js | 18 +- lib/chai/utils/test.js | 6 +- lib/chai/utils/transferFlags.js | 10 +- lib/chai/utils/type-detect.js | 4 + package-lock.json | 937 +++++++++++++++++- package.json | 5 +- 36 files changed, 1753 insertions(+), 820 deletions(-) create mode 100644 eslint.config.js diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 00000000..c9017f6c --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,12 @@ +import jsdoc from "eslint-plugin-jsdoc"; + +export default [ + jsdoc.configs["flat/recommended"], + { + rules: { + "jsdoc/require-param-description": "off", + "jsdoc/require-returns-description": "off", + "jsdoc/tag-lines": ["error", "any", { startLines: 1 }], + }, + }, +]; diff --git a/lib/chai.js b/lib/chai.js index ca7be863..507d9c76 100644 --- a/lib/chai.js +++ b/lib/chai.js @@ -23,9 +23,9 @@ export {AssertionError}; * * Provides a way to extend the internals of Chai. * - * @param {Function} + * @param {Function} fn * @returns {this} for chaining - * @api public + * @public */ export function use(fn) { const exports = { diff --git a/lib/chai/assertion.js b/lib/chai/assertion.js index e8e1e597..7cc17cda 100644 --- a/lib/chai/assertion.js +++ b/lib/chai/assertion.js @@ -18,37 +18,37 @@ import * as util from './utils/index.js'; * be assigned during instantiation by passing arguments to this constructor: * * - `object`: This flag contains the target of the assertion. For example, in - * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will - * contain `numKittens` so that the `equal` assertion can reference it when - * needed. + * the assertion `expect(numKittens).to.equal(7);`, the `object` flag will + * contain `numKittens` so that the `equal` assertion can reference it when + * needed. * * - `message`: This flag contains an optional custom error message to be - * prepended to the error message that's generated by the assertion when it - * fails. + * prepended to the error message that's generated by the assertion when it + * fails. * * - `ssfi`: This flag stands for "start stack function indicator". It - * contains a function reference that serves as the starting point for - * removing frames from the stack trace of the error that's created by the - * assertion when it fails. The goal is to provide a cleaner stack trace to - * end users by removing Chai's internal functions. Note that it only works - * in environments that support `Error.captureStackTrace`, and only when - * `Chai.config.includeStack` hasn't been set to `false`. + * contains a function reference that serves as the starting point for + * removing frames from the stack trace of the error that's created by the + * assertion when it fails. The goal is to provide a cleaner stack trace to + * end users by removing Chai's internal functions. Note that it only works + * in environments that support `Error.captureStackTrace`, and only when + * `Chai.config.includeStack` hasn't been set to `false`. * * - `lockSsfi`: This flag controls whether or not the given `ssfi` flag - * should retain its current value, even as assertions are chained off of - * this object. This is usually set to `true` when creating a new assertion - * from within another assertion. It's also temporarily set to `true` before - * an overwritten assertion gets called by the overwriting assertion. + * should retain its current value, even as assertions are chained off of + * this object. This is usually set to `true` when creating a new assertion + * from within another assertion. It's also temporarily set to `true` before + * an overwritten assertion gets called by the overwriting assertion. * * - `eql`: This flag contains the deepEqual function to be used by the assertion. * - * @param {Mixed} obj target of the assertion - * @param {String} msg (optional) custom error message + * @param {unknown} obj target of the assertion + * @param {string} msg (optional) custom error message * @param {Function} ssfi (optional) starting point for removing stack frames - * @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked - * @api private + * @param {boolean} lockSsfi (optional) whether or not the ssfi flag is locked + * @returns {unknown} + * @private */ - export function Assertion (obj, msg, ssfi, lockSsfi) { util.flag(this, 'ssfi', ssfi || Assertion); util.flag(this, 'lockSsfi', lockSsfi); @@ -111,13 +111,13 @@ Assertion.overwriteChainableMethod = function (name, fn, chainingBehavior) { * Executes an expression and check expectations. Throws AssertionError for reporting if test doesn't pass. * * @name assert - * @param {Philosophical} expression to be tested - * @param {String|Function} message or function that returns message to display if expression fails - * @param {String|Function} negatedMessage or function that returns negatedMessage to display if negated expression fails - * @param {Mixed} expected value (remember to check for negation) - * @param {Mixed} actual (optional) will default to `this.obj` - * @param {Boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails - * @api private + * @param {unknown} expression to be tested + * @param {string | Function} message or function that returns message to display if expression fails + * @param {string | Function} negatedMessage or function that returns negatedMessage to display if negated expression fails + * @param {unknown} expected value (remember to check for negation) + * @param {unknown} actual (optional) will default to `this.obj` + * @param {boolean} showDiff (optional) when set to `true`, assert will display a diff in addition to the message if expression fails + * @private */ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, showDiff) { @@ -152,7 +152,7 @@ Assertion.prototype.assert = function (expr, msg, negateMsg, expected, _actual, * * Quick reference to stored `actual` value for plugin developers. * - * @api private + * @private */ Object.defineProperty(Assertion.prototype, '_obj', { get: function () { diff --git a/lib/chai/config.js b/lib/chai/config.js index 60257ab8..afeae596 100644 --- a/lib/chai/config.js +++ b/lib/chai/config.js @@ -9,10 +9,9 @@ export const config = { * * chai.config.includeStack = true; // enable stack on error * - * @param {Boolean} - * @api public + * @param {boolean} + * @public */ - includeStack: false, /** @@ -24,10 +23,9 @@ export const config = { * will be true when the assertion has requested a diff * be shown. * - * @param {Boolean} - * @api public + * @param {boolean} + * @public */ - showDiff: true, /** @@ -46,10 +44,9 @@ export const config = { * * chai.config.truncateThreshold = 0; // disable truncating * - * @param {Number} - * @api public + * @param {number} + * @public */ - truncateThreshold: 40, /** @@ -66,10 +63,9 @@ export const config = { * This feature is automatically disabled regardless of this config value * in environments that don't support proxies. * - * @param {Boolean} - * @api public + * @param {boolean} + * @public */ - useProxy: true, /** @@ -87,9 +83,8 @@ export const config = { * chai.config.proxyExcludedKeys = ['then', 'inspect']; * * @param {Array} - * @api public + * @public */ - proxyExcludedKeys: ['then', 'catch', 'inspect', 'toJSON'], /** @@ -101,20 +96,19 @@ export const config = { * * // use a custom comparator * chai.config.deepEqual = (expected, actual) => { - * return chai.util.eql(expected, actual, { - * comparator: (expected, actual) => { - * // for non number comparison, use the default behavior - * if(typeof expected !== 'number') return null; - * // allow a difference of 10 between compared numbers - * return typeof actual === 'number' && Math.abs(actual - expected) < 10 - * } - * }) + * return chai.util.eql(expected, actual, { + * comparator: (expected, actual) => { + * // for non number comparison, use the default behavior + * if(typeof expected !== 'number') return null; + * // allow a difference of 10 between compared numbers + * return typeof actual === 'number' && Math.abs(actual - expected) < 10 + * } + * }) * }; * * @param {Function} - * @api public + * @public */ - deepEqual: null }; diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 7b3b1a4b..7d72b068 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -39,7 +39,7 @@ const {flag} = _; * * @name language chains * @namespace BDD - * @api public + * @public */ [ 'to', 'be', 'been', 'is' @@ -69,7 +69,7 @@ const {flag} = _; * * @name not * @namespace BDD - * @api public + * @public */ Assertion.addProperty('not', function () { @@ -110,7 +110,7 @@ Assertion.addProperty('not', function () { * * @name deep * @namespace BDD - * @api public + * @public */ Assertion.addProperty('deep', function () { @@ -136,7 +136,7 @@ Assertion.addProperty('deep', function () { * * @name nested * @namespace BDD - * @api public + * @public */ Assertion.addProperty('nested', function () { @@ -162,7 +162,7 @@ Assertion.addProperty('nested', function () { * * @name own * @namespace BDD - * @api public + * @public */ Assertion.addProperty('own', function () { @@ -186,7 +186,7 @@ Assertion.addProperty('own', function () { * * @name ordered * @namespace BDD - * @api public + * @public */ Assertion.addProperty('ordered', function () { @@ -206,7 +206,7 @@ Assertion.addProperty('ordered', function () { * * @name any * @namespace BDD - * @api public + * @public */ Assertion.addProperty('any', function () { @@ -231,7 +231,7 @@ Assertion.addProperty('any', function () { * * @name all * @namespace BDD - * @api public + * @public */ Assertion.addProperty('all', function () { @@ -265,7 +265,7 @@ const functionTypes = { * `.a` supports objects that have a custom type set via `Symbol.toStringTag`. * * var myObj = { - * [Symbol.toStringTag]: 'myCustomType' + * [Symbol.toStringTag]: 'myCustomType' * }; * * expect(myObj).to.be.a('myCustomType').but.not.an('object'); @@ -300,10 +300,10 @@ const functionTypes = { * * @name a * @alias an - * @param {String} type - * @param {String} msg _optional_ + * @param {string} type + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ function an (type, msg) { if (msg) flag(this, 'message', msg); @@ -331,6 +331,23 @@ function an (type, msg) { Assertion.addChainableMethod('an', an); Assertion.addChainableMethod('a', an); +/** + * + * @param {unknown} a + * @param {unknown} b + * @returns {boolean} + */ +function SameValueZero(a, b) { + return (_.isNaN(a) && _.isNaN(b)) || a === b; +} + +/** + * + */ +function includeChainingBehavior () { + flag(this, 'contains', true); +} + /** * ### .include(val[, msg]) * @@ -472,20 +489,11 @@ Assertion.addChainableMethod('a', an); * @alias contain * @alias includes * @alias contains - * @param {Mixed} val - * @param {String} msg _optional_ + * @param {unknown} val + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - -function SameValueZero(a, b) { - return (_.isNaN(a) && _.isNaN(b)) || a === b; -} - -function includeChainingBehavior () { - flag(this, 'contains', true); -} - function include (val, msg) { if (msg) flag(this, 'message', msg); @@ -643,9 +651,8 @@ Assertion.addChainableMethod('includes', include, includeChainingBehavior); * * @name ok * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('ok', function () { this.assert( flag(this, 'object') @@ -676,9 +683,8 @@ Assertion.addProperty('ok', function () { * * @name true * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('true', function () { this.assert( true === flag(this, 'object') @@ -701,7 +707,7 @@ Assertion.addProperty('true', function () { * * @name callable * @namespace BDD - * @api public + * @public */ Assertion.addProperty('callable', function () { const val = flag(this, 'object') @@ -748,9 +754,8 @@ Assertion.addProperty('callable', function () { * * @name false * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('false', function () { this.assert( false === flag(this, 'object') @@ -780,9 +785,8 @@ Assertion.addProperty('false', function () { * * @name null * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('null', function () { this.assert( null === flag(this, 'object') @@ -811,9 +815,8 @@ Assertion.addProperty('null', function () { * * @name undefined * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('undefined', function () { this.assert( undefined === flag(this, 'object') @@ -842,9 +845,8 @@ Assertion.addProperty('undefined', function () { * * @name NaN * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('NaN', function () { this.assert( _.isNaN(flag(this, 'object')) @@ -883,9 +885,8 @@ Assertion.addProperty('NaN', function () { * @name exist * @alias exists * @namespace BDD - * @api public + * @public */ - function assertExist () { var val = flag(this, 'object'); this.assert( @@ -944,9 +945,8 @@ Assertion.addProperty('exists', assertExist); * * @name empty * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('empty', function () { var val = flag(this, 'object') , ssfi = flag(this, 'ssfi') @@ -998,7 +998,7 @@ Assertion.addProperty('empty', function () { * Asserts that the target is an `arguments` object. * * function test () { - * expect(arguments).to.be.arguments; + * expect(arguments).to.be.arguments; * } * * test(); @@ -1019,9 +1019,8 @@ Assertion.addProperty('empty', function () { * @name arguments * @alias Arguments * @namespace BDD - * @api public + * @public */ - function checkArguments () { var obj = flag(this, 'object') , type = _.type(obj); @@ -1074,12 +1073,11 @@ Assertion.addProperty('Arguments', checkArguments); * @name equal * @alias equals * @alias eq - * @param {Mixed} val - * @param {String} msg _optional_ + * @param {unknown} val + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertEqual (val, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object'); @@ -1139,12 +1137,11 @@ Assertion.addMethod('eq', assertEqual); * * @name eql * @alias eqls - * @param {Mixed} obj - * @param {String} msg _optional_ + * @param {unknown} obj + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertEql(obj, msg) { if (msg) flag(this, 'message', msg); var eql = flag(this, 'eql'); @@ -1198,12 +1195,11 @@ Assertion.addMethod('eqls', assertEql); * @name above * @alias gt * @alias greaterThan - * @param {Number} n - * @param {String} msg _optional_ + * @param {number} n + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertAbove (n, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -1303,12 +1299,11 @@ Assertion.addMethod('greaterThan', assertAbove); * @name least * @alias gte * @alias greaterThanOrEqual - * @param {Number} n - * @param {String} msg _optional_ + * @param {number} n + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertLeast (n, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -1407,12 +1402,11 @@ Assertion.addMethod('greaterThanOrEqual', assertLeast); * @name below * @alias lt * @alias lessThan - * @param {Number} n - * @param {String} msg _optional_ + * @param {number} n + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertBelow (n, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -1512,12 +1506,11 @@ Assertion.addMethod('lessThan', assertBelow); * @name most * @alias lte * @alias lessThanOrEqual - * @param {Number} n - * @param {String} msg _optional_ + * @param {number} n + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertMost (n, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -1615,13 +1608,12 @@ Assertion.addMethod('lessThanOrEqual', assertMost); * expect(4, 'nooo why fail??').to.be.within(1, 3); * * @name within - * @param {Number} start lower bound inclusive - * @param {Number} finish upper bound inclusive - * @param {String} msg _optional_ + * @param {number} start lower bound inclusive + * @param {number} finish upper bound inclusive + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - Assertion.addMethod('within', function (start, finish, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -1712,13 +1704,12 @@ Assertion.addMethod('within', function (start, finish, msg) { * The alias `.instanceOf` can be used interchangeably with `.instanceof`. * * @name instanceof - * @param {Constructor} constructor - * @param {String} msg _optional_ + * @param {unknown} constructor + * @param {string} msg _optional_ * @alias instanceOf * @namespace BDD - * @api public + * @public */ - function assertInstanceOf (constructor, msg) { if (msg) flag(this, 'message', msg); @@ -1860,14 +1851,12 @@ Assertion.addMethod('instanceOf', assertInstanceOf); * interchangeably with `.own.property`. * * @name property - * @param {String} name - * @param {Mixed} val (optional) - * @param {String} msg _optional_ - * @returns value of property for chaining + * @param {string} name + * @param {unknown} val (optional) + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertProperty (name, val, msg) { if (msg) flag(this, 'message', msg); @@ -1958,6 +1947,12 @@ function assertProperty (name, val, msg) { Assertion.addMethod('property', assertProperty); +/** + * + * @param {unknown} name + * @param {unknown} value + * @param {string} msg + */ function assertOwnProperty (name, value, msg) { flag(this, 'own', true); assertProperty.apply(this, arguments); @@ -1981,10 +1976,10 @@ Assertion.addMethod('haveOwnProperty', assertOwnProperty); * https://github.com/chaijs/deep-eql. * * expect({a: 1}).to.have.ownPropertyDescriptor('a', { - * configurable: true, - * enumerable: true, - * writable: true, - * value: 1, + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, * }); * * Add `.not` earlier in the chain to negate `.ownPropertyDescriptor`. @@ -2007,10 +2002,10 @@ Assertion.addMethod('haveOwnProperty', assertOwnProperty); * * // Not recommended * expect({b: 2}).to.not.have.ownPropertyDescriptor('a', { - * configurable: true, - * enumerable: true, - * writable: true, - * value: 1, + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, * }); * * When the target is expected to have a property descriptor with the given @@ -2020,18 +2015,18 @@ Assertion.addMethod('haveOwnProperty', assertOwnProperty); * * // Recommended * expect({a: 3}).to.have.ownPropertyDescriptor('a', { - * configurable: true, - * enumerable: true, - * writable: true, - * value: 3, + * configurable: true, + * enumerable: true, + * writable: true, + * value: 3, * }); * * // Not recommended * expect({a: 3}).to.not.have.ownPropertyDescriptor('a', { - * configurable: true, - * enumerable: true, - * writable: true, - * value: 1, + * configurable: true, + * enumerable: true, + * writable: true, + * value: 1, * }); * * `.ownPropertyDescriptor` changes the target of any assertions that follow @@ -2048,18 +2043,18 @@ Assertion.addMethod('haveOwnProperty', assertOwnProperty); * * // Recommended * expect({a: 1}).to.have.ownPropertyDescriptor('a', { - * configurable: true, - * enumerable: true, - * writable: true, - * value: 2, + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, * }, 'nooo why fail??'); * * // Recommended * expect({a: 1}, 'nooo why fail??').to.have.ownPropertyDescriptor('a', { - * configurable: true, - * enumerable: true, - * writable: true, - * value: 2, + * configurable: true, + * enumerable: true, + * writable: true, + * value: 2, * }); * * // Recommended @@ -2078,13 +2073,12 @@ Assertion.addMethod('haveOwnProperty', assertOwnProperty); * * @name ownPropertyDescriptor * @alias haveOwnPropertyDescriptor - * @param {String} name - * @param {Object} descriptor _optional_ - * @param {String} msg _optional_ + * @param {string} name + * @param {object} descriptor _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertOwnPropertyDescriptor (name, descriptor, msg) { if (typeof descriptor === 'string') { msg = descriptor; @@ -2116,6 +2110,13 @@ function assertOwnPropertyDescriptor (name, descriptor, msg) { Assertion.addMethod('ownPropertyDescriptor', assertOwnPropertyDescriptor); Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); +/** + * + */ +function assertLengthChain () { + flag(this, 'doLength', true); +} + /** * ### .lengthOf(n[, msg]) * @@ -2168,16 +2169,11 @@ Assertion.addMethod('haveOwnPropertyDescriptor', assertOwnPropertyDescriptor); * * @name lengthOf * @alias length - * @param {Number} n - * @param {String} msg _optional_ + * @param {number} n + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - -function assertLengthChain () { - flag(this, 'doLength', true); -} - function assertLength (n, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -2233,9 +2229,9 @@ Assertion.addChainableMethod('lengthOf', assertLength, assertLengthChain); * @name match * @alias matches * @param {RegExp} re - * @param {String} msg _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ function assertMatch(re, msg) { if (msg) flag(this, 'message', msg); @@ -2269,12 +2265,11 @@ Assertion.addMethod('matches', assertMatch); * expect('foobar', 'nooo why fail??').to.have.string('taco'); * * @name string - * @param {String} str - * @param {String} msg _optional_ + * @param {string} str + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - Assertion.addMethod('string', function (str, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -2388,11 +2383,10 @@ Assertion.addMethod('string', function (str, msg) { * * @name keys * @alias key - * @param {...String|Array|Object} keys + * @param {...string | Array | object} keys * @namespace BDD - * @api public + * @public */ - function assertKeys (keys) { var obj = flag(this, 'object') , objType = _.type(obj) @@ -2522,7 +2516,6 @@ Assertion.addMethod('key', assertKeys); * asserts that an error is thrown. * * var badFn = function () { throw new TypeError('Illegal salmon!'); }; - * * expect(badFn).to.throw(); * * When one argument is provided, and it's an error constructor, `.throw` @@ -2530,7 +2523,6 @@ Assertion.addMethod('key', assertKeys); * instance of that error constructor. * * var badFn = function () { throw new TypeError('Illegal salmon!'); }; - * * expect(badFn).to.throw(TypeError); * * When one argument is provided, and it's an error instance, `.throw` invokes @@ -2547,7 +2539,6 @@ Assertion.addMethod('key', assertKeys); * contains that string. * * var badFn = function () { throw new TypeError('Illegal salmon!'); }; - * * expect(badFn).to.throw('salmon'); * * When one argument is provided, and it's a regular expression, `.throw` @@ -2555,7 +2546,6 @@ Assertion.addMethod('key', assertKeys); * message that matches that regular expression. * * var badFn = function () { throw new TypeError('Illegal salmon!'); }; - * * expect(badFn).to.throw(/salmon/); * * When two arguments are provided, and the first is an error instance or @@ -2574,7 +2564,6 @@ Assertion.addMethod('key', assertKeys); * Add `.not` earlier in the chain to negate `.throw`. * * var goodFn = function () {}; - * * expect(goodFn).to.not.throw(); * * However, it's dangerous to negate `.throw` when providing any arguments. @@ -2671,15 +2660,14 @@ Assertion.addMethod('key', assertKeys); * @name throw * @alias throws * @alias Throw - * @param {Error|ErrorConstructor} errorLike - * @param {String|RegExp} errMsgMatcher error message - * @param {String} msg _optional_ + * @param {Error} errorLike + * @param {string | RegExp} errMsgMatcher error message + * @param {string} msg _optional_ * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types - * @returns error for chaining (null if no error) + * @returns {void} error for chaining (null if no error) * @namespace BDD - * @api public + * @public */ - function assertThrows (errorLike, errMsgMatcher, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -2869,12 +2857,11 @@ Assertion.addMethod('Throw', assertThrows); * * @name respondTo * @alias respondsTo - * @param {String} method - * @param {String} msg _optional_ + * @param {string} method + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function respondTo (method, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -2910,9 +2897,8 @@ Assertion.addMethod('respondsTo', respondTo); * * @name itself * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('itself', function () { flag(this, 'itself', true); }); @@ -2924,13 +2910,13 @@ Assertion.addProperty('itself', function () { * first argument, and asserts that the value returned is truthy. * * expect(1).to.satisfy(function(num) { - * return num > 0; + * return num > 0; * }); * * Add `.not` earlier in the chain to negate `.satisfy`. * * expect(1).to.not.satisfy(function(num) { - * return num > 2; + * return num > 2; * }); * * `.satisfy` accepts an optional `msg` argument which is a custom error @@ -2938,11 +2924,11 @@ Assertion.addProperty('itself', function () { * the second argument to `expect`. * * expect(1).to.satisfy(function(num) { - * return num > 2; + * return num > 2; * }, 'nooo why fail??'); * * expect(1, 'nooo why fail??').to.satisfy(function(num) { - * return num > 2; + * return num > 2; * }); * * The alias `.satisfies` can be used interchangeably with `.satisfy`. @@ -2950,11 +2936,10 @@ Assertion.addProperty('itself', function () { * @name satisfy * @alias satisfies * @param {Function} matcher - * @param {String} msg _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function satisfy (matcher, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object'); @@ -3002,13 +2987,12 @@ Assertion.addMethod('satisfies', satisfy); * * @name closeTo * @alias approximately - * @param {Number} expected - * @param {Number} delta - * @param {String} msg _optional_ + * @param {number} expected + * @param {number} delta + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function closeTo(expected, delta, msg) { if (msg) flag(this, 'message', msg); var obj = flag(this, 'object') @@ -3036,7 +3020,14 @@ function closeTo(expected, delta, msg) { Assertion.addMethod('closeTo', closeTo); Assertion.addMethod('approximately', closeTo); -// Note: Duplicates are ignored if testing for inclusion instead of sameness. +/** + * @param {unknown} _subset + * @param {unknown} _superset + * @param {unknown} cmp + * @param {unknown} contains + * @param {unknown} ordered + * @returns {boolean} + */ function isSubsetOf(_subset, _superset, cmp, contains, ordered) { let superset = Array.from(_superset); let subset = Array.from(_subset); @@ -3131,9 +3122,9 @@ function isSubsetOf(_subset, _superset, cmp, contains, ordered) { * * @name members * @param {Array} set - * @param {String} msg _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ Assertion.addMethod('members', function (subset, msg) { if (msg) flag(this, 'message', msg); @@ -3190,7 +3181,7 @@ Assertion.addMethod('members', function (subset, msg) { * * @name iterable * @namespace BDD - * @api public + * @public */ Assertion.addProperty('iterable', function(msg) { if (msg) flag(this, 'message', msg); @@ -3237,11 +3228,10 @@ Assertion.addProperty('iterable', function(msg) { * * @name oneOf * @param {Array<*>} list - * @param {String} msg _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function oneOf (list, msg) { if (msg) flag(this, 'message', msg); var expected = flag(this, 'object') @@ -3292,8 +3282,8 @@ Assertion.addMethod('oneOf', oneOf); * to assert that `subject` is equal to its expected value. * * var dots = '' - * , addDot = function () { dots += '.'; } - * , getDots = function () { return dots; }; + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; * * // Recommended * expect(getDots()).to.equal(''); @@ -3308,7 +3298,7 @@ Assertion.addMethod('oneOf', oneOf); * target function compared to afterward. * * var myObj = {dots: ''} - * , addDot = function () { myObj.dots += '.'; }; + * , addDot = function () { myObj.dots += '.'; }; * * // Recommended * expect(myObj).to.have.property('dots', ''); @@ -3323,13 +3313,13 @@ Assertion.addMethod('oneOf', oneOf); * Add `.not` earlier in the chain to negate `.change`. * * var dots = '' - * , noop = function () {} - * , getDots = function () { return dots; }; + * , noop = function () {} + * , getDots = function () { return dots; }; * * expect(noop).to.not.change(getDots); * * var myObj = {dots: ''} - * , noop = function () {}; + * , noop = function () {}; * * expect(noop).to.not.change(myObj, 'dots'); * @@ -3339,13 +3329,13 @@ Assertion.addMethod('oneOf', oneOf); * use the second form. * * var myObj = {dots: ''} - * , addDot = function () { myObj.dots += '.'; }; + * , addDot = function () { myObj.dots += '.'; }; * * expect(addDot).to.not.change(myObj, 'dots', 'nooo why fail??'); * * var dots = '' - * , addDot = function () { dots += '.'; } - * , getDots = function () { return dots; }; + * , addDot = function () { dots += '.'; } + * , getDots = function () { return dots; }; * * expect(addDot, 'nooo why fail??').to.not.change(getDots); * @@ -3358,8 +3348,8 @@ Assertion.addMethod('oneOf', oneOf); * that only accepts that exact output. * * var myObj = {val: 1} - * , addTwo = function () { myObj.val += 2; } - * , subtractTwo = function () { myObj.val -= 2; }; + * , addTwo = function () { myObj.val += 2; } + * , subtractTwo = function () { myObj.val -= 2; }; * * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended * expect(addTwo).to.change(myObj, 'val').by(2); // Not recommended @@ -3371,13 +3361,12 @@ Assertion.addMethod('oneOf', oneOf); * * @name change * @alias changes - * @param {String} subject - * @param {String} prop name _optional_ - * @param {String} msg _optional_ + * @param {string} subject + * @param {string} prop name _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertChanges (subject, prop, msg) { if (msg) flag(this, 'message', msg); var fn = flag(this, 'object') @@ -3428,8 +3417,8 @@ Assertion.addMethod('changes', assertChanges); * by any amount. * * var val = 1 - * , addTwo = function () { val += 2; } - * , getVal = function () { return val; }; + * , addTwo = function () { val += 2; } + * , getVal = function () { return val; }; * * expect(addTwo).to.increase(getVal).by(2); // Recommended * expect(addTwo).to.increase(getVal); // Not recommended @@ -3439,7 +3428,7 @@ Assertion.addMethod('changes', assertChanges); * target function compared to beforehand. * * var myObj = {val: 1} - * , addTwo = function () { myObj.val += 2; }; + * , addTwo = function () { myObj.val += 2; }; * * expect(addTwo).to.increase(myObj, 'val').by(2); // Recommended * expect(addTwo).to.increase(myObj, 'val'); // Not recommended @@ -3454,7 +3443,7 @@ Assertion.addMethod('changes', assertChanges); * decreased by the expected amount. * * var myObj = {val: 1} - * , subtractTwo = function () { myObj.val -= 2; }; + * , subtractTwo = function () { myObj.val -= 2; }; * * expect(subtractTwo).to.decrease(myObj, 'val').by(2); // Recommended * expect(subtractTwo).to.not.increase(myObj, 'val'); // Not recommended @@ -3463,7 +3452,7 @@ Assertion.addMethod('changes', assertChanges); * exactly that. * * var myObj = {val: 1} - * , noop = function () {}; + * , noop = function () {}; * * expect(noop).to.not.change(myObj, 'val'); // Recommended * expect(noop).to.not.increase(myObj, 'val'); // Not recommended @@ -3474,13 +3463,13 @@ Assertion.addMethod('changes', assertChanges); * use the second form. * * var myObj = {val: 1} - * , noop = function () {}; + * , noop = function () {}; * * expect(noop).to.increase(myObj, 'val', 'nooo why fail??'); * * var val = 1 - * , noop = function () {} - * , getVal = function () { return val; }; + * , noop = function () {} + * , getVal = function () { return val; }; * * expect(noop, 'nooo why fail??').to.increase(getVal); * @@ -3488,13 +3477,12 @@ Assertion.addMethod('changes', assertChanges); * * @name increase * @alias increases - * @param {String|Function} subject - * @param {String} prop name _optional_ - * @param {String} msg _optional_ + * @param {string | Function} subject + * @param {string} prop name _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertIncreases (subject, prop, msg) { if (msg) flag(this, 'message', msg); var fn = flag(this, 'object') @@ -3607,13 +3595,12 @@ Assertion.addMethod('increases', assertIncreases); * * @name decrease * @alias decreases - * @param {String|Function} subject - * @param {String} prop name _optional_ - * @param {String} msg _optional_ + * @param {string | Function} subject + * @param {string} prop name _optional_ + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertDecreases (subject, prop, msg) { if (msg) flag(this, 'message', msg); var fn = flag(this, 'object') @@ -3714,12 +3701,11 @@ Assertion.addMethod('decreases', assertDecreases); * expect(addTwo, 'nooo why fail??').to.increase(myObj, 'val').by(3); * * @name by - * @param {Number} delta - * @param {String} msg _optional_ + * @param {number} delta + * @param {string} msg _optional_ * @namespace BDD - * @api public + * @public */ - function assertDelta(delta, msg) { if (msg) flag(this, 'message', msg); @@ -3756,8 +3742,8 @@ Assertion.addMethod('by', assertDelta); * Add `.not` earlier in the chain to negate `.extensible`. * * var nonExtensibleObject = Object.preventExtensions({}) - * , sealedObject = Object.seal({}) - * , frozenObject = Object.freeze({}); + * , sealedObject = Object.seal({}) + * , frozenObject = Object.freeze({}); * * expect(nonExtensibleObject).to.not.be.extensible; * expect(sealedObject).to.not.be.extensible; @@ -3770,9 +3756,8 @@ Assertion.addMethod('by', assertDelta); * * @name extensible * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('extensible', function() { var obj = flag(this, 'object'); @@ -3815,9 +3800,8 @@ Assertion.addProperty('extensible', function() { * * @name sealed * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('sealed', function() { var obj = flag(this, 'object'); @@ -3857,9 +3841,8 @@ Assertion.addProperty('sealed', function() { * * @name frozen * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('frozen', function() { var obj = flag(this, 'object'); @@ -3923,9 +3906,8 @@ Assertion.addProperty('frozen', function() { * * @name finite * @namespace BDD - * @api public + * @public */ - Assertion.addProperty('finite', function(msg) { var obj = flag(this, 'object'); diff --git a/lib/chai/interface/assert.js b/lib/chai/interface/assert.js index 2d9fd9a3..c31784f0 100644 --- a/lib/chai/interface/assert.js +++ b/lib/chai/interface/assert.js @@ -17,13 +17,13 @@ import {AssertionError} from 'assertion-error'; * assert('foo' !== 'bar', 'foo is not bar'); * assert(Array.isArray([]), 'empty arrays are arrays'); * - * @param {unknown} expression to test for truthiness - * @param {String} message to display on error + * @param {unknown} express - expression to test for truthiness + * @param {string} errmsg - message to display on error * @name assert * @namespace Assert * @public */ -function assert(express, errmsg) { +export function assert(express, errmsg) { var test = new Assertion(null, null, chai.assert, true); test.assert( express @@ -32,8 +32,6 @@ function assert(express, errmsg) { ); } -export {assert}; - /** * ### .fail([message]) * ### .fail(actual, expected, [message], [operator]) @@ -50,8 +48,8 @@ export {assert}; * @name fail * @param {unknown} actual * @param {unknown} expected - * @param {String} message - * @param {String} operator + * @param {string} message + * @param {string} operator * @namespace Assert * @public */ @@ -81,8 +79,8 @@ assert.fail = function (actual, expected, message, operator) { * * @name isOk * @alias ok - * @param {unknown} object to test - * @param {String} message + * @param {unknown} val object to test + * @param {string} msg * @namespace Assert * @public */ @@ -100,8 +98,8 @@ assert.isOk = function (val, msg) { * * @name isNotOk * @alias notOk - * @param {unknown} object to test - * @param {String} message + * @param {unknown} val object to test + * @param {string} msg * @namespace Assert * @public */ @@ -117,9 +115,9 @@ assert.isNotOk = function (val, msg) { * assert.equal(3, '3', '== coerces values to strings'); * * @name equal - * @param {unknown} actual - * @param {unknown} expected - * @param {String} message + * @param {unknown} act + * @param {unknown} exp + * @param {string} msg * @namespace Assert * @public */ @@ -144,9 +142,9 @@ assert.equal = function (act, exp, msg) { * assert.notEqual(3, 4, 'these numbers are not equal'); * * @name notEqual - * @param {unknown} actual - * @param {unknown} expected - * @param {String} message + * @param {unknown} act + * @param {unknown} exp + * @param {string} msg * @namespace Assert * @public */ @@ -171,9 +169,9 @@ assert.notEqual = function (act, exp, msg) { * assert.strictEqual(true, true, 'these booleans are strictly equal'); * * @name strictEqual - * @param {unknown} actual - * @param {unknown} expected - * @param {String} message + * @param {unknown} act + * @param {unknown} exp + * @param {string} msg * @namespace Assert * @public */ @@ -189,9 +187,9 @@ assert.strictEqual = function (act, exp, msg) { * assert.notStrictEqual(3, '3', 'no coercion for strict equality'); * * @name notStrictEqual - * @param {unknown} actual - * @param {unknown} expected - * @param {String} message + * @param {unknown} act + * @param {unknown} exp + * @param {string} msg * @namespace Assert * @public */ @@ -207,9 +205,9 @@ assert.notStrictEqual = function (act, exp, msg) { * assert.deepEqual({ tea: 'green' }, { tea: 'green' }); * * @name deepEqual - * @param {unknown} actual - * @param {unknown} expected - * @param {String} message + * @param {unknown} act + * @param {unknown} exp + * @param {string} msg * @alias deepStrictEqual * @namespace Assert * @public @@ -226,9 +224,9 @@ assert.deepEqual = assert.deepStrictEqual = function (act, exp, msg) { * assert.notDeepEqual({ tea: 'green' }, { tea: 'jasmine' }); * * @name notDeepEqual - * @param {unknown} actual - * @param {unknown} expected - * @param {String} message + * @param {unknown} act + * @param {unknown} exp + * @param {string} msg * @namespace Assert * @public */ @@ -236,7 +234,7 @@ assert.notDeepEqual = function (act, exp, msg) { new Assertion(act, msg, assert.notDeepEqual, true).to.not.eql(exp); }; - /** +/** * ### .isAbove(valueToCheck, valueToBeAbove, [message]) * * Asserts `valueToCheck` is strictly greater than (>) `valueToBeAbove`. @@ -244,9 +242,9 @@ assert.notDeepEqual = function (act, exp, msg) { * assert.isAbove(5, 2, '5 is strictly greater than 2'); * * @name isAbove - * @param {unknown} valueToCheck - * @param {unknown} valueToBeAbove - * @param {String} message + * @param {unknown} val + * @param {unknown} abv + * @param {string} msg * @namespace Assert * @public */ @@ -254,7 +252,7 @@ assert.isAbove = function (val, abv, msg) { new Assertion(val, msg, assert.isAbove, true).to.be.above(abv); }; - /** +/** * ### .isAtLeast(valueToCheck, valueToBeAtLeast, [message]) * * Asserts `valueToCheck` is greater than or equal to (>=) `valueToBeAtLeast`. @@ -263,9 +261,9 @@ assert.isAbove = function (val, abv, msg) { * assert.isAtLeast(3, 3, '3 is greater or equal to 3'); * * @name isAtLeast - * @param {unknown} valueToCheck - * @param {unknown} valueToBeAtLeast - * @param {String} message + * @param {unknown} val + * @param {unknown} atlst + * @param {string} msg * @namespace Assert * @public */ @@ -273,7 +271,7 @@ assert.isAtLeast = function (val, atlst, msg) { new Assertion(val, msg, assert.isAtLeast, true).to.be.least(atlst); }; - /** +/** * ### .isBelow(valueToCheck, valueToBeBelow, [message]) * * Asserts `valueToCheck` is strictly less than (<) `valueToBeBelow`. @@ -281,9 +279,9 @@ assert.isAtLeast = function (val, atlst, msg) { * assert.isBelow(3, 6, '3 is strictly less than 6'); * * @name isBelow - * @param {unknown} valueToCheck - * @param {unknown} valueToBeBelow - * @param {String} message + * @param {unknown} val + * @param {unknown} blw + * @param {string} msg * @namespace Assert * @public */ @@ -291,7 +289,7 @@ assert.isBelow = function (val, blw, msg) { new Assertion(val, msg, assert.isBelow, true).to.be.below(blw); }; - /** +/** * ### .isAtMost(valueToCheck, valueToBeAtMost, [message]) * * Asserts `valueToCheck` is less than or equal to (<=) `valueToBeAtMost`. @@ -300,9 +298,9 @@ assert.isBelow = function (val, blw, msg) { * assert.isAtMost(4, 4, '4 is less than or equal to 4'); * * @name isAtMost - * @param {unknown} valueToCheck - * @param {unknown} valueToBeAtMost - * @param {String} message + * @param {unknown} val + * @param {unknown} atmst + * @param {string} msg * @namespace Assert * @public */ @@ -319,8 +317,8 @@ assert.isAtMost = function (val, atmst, msg) { * assert.isTrue(teaServed, 'the tea has been served'); * * @name isTrue - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -337,8 +335,8 @@ assert.isTrue = function (val, msg) { * assert.isNotTrue(tea, 'great, time for tea!'); * * @name isNotTrue - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -355,8 +353,8 @@ assert.isNotTrue = function (val, msg) { * assert.isFalse(teaServed, 'no tea yet? hmm...'); * * @name isFalse - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -373,8 +371,8 @@ assert.isFalse = function (val, msg) { * assert.isNotFalse(tea, 'great, time for tea!'); * * @name isNotFalse - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -390,8 +388,8 @@ assert.isNotFalse = function (val, msg) { * assert.isNull(err, 'there was no error'); * * @name isNull - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -408,8 +406,8 @@ assert.isNull = function (val, msg) { * assert.isNotNull(tea, 'great, time for tea!'); * * @name isNotNull - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -425,8 +423,8 @@ assert.isNotNull = function (val, msg) { * assert.isNaN(NaN, 'NaN is NaN'); * * @name isNaN - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -443,11 +441,12 @@ assert.isNaN = function (val, msg) { * * @name isNotNaN * @param {unknown} value - * @param {String} message + * @param {string} message * @namespace Assert * @public - */assert.isNotNaN = function (val, msg) { - new Assertion(val, msg, assert.isNotNaN, true).not.to.be.NaN; + */ +assert.isNotNaN = function (value, message) { + new Assertion(value, message, assert.isNotNaN, true).not.to.be.NaN; }; /** @@ -456,12 +455,11 @@ assert.isNaN = function (val, msg) { * Asserts that the target is neither `null` nor `undefined`. * * var foo = 'hi'; - * * assert.exists(foo, 'foo is neither `null` nor `undefined`'); * * @name exists - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -475,14 +473,14 @@ assert.exists = function (val, msg) { * Asserts that the target is either `null` or `undefined`. * * var bar = null - * , baz; + * , baz; * * assert.notExists(bar); * assert.notExists(baz, 'baz is either null or undefined'); * * @name notExists - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -499,8 +497,8 @@ assert.notExists = function (val, msg) { * assert.isUndefined(tea, 'no tea defined'); * * @name isUndefined - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -517,8 +515,8 @@ assert.isUndefined = function (val, msg) { * assert.isDefined(tea, 'tea has been defined'); * * @name isDefined - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -536,11 +534,12 @@ assert.isDefined = function (val, msg) { * * @name isCallable * @param {unknown} value - * @param {String} message + * @param {string} message * @namespace Assert * @public - */assert.isCallable = function (val, msg) { - new Assertion(val, msg, assert.isCallable, true).is.callable; + */ +assert.isCallable = function (value, message) { + new Assertion(value, message, assert.isCallable, true).is.callable; } /** @@ -553,11 +552,12 @@ assert.isDefined = function (val, msg) { * * @name isNotCallable * @param {unknown} value - * @param {String} message + * @param {string} message * @namespace Assert * @public - */assert.isNotCallable = function (val, msg) { - new Assertion(val, msg, assert.isNotCallable, true).is.not.callable; + */ +assert.isNotCallable = function (value, message) { + new Assertion(value, message, assert.isNotCallable, true).is.not.callable; }; /** @@ -570,8 +570,8 @@ assert.isDefined = function (val, msg) { * assert.isObject(selection, 'tea selection is an object'); * * @name isObject - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -589,8 +589,8 @@ assert.isObject = function (val, msg) { * assert.isNotObject(null, 'null is not an object'); * * @name isNotObject - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -607,8 +607,8 @@ assert.isNotObject = function (val, msg) { * assert.isArray(menu, 'what kind of tea do we want?'); * * @name isArray - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -625,8 +625,8 @@ assert.isArray = function (val, msg) { * assert.isNotArray(menu, 'what kind of tea do we want?'); * * @name isNotArray - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -643,8 +643,8 @@ assert.isNotArray = function (val, msg) { * assert.isString(teaOrder, 'order placed'); * * @name isString - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -661,8 +661,8 @@ assert.isString = function (val, msg) { * assert.isNotString(teaOrder, 'order placed'); * * @name isNotString - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -679,8 +679,8 @@ assert.isNotString = function (val, msg) { * assert.isNumber(cups, 'how many cups'); * * @name isNumber - * @param {Number} value - * @param {String} message + * @param {number} val + * @param {string} msg * @namespace Assert * @public */ @@ -697,8 +697,8 @@ assert.isNumber = function (val, msg) { * assert.isNotNumber(cups, 'how many cups'); * * @name isNotNumber - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -707,21 +707,20 @@ assert.isNotNumber = function (val, msg) { }; /** - * ### .isFinite(value, [message]) - * - * Asserts that `value` is a finite number. Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. - * - * var cups = 2; - * assert.isFinite(cups, 'how many cups'); - * - * assert.isFinite(NaN); // throws - * - * @name isFinite - * @param {Number} value - * @param {String} message - * @namespace Assert - * @public - */ + * ### .isFinite(value, [message]) + * + * Asserts that `value` is a finite number. Unlike `.isNumber`, this will fail for `NaN` and `Infinity`. + * + * var cups = 2; + * assert.isFinite(cups, 'how many cups'); + * assert.isFinite(NaN); // throws + * + * @name isFinite + * @param {number} val + * @param {string} msg + * @namespace Assert + * @public + */ assert.isFinite = function (val, msg) { new Assertion(val, msg, assert.isFinite, true).to.be.finite; }; @@ -732,14 +731,14 @@ assert.isFinite = function (val, msg) { * Asserts that `value` is a boolean. * * var teaReady = true - * , teaServed = false; + * , teaServed = false; * * assert.isBoolean(teaReady, 'is the tea ready'); * assert.isBoolean(teaServed, 'has tea been served'); * * @name isBoolean - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -753,14 +752,14 @@ assert.isBoolean = function (val, msg) { * Asserts that `value` is _not_ a boolean. * * var teaReady = 'yep' - * , teaServed = 'nope'; + * , teaServed = 'nope'; * * assert.isNotBoolean(teaReady, 'is the tea ready'); * assert.isNotBoolean(teaServed, 'has tea been served'); * * @name isNotBoolean - * @param {unknown} value - * @param {String} message + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -782,9 +781,9 @@ assert.isNotBoolean = function (val, msg) { * assert.typeOf(undefined, 'undefined', 'we have an undefined'); * * @name typeOf - * @param {unknown} value - * @param {String} name - * @param {String} message + * @param {unknown} val + * @param {string} type + * @param {string} msg * @namespace Assert * @public */ @@ -802,13 +801,13 @@ assert.typeOf = function (val, type, msg) { * * @name notTypeOf * @param {unknown} value - * @param {String} typeof name - * @param {String} message + * @param {string} type + * @param {string} message * @namespace Assert * @public */ -assert.notTypeOf = function (val, type, msg) { - new Assertion(val, msg, assert.notTypeOf, true).to.not.be.a(type); +assert.notTypeOf = function (value, type, message) { + new Assertion(value, message, assert.notTypeOf, true).to.not.be.a(type); }; /** @@ -817,14 +816,14 @@ assert.notTypeOf = function (val, type, msg) { * Asserts that `value` is an instance of `constructor`. * * var Tea = function (name) { this.name = name; } - * , chai = new Tea('chai'); + * , chai = new Tea('chai'); * * assert.instanceOf(chai, Tea, 'chai is an instance of tea'); * * @name instanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message + * @param {object} val + * @param {object} type + * @param {string} msg * @namespace Assert * @public */ @@ -838,14 +837,14 @@ assert.instanceOf = function (val, type, msg) { * Asserts `value` is not an instance of `constructor`. * * var Tea = function (name) { this.name = name; } - * , chai = new String('chai'); + * , chai = new String('chai'); * * assert.notInstanceOf(chai, Tea, 'chai is not an instance of tea'); * * @name notInstanceOf - * @param {Object} object - * @param {Constructor} constructor - * @param {String} message + * @param {object} val + * @param {object} type + * @param {string} msg * @namespace Assert * @public */ @@ -872,15 +871,15 @@ assert.notInstanceOf = function (val, type, msg) { * and strictly equal to the given property value. For instance: * * var obj1 = {a: 1} - * , obj2 = {b: 2}; + * , obj2 = {b: 2}; * assert.include([obj1, obj2], obj1); * assert.include({foo: obj1, bar: obj2}, {foo: obj1}); * assert.include({foo: obj1, bar: obj2}, {foo: obj1, bar: obj2}); * * @name include - * @param {Array|String} haystack - * @param {unknown} needle - * @param {String} message + * @param {Array | string} exp + * @param {unknown} inc + * @param {string} msg * @namespace Assert * @public */ @@ -907,15 +906,15 @@ assert.include = function (exp, inc, msg) { * property value. For instance: * * var obj1 = {a: 1} - * , obj2 = {b: 2}; + * , obj2 = {b: 2}; * assert.notInclude([obj1, obj2], {a: 1}); * assert.notInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); * assert.notInclude({foo: obj1, bar: obj2}, {foo: obj1, bar: {b: 2}}); * * @name notInclude - * @param {Array|String} haystack - * @param {unknown} needle - * @param {String} message + * @param {Array | string} exp + * @param {unknown} inc + * @param {string} msg * @namespace Assert * @public */ @@ -931,15 +930,15 @@ assert.notInclude = function (exp, inc, msg) { * Deep equality is used. * * var obj1 = {a: 1} - * , obj2 = {b: 2}; + * , obj2 = {b: 2}; * assert.deepInclude([obj1, obj2], {a: 1}); * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}}); * assert.deepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 2}}); * * @name deepInclude - * @param {Array|String} haystack - * @param {unknown} needle - * @param {String} message + * @param {Array | string} exp + * @param {unknown} inc + * @param {string} msg * @namespace Assert * @public */ @@ -955,15 +954,15 @@ assert.deepInclude = function (exp, inc, msg) { * Deep equality is used. * * var obj1 = {a: 1} - * , obj2 = {b: 2}; + * , obj2 = {b: 2}; * assert.notDeepInclude([obj1, obj2], {a: 9}); * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 9}}); * assert.notDeepInclude({foo: obj1, bar: obj2}, {foo: {a: 1}, bar: {b: 9}}); * * @name notDeepInclude - * @param {Array|String} haystack - * @param {unknown} needle - * @param {String} message + * @param {Array | string} exp + * @param {unknown} inc + * @param {string} msg * @namespace Assert * @public */ @@ -985,9 +984,9 @@ assert.notDeepInclude = function (exp, inc, msg) { * assert.nestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'x'}); * * @name nestedInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1009,9 +1008,9 @@ assert.nestedInclude = function (exp, inc, msg) { * assert.notNestedInclude({'a': {'[b]': 'x'}}, {'a.\\[b\\]': 'y'}); * * @name notNestedInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1034,9 +1033,9 @@ assert.notNestedInclude = function (exp, inc, msg) { * assert.deepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {x: 1}}); * * @name deepNestedInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1059,9 +1058,9 @@ assert.deepNestedInclude = function(exp, inc, msg) { * assert.notDeepNestedInclude({'.a': {'[b]': {x: 1}}}, {'\\.a.\\[b\\]': {y: 2}}); * * @name notDeepNestedInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1080,9 +1079,9 @@ assert.notDeepNestedInclude = function(exp, inc, msg) { * assert.ownInclude({ a: 1 }, { a: 1 }); * * @name ownInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1098,13 +1097,12 @@ assert.ownInclude = function(exp, inc, msg) { * object while ignoring inherited properties. * * Object.prototype.b = 2; - * * assert.notOwnInclude({ a: 1 }, { b: 2 }); * * @name notOwnInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1119,12 +1117,12 @@ assert.notOwnInclude = function(exp, inc, msg) { * Can be used to assert the inclusion of a subset of properties in an * object while ignoring inherited properties and checking for deep equality. * - * assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}}); + * assert.deepOwnInclude({a: {b: 2}}, {a: {b: 2}}); * * @name deepOwnInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1133,19 +1131,19 @@ assert.deepOwnInclude = function(exp, inc, msg) { .deep.own.include(inc); }; - /** +/** * ### .notDeepOwnInclude(haystack, needle, [message]) * - * Asserts that 'haystack' does not include 'needle'. + * Asserts that 'haystack' includes 'needle'. * Can be used to assert the absence of a subset of properties in an * object while ignoring inherited properties and checking for deep equality. * - * assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}}); + * assert.notDeepOwnInclude({a: {b: 2}}, {a: {c: 3}}); * * @name notDeepOwnInclude - * @param {Object} haystack - * @param {Object} needle - * @param {String} message + * @param {object} exp + * @param {object} inc + * @param {string} msg * @namespace Assert * @public */ @@ -1162,9 +1160,9 @@ assert.notDeepOwnInclude = function(exp, inc, msg) { * assert.match('foobar', /^foo/, 'regexp matches'); * * @name match - * @param {unknown} value - * @param {RegExp} regexp - * @param {String} message + * @param {unknown} exp + * @param {RegExp} re + * @param {string} msg * @namespace Assert * @public */ @@ -1180,9 +1178,9 @@ assert.match = function (exp, re, msg) { * assert.notMatch('foobar', /^foo/, 'regexp does not match'); * * @name notMatch - * @param {unknown} value - * @param {RegExp} regexp - * @param {String} message + * @param {unknown} exp + * @param {RegExp} re + * @param {string} msg * @namespace Assert * @public */ @@ -1200,9 +1198,9 @@ assert.notMatch = function (exp, re, msg) { * assert.property({ tea: { green: 'matcha' }}, 'toString'); * * @name property - * @param {Object} object - * @param {String} property - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {string} msg * @namespace Assert * @public */ @@ -1219,9 +1217,9 @@ assert.property = function (obj, prop, msg) { * assert.notProperty({ tea: { green: 'matcha' }}, 'coffee'); * * @name notProperty - * @param {Object} object - * @param {String} property - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {string} msg * @namespace Assert * @public */ @@ -1240,10 +1238,10 @@ assert.notProperty = function (obj, prop, msg) { * assert.propertyVal({ tea: 'is good' }, 'tea', 'is good'); * * @name propertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1263,10 +1261,10 @@ assert.propertyVal = function (obj, prop, val, msg) { * assert.notPropertyVal({ tea: 'is good' }, 'coffee', 'is good'); * * @name notPropertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1284,10 +1282,10 @@ assert.notPropertyVal = function (obj, prop, val, msg) { * assert.deepPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); * * @name deepPropertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1307,10 +1305,10 @@ assert.deepPropertyVal = function (obj, prop, val, msg) { * assert.notDeepPropertyVal({ tea: { green: 'matcha' } }, 'coffee', { green: 'matcha' }); * * @name notDeepPropertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1328,9 +1326,9 @@ assert.notDeepPropertyVal = function (obj, prop, val, msg) { * assert.ownProperty({ tea: { green: 'matcha' }}, 'tea'); * * @name ownProperty - * @param {Object} object - * @param {String} property - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {string} msg * @public */ assert.ownProperty = function (obj, prop, msg) { @@ -1348,9 +1346,9 @@ assert.ownProperty = function (obj, prop, msg) { * assert.notOwnProperty({}, 'toString'); * * @name notOwnProperty - * @param {Object} object - * @param {String} property - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {string} msg * @public */ assert.notOwnProperty = function (obj, prop, msg) { @@ -1368,10 +1366,10 @@ assert.notOwnProperty = function (obj, prop, msg) { * assert.ownPropertyVal({ coffee: 'is good'}, 'coffee', 'is good'); * * @name ownPropertyVal - * @param {Object} object - * @param {String} property + * @param {object} obj + * @param {string} prop * @param {unknown} value - * @param {String} message + * @param {string} msg * @public */ assert.ownPropertyVal = function (obj, prop, value, msg) { @@ -1390,10 +1388,10 @@ assert.ownPropertyVal = function (obj, prop, value, msg) { * assert.notOwnPropertyVal({}, 'toString', Object.prototype.toString); * * @name notOwnPropertyVal - * @param {Object} object - * @param {String} property + * @param {object} obj + * @param {string} prop * @param {unknown} value - * @param {String} message + * @param {string} msg * @public */ assert.notOwnPropertyVal = function (obj, prop, value, msg) { @@ -1411,10 +1409,10 @@ assert.notOwnPropertyVal = function (obj, prop, value, msg) { * assert.deepOwnPropertyVal({ tea: { green: 'matcha' } }, 'tea', { green: 'matcha' }); * * @name deepOwnPropertyVal - * @param {Object} object - * @param {String} property + * @param {object} obj + * @param {string} prop * @param {unknown} value - * @param {String} message + * @param {string} msg * @public */ assert.deepOwnPropertyVal = function (obj, prop, value, msg) { @@ -1435,10 +1433,10 @@ assert.deepOwnPropertyVal = function (obj, prop, value, msg) { * assert.notDeepOwnPropertyVal({}, 'toString', Object.prototype.toString); * * @name notDeepOwnPropertyVal - * @param {Object} object - * @param {String} property + * @param {object} obj + * @param {string} prop * @param {unknown} value - * @param {String} message + * @param {string} msg * @public */ assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) { @@ -1456,9 +1454,9 @@ assert.notDeepOwnPropertyVal = function (obj, prop, value, msg) { * assert.nestedProperty({ tea: { green: 'matcha' }}, 'tea.green'); * * @name nestedProperty - * @param {Object} object - * @param {String} property - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {string} msg * @namespace Assert * @public */ @@ -1477,9 +1475,9 @@ assert.nestedProperty = function (obj, prop, msg) { * assert.notNestedProperty({ tea: { green: 'matcha' }}, 'tea.oolong'); * * @name notNestedProperty - * @param {Object} object - * @param {String} property - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {string} msg * @namespace Assert * @public */ @@ -1498,10 +1496,10 @@ assert.notNestedProperty = function (obj, prop, msg) { * assert.nestedPropertyVal({ tea: { green: 'matcha' }}, 'tea.green', 'matcha'); * * @name nestedPropertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1521,10 +1519,10 @@ assert.nestedPropertyVal = function (obj, prop, val, msg) { * assert.notNestedPropertyVal({ tea: { green: 'matcha' }}, 'coffee.green', 'matcha'); * * @name notNestedPropertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1543,10 +1541,10 @@ assert.notNestedPropertyVal = function (obj, prop, val, msg) { * assert.deepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.green', { matcha: 'yum' }); * * @name deepNestedPropertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1567,10 +1565,10 @@ assert.deepNestedPropertyVal = function (obj, prop, val, msg) { * assert.notDeepNestedPropertyVal({ tea: { green: { matcha: 'yum' } } }, 'tea.black', { matcha: 'yum' }); * * @name notDeepNestedPropertyVal - * @param {Object} object - * @param {String} property - * @param {unknown} value - * @param {String} message + * @param {object} obj + * @param {string} prop + * @param {unknown} val + * @param {string} msg * @namespace Assert * @public */ @@ -1590,9 +1588,9 @@ assert.notDeepNestedPropertyVal = function (obj, prop, val, msg) { * assert.lengthOf(new Map([['a',1],['b',2],['c',3]]), 3, 'map has size of 3'); * * @name lengthOf - * @param {unknown} object - * @param {Number} length - * @param {String} message + * @param {unknown} exp + * @param {number} len + * @param {string} msg * @namespace Assert * @public */ @@ -1613,9 +1611,9 @@ assert.lengthOf = function (exp, len, msg) { * assert.hasAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); * * @name hasAnyKeys - * @param {unknown} object - * @param {Array|Object} keys - * @param {String} message + * @param {unknown} obj + * @param {Array | object} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1636,9 +1634,9 @@ assert.hasAnyKeys = function (obj, keys, msg) { * assert.hasAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); * * @name hasAllKeys - * @param {unknown} object - * @param {String[]} keys - * @param {String} message + * @param {unknown} obj + * @param {string[]} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1663,9 +1661,9 @@ assert.hasAllKeys = function (obj, keys, msg) { * assert.containsAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{foo: 'bar'}, 'anotherKey']); * * @name containsAllKeys - * @param {unknown} object - * @param {String[]} keys - * @param {String} message + * @param {unknown} obj + * @param {string[]} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1687,9 +1685,9 @@ assert.containsAllKeys = function (obj, keys, msg) { * assert.doesNotHaveAnyKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']); * * @name doesNotHaveAnyKeys - * @param {unknown} object - * @param {String[]} keys - * @param {String} message + * @param {unknown} obj + * @param {string[]} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1711,9 +1709,9 @@ assert.doesNotHaveAnyKeys = function (obj, keys, msg) { * assert.doesNotHaveAllKeys(new Set([{foo: 'bar'}, 'anotherKey']), [{one: 'two'}, 'example']); * * @name doesNotHaveAllKeys - * @param {unknown} object - * @param {String[]} keys - * @param {String} message + * @param {unknown} obj + * @param {string[]} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1739,9 +1737,9 @@ assert.doesNotHaveAllKeys = function (obj, keys, msg) { * assert.hasAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); * * @name hasAnyDeepKeys - * @param {unknown} object - * @param {Array|Object} keys - * @param {String} message + * @param {unknown} obj + * @param {Array | object} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1765,9 +1763,9 @@ assert.hasAnyDeepKeys = function (obj, keys, msg) { * assert.hasAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); * * @name hasAllDeepKeys - * @param {unknown} object - * @param {Array|Object} keys - * @param {String} message + * @param {unknown} obj + * @param {Array | object} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1791,9 +1789,9 @@ assert.hasAllDeepKeys = function (obj, keys, msg) { * assert.containsAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {two: 'two'}]); * * @name containsAllDeepKeys - * @param {unknown} object - * @param {Array|Object} keys - * @param {String} message + * @param {unknown} obj + * @param {Array | object} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1817,9 +1815,9 @@ assert.containsAllDeepKeys = function (obj, keys, msg) { * assert.doesNotHaveAnyDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{twenty: 'twenty'}, {fifty: 'fifty'}]); * * @name doesNotHaveAnyDeepKeys - * @param {unknown} object - * @param {Array|Object} keys - * @param {String} message + * @param {unknown} obj + * @param {Array | object} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1843,9 +1841,9 @@ assert.doesNotHaveAnyDeepKeys = function (obj, keys, msg) { * assert.doesNotHaveAllDeepKeys(new Set([{one: 'one'}, {two: 'two'}]), [{one: 'one'}, {fifty: 'fifty'}]); * * @name doesNotHaveAllDeepKeys - * @param {unknown} object - * @param {Array|Object} keys - * @param {String} message + * @param {unknown} obj + * @param {Array | object} keys + * @param {string} msg * @namespace Assert * @public */ @@ -1877,9 +1875,10 @@ assert.doesNotHaveAllDeepKeys = function (obj, keys, msg) { * @alias throw * @alias Throw * @param {Function} fn - * @param {ErrorConstructor|Error} errorLike - * @param {RegExp|String} errMsgMatcher - * @param {String} message + * @param {Error} errorLike + * @param {RegExp | string} errMsgMatcher + * @param {string} msg + * @returns {unknown} * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Assert * @public @@ -1916,20 +1915,20 @@ assert.throws = function (fn, errorLike, errMsgMatcher, msg) { * * @name doesNotThrow * @param {Function} fn - * @param {ErrorConstructor} errorLike - * @param {RegExp|String} errMsgMatcher - * @param {String} message + * @param {Error} errorLike + * @param {RegExp | string} errMsgMatcher + * @param {string} message * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Assert * @public */ -assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) { +assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, message) { if ('string' === typeof errorLike || errorLike instanceof RegExp) { errMsgMatcher = errorLike; errorLike = null; } - new Assertion(fn, msg, assert.doesNotThrow, true) + new Assertion(fn, message, assert.doesNotThrow, true) .to.not.throw(errorLike, errMsgMatcher); }; @@ -1942,10 +1941,10 @@ assert.doesNotThrow = function (fn, errorLike, errMsgMatcher, msg) { * assert.operator(1, '>', 2, 'this will fail'); * * @name operator - * @param {unknown} val1 - * @param {String} operator + * @param {unknown} val + * @param {string} operator * @param {unknown} val2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -1999,10 +1998,10 @@ assert.operator = function (val, operator, val2, msg) { * assert.closeTo(1.5, 1, 0.5, 'numbers are close'); * * @name closeTo - * @param {Number} actual - * @param {Number} expected - * @param {Number} delta - * @param {String} message + * @param {number} act + * @param {number} exp + * @param {number} delta + * @param {string} msg * @namespace Assert * @public */ @@ -2018,10 +2017,10 @@ assert.closeTo = function (act, exp, delta, msg) { * assert.approximately(1.5, 1, 0.5, 'numbers are close'); * * @name approximately - * @param {Number} actual - * @param {Number} expected - * @param {Number} delta - * @param {String} message + * @param {number} act + * @param {number} exp + * @param {number} delta + * @param {string} msg * @namespace Assert * @public */ @@ -2041,7 +2040,7 @@ assert.approximately = function (act, exp, delta, msg) { * @name sameMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2061,7 +2060,7 @@ assert.sameMembers = function (set1, set2, msg) { * @name notSameMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2081,7 +2080,7 @@ assert.notSameMembers = function (set1, set2, msg) { * @name sameDeepMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2101,7 +2100,7 @@ assert.sameDeepMembers = function (set1, set2, msg) { * @name notSameDeepMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2121,7 +2120,7 @@ assert.notSameDeepMembers = function (set1, set2, msg) { * @name sameOrderedMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2141,7 +2140,7 @@ assert.sameOrderedMembers = function (set1, set2, msg) { * @name notSameOrderedMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2161,7 +2160,7 @@ assert.notSameOrderedMembers = function (set1, set2, msg) { * @name sameDeepOrderedMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2182,7 +2181,7 @@ assert.sameDeepOrderedMembers = function (set1, set2, msg) { * @name notSameDeepOrderedMembers * @param {Array} set1 * @param {Array} set2 - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2202,7 +2201,7 @@ assert.notSameDeepOrderedMembers = function (set1, set2, msg) { * @name includeMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2222,7 +2221,7 @@ assert.includeMembers = function (superset, subset, msg) { * @name notIncludeMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2242,7 +2241,7 @@ assert.notIncludeMembers = function (superset, subset, msg) { * @name includeDeepMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2262,7 +2261,7 @@ assert.includeDeepMembers = function (superset, subset, msg) { * @name notIncludeDeepMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2283,7 +2282,7 @@ assert.notIncludeDeepMembers = function (superset, subset, msg) { * @name includeOrderedMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2305,7 +2304,7 @@ assert.includeOrderedMembers = function (superset, subset, msg) { * @name notIncludeOrderedMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2326,7 +2325,7 @@ assert.notIncludeOrderedMembers = function (superset, subset, msg) { * @name includeDeepOrderedMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2349,7 +2348,7 @@ assert.includeDeepOrderedMembers = function (superset, subset, msg) { * @name notIncludeDeepOrderedMembers * @param {Array} superset * @param {Array} subset - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2368,7 +2367,7 @@ assert.notIncludeDeepOrderedMembers = function (superset, subset, msg) { * @name oneOf * @param {*} inList * @param {Array<*>} list - * @param {String} message + * @param {string} msg * @namespace Assert * @public */ @@ -2387,7 +2386,7 @@ assert.oneOf = function (inList, list, msg) { * @param {unknown} obj * @param {string} [msg] * @namespace Assert - * @api public + * @public */ assert.isIterable = function(obj, msg) { if (obj == undefined || !obj[Symbol.iterator]) { @@ -2413,10 +2412,10 @@ assert.isIterable = function(obj, msg) { * assert.changes(fn, obj, 'val'); * * @name changes - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2429,7 +2428,7 @@ assert.changes = function (fn, obj, prop, msg) { new Assertion(fn, msg, assert.changes, true).to.change(obj, prop); } - /** +/** * ### .changesBy(function, object, property, delta, [message]) * * Asserts that a function changes the value of a property by an amount (delta). @@ -2439,11 +2438,11 @@ assert.changes = function (fn, obj, prop, msg) { * assert.changesBy(fn, obj, 'val', 2); * * @name changesBy - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {Number} change amount (delta) - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @param {number} delta msg change amount (delta) + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2461,20 +2460,21 @@ assert.changesBy = function (fn, obj, prop, delta, msg) { .to.change(obj, prop).by(delta); } - /** +/** * ### .doesNotChange(function, object, property, [message]) * * Asserts that a function does not change the value of a property. * - * var obj = { val: 10 }; - * var fn = function() { console.log('foo'); }; - * assert.doesNotChange(fn, obj, 'val'); + * var obj = { val: 10 }; + * var fn = function() { console.log('foo'); }; + * assert.doesNotChange(fn, obj, 'val'); * * @name doesNotChange - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @param {string} msg _optional_ + * @returns {unknown} * @namespace Assert * @public */ @@ -2498,11 +2498,11 @@ assert.doesNotChange = function (fn, obj, prop, msg) { * assert.changesButNotBy(fn, obj, 'val', 5); * * @name changesButNotBy - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {Number} change amount (delta) - * @param {String} message _optional_ + * @param {Function} fn - modifier function + * @param {object} obj - object or getter function + * @param {string} prop - property name _optional_ + * @param {number} delta - change amount (delta) + * @param {string} msg - message _optional_ * @namespace Assert * @public */ @@ -2529,13 +2529,14 @@ assert.changesButNotBy = function (fn, obj, prop, delta, msg) { * var fn = function() { obj.val = 13 }; * assert.increases(fn, obj, 'val'); * - * @name increases - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {String} message _optional_ - * @namespace Assert * @public + * @namespace Assert + * @name increases + * @param {Function} fn - modifier function + * @param {object} obj - object or getter function + * @param {string} prop - property name _optional_ + * @param {string} msg - message _optional_ + * @returns {unknown} */ assert.increases = function (fn, obj, prop, msg) { if (arguments.length === 3 && typeof obj === 'function') { @@ -2556,14 +2557,14 @@ assert.increases = function (fn, obj, prop, msg) { * var fn = function() { obj.val += 10 }; * assert.increasesBy(fn, obj, 'val', 10); * + * @public * @name increasesBy - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {Number} change amount (delta) - * @param {String} message _optional_ * @namespace Assert - * @public + * @param {Function} fn - modifier function + * @param {object} obj - object or getter function + * @param {string} prop - property name _optional_ + * @param {number} delta - change amount (delta) + * @param {string} msg - message _optional_ */ assert.increasesBy = function (fn, obj, prop, delta, msg) { if (arguments.length === 4 && typeof obj === 'function') { @@ -2589,10 +2590,11 @@ assert.increasesBy = function (fn, obj, prop, delta, msg) { * assert.doesNotIncrease(fn, obj, 'val'); * * @name doesNotIncrease - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @returns {Assertion} + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2616,11 +2618,11 @@ assert.doesNotIncrease = function (fn, obj, prop, msg) { * assert.increasesButNotBy(fn, obj, 'val', 10); * * @name increasesButNotBy - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {Number} change amount (delta) - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @param {number} delta change amount (delta) + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2648,10 +2650,11 @@ assert.increasesButNotBy = function (fn, obj, prop, delta, msg) { * assert.decreases(fn, obj, 'val'); * * @name decreases - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @returns {Assertion} + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2675,11 +2678,11 @@ assert.decreases = function (fn, obj, prop, msg) { * assert.decreasesBy(fn, obj, 'val', 5); * * @name decreasesBy - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {Number} change amount (delta) - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @param {number} delta change amount (delta) + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2707,10 +2710,11 @@ assert.decreasesBy = function (fn, obj, prop, delta, msg) { * assert.doesNotDecrease(fn, obj, 'val'); * * @name doesNotDecrease - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @returns {Assertion} + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2734,11 +2738,12 @@ assert.doesNotDecrease = function (fn, obj, prop, msg) { * assert.doesNotDecreaseBy(fn, obj, 'val', 1); * * @name doesNotDecreaseBy - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {Number} change amount (delta) - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @param {number} delta change amount (delta) + * @returns {Assertion} + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2766,11 +2771,11 @@ assert.doesNotDecreaseBy = function (fn, obj, prop, delta, msg) { * assert.decreasesButNotBy(fn, obj, 'val', 1); * * @name decreasesButNotBy - * @param {Function} modifier function - * @param {Object} object or getter function - * @param {String} property name _optional_ - * @param {Number} change amount (delta) - * @param {String} message _optional_ + * @param {Function} fn modifier function + * @param {object} obj object or getter function + * @param {string} prop property name _optional_ + * @param {number} delta change amount (delta) + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2799,7 +2804,7 @@ assert.decreasesButNotBy = function (fn, obj, prop, delta, msg) { * assert.ifError(err); // Rethrows err! * * @name ifError - * @param {Object} object + * @param {object} val * @namespace Assert * @public */ @@ -2818,8 +2823,8 @@ assert.ifError = function (val) { * * @name isExtensible * @alias extensible - * @param {Object} object - * @param {String} message _optional_ + * @param {object} obj + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2842,8 +2847,8 @@ assert.isExtensible = function (obj, msg) { * * @name isNotExtensible * @alias notExtensible - * @param {Object} object - * @param {String} message _optional_ + * @param {object} obj + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2865,8 +2870,8 @@ assert.isNotExtensible = function (obj, msg) { * * @name isSealed * @alias sealed - * @param {Object} object - * @param {String} message _optional_ + * @param {object} obj + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2883,8 +2888,8 @@ assert.isSealed = function (obj, msg) { * * @name isNotSealed * @alias notSealed - * @param {Object} object - * @param {String} message _optional_ + * @param {object} obj + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2903,8 +2908,8 @@ assert.isNotSealed = function (obj, msg) { * * @name isFrozen * @alias frozen - * @param {Object} object - * @param {String} message _optional_ + * @param {object} obj + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2921,8 +2926,8 @@ assert.isFrozen = function (obj, msg) { * * @name isNotFrozen * @alias notFrozen - * @param {Object} object - * @param {String} message _optional_ + * @param {object} obj + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2946,8 +2951,8 @@ assert.isNotFrozen = function (obj, msg) { * * @name isEmpty * @alias empty - * @param {Object|Array|String|Map|Set} target - * @param {String} message _optional_ + * @param {object | Array | string | Map | Set} val + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2971,8 +2976,8 @@ assert.isEmpty = function(val, msg) { * * @name isNotEmpty * @alias notEmpty - * @param {Object|Array|String|Map|Set} target - * @param {String} message _optional_ + * @param {object | Array | string | Map | Set} val + * @param {string} msg _optional_ * @namespace Assert * @public */ @@ -2982,6 +2987,10 @@ assert.isNotEmpty = function(val, msg) { /** * Aliases. + * + * @param {unknown} name + * @param {unknown} as + * @returns {unknown} */ (function alias(name, as){ assert[as] = assert[name]; diff --git a/lib/chai/interface/expect.js b/lib/chai/interface/expect.js index 286044a1..fbaabf84 100644 --- a/lib/chai/interface/expect.js +++ b/lib/chai/interface/expect.js @@ -8,6 +8,11 @@ import * as chai from '../../../index.js'; import {Assertion} from '../assertion.js'; import {AssertionError} from 'assertion-error'; +/** + * @param {unknown} val + * @param {string} message + * @returns {Assertion} + */ function expect(val, message) { return new Assertion(val, message); } @@ -30,8 +35,8 @@ export {expect}; * @name fail * @param {unknown} actual * @param {unknown} expected - * @param {String} message - * @param {String} operator + * @param {string} message + * @param {string} operator * @namespace expect * @public */ diff --git a/lib/chai/interface/should.js b/lib/chai/interface/should.js index 3a2c235d..0efef3c6 100644 --- a/lib/chai/interface/should.js +++ b/lib/chai/interface/should.js @@ -7,8 +7,14 @@ import {Assertion} from '../assertion.js'; import {AssertionError} from 'assertion-error'; +/** + * @returns {void} + */ function loadShould () { // explicitly define this method as function as to have it's name to include as `ssfi` + /** + * @returns {Assertion} + */ function shouldGetter() { if (this instanceof String || this instanceof Number @@ -19,6 +25,9 @@ function loadShould () { } return new Assertion(this, null, shouldGetter); } + /** + * @param {unknown} value + */ function shouldSetter(value) { // See https://github.com/chaijs/chai/issues/86: this makes // `whatever.should = someValue` actually set `someValue`, which is @@ -55,12 +64,11 @@ function loadShould () { * should.fail(1, 2, "custom error message", ">"); * should.fail(1, 2, undefined, ">"); * - * * @name fail * @param {unknown} actual * @param {unknown} expected - * @param {String} message - * @param {String} operator + * @param {string} message + * @param {string} operator * @namespace BDD * @public */ @@ -88,12 +96,12 @@ function loadShould () { * @name equal * @param {unknown} actual * @param {unknown} expected - * @param {String} message + * @param {string} message * @namespace Should * @public */ - should.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.equal(val2); + should.equal = function (actual, expected, message) { + new Assertion(actual, message).to.equal(expected); }; /** @@ -111,10 +119,10 @@ function loadShould () { * * @name throw * @alias Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message + * @param {Function} fn + * @param {Error} errt + * @param {RegExp} errs + * @param {string} msg * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Should * @public @@ -129,9 +137,10 @@ function loadShould () { * Asserts that the target is neither `null` nor `undefined`. * * var foo = 'hi'; - * * should.exist(foo, 'foo exists'); * + * @param {unknown} val + * @param {string} msg * @name exist * @namespace Should * @public @@ -153,12 +162,12 @@ function loadShould () { * @name not.equal * @param {unknown} actual * @param {unknown} expected - * @param {String} message + * @param {string} msg * @namespace Should * @public */ - should.not.equal = function (val1, val2, msg) { - new Assertion(val1, msg).to.not.equal(val2); + should.not.equal = function (actual, expected, msg) { + new Assertion(actual, msg).to.not.equal(expected); }; /** @@ -172,10 +181,10 @@ function loadShould () { * * @name not.throw * @alias not.Throw - * @param {Function} function - * @param {ErrorConstructor} constructor - * @param {RegExp} regexp - * @param {String} message + * @param {Function} fn + * @param {Error} errt + * @param {RegExp} errs + * @param {string} msg * @see https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error#Error_types * @namespace Should * @public @@ -190,11 +199,12 @@ function loadShould () { * Asserts that the target is neither `null` nor `undefined`. * * var bar = null; - * * should.not.exist(bar, 'bar does not exist'); * - * @name not.exist * @namespace Should + * @name not.exist + * @param {unknown} val + * @param {string} msg * @public */ should.not.exist = function (val, msg) { diff --git a/lib/chai/utils/addChainableMethod.js b/lib/chai/utils/addChainableMethod.js index 2205b5ea..8de2b21a 100644 --- a/lib/chai/utils/addChainableMethod.js +++ b/lib/chai/utils/addChainableMethod.js @@ -43,8 +43,8 @@ var call = Function.prototype.call, * Adds a method to an object, such that the method can also be chained. * * utils.addChainableMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); * }); * * Can also be accessed directly from `chai.Assertion`. @@ -57,15 +57,14 @@ var call = Function.prototype.call, * expect(fooStr).to.be.foo('bar'); * expect(fooStr).to.be.foo.equal('foo'); * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add + * @param {object} ctx object to which the method is added + * @param {string} name of method to add * @param {Function} method function to be used for `name`, when called * @param {Function} chainingBehavior function to be called every time the property is accessed * @namespace Utils * @name addChainableMethod - * @api public + * @public */ - export function addChainableMethod(ctx, name, method, chainingBehavior) { if (typeof chainingBehavior !== 'function') { chainingBehavior = function () { }; diff --git a/lib/chai/utils/addLengthGuard.js b/lib/chai/utils/addLengthGuard.js index 630b64ae..621d7400 100644 --- a/lib/chai/utils/addLengthGuard.js +++ b/lib/chai/utils/addLengthGuard.js @@ -34,12 +34,12 @@ const fnLengthDesc = Object.getOwnPropertyDescriptor(function () {}, 'length'); * environments is the priority. * * @param {Function} fn - * @param {String} assertionName - * @param {Boolean} isChainable + * @param {string} assertionName + * @param {boolean} isChainable + * @returns {unknown} * @namespace Utils * @name addLengthGuard */ - export function addLengthGuard(fn, assertionName, isChainable) { if (!fnLengthDesc.configurable) return fn; diff --git a/lib/chai/utils/addMethod.js b/lib/chai/utils/addMethod.js index 02fc7bdb..90b9546c 100644 --- a/lib/chai/utils/addMethod.js +++ b/lib/chai/utils/addMethod.js @@ -16,8 +16,8 @@ import {Assertion} from '../assertion.js'; * Adds a method to the prototype of an object. * * utils.addMethod(chai.Assertion.prototype, 'foo', function (str) { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.equal(str); + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.equal(str); * }); * * Can also be accessed directly from `chai.Assertion`. @@ -28,14 +28,13 @@ import {Assertion} from '../assertion.js'; * * expect(fooStr).to.be.foo('bar'); * - * @param {Object} ctx object to which the method is added - * @param {String} name of method to add + * @param {object} ctx object to which the method is added + * @param {string} name of method to add * @param {Function} method function to be used for name * @namespace Utils * @name addMethod - * @api public + * @public */ - export function addMethod(ctx, name, method) { var methodWrapper = function () { // Setting the `ssfi` flag to `methodWrapper` causes this function to be the diff --git a/lib/chai/utils/addProperty.js b/lib/chai/utils/addProperty.js index 7bdfb520..fa59d23e 100644 --- a/lib/chai/utils/addProperty.js +++ b/lib/chai/utils/addProperty.js @@ -15,8 +15,8 @@ import {transferFlags} from './transferFlags.js'; * Adds a property to the prototype of an object. * * utils.addProperty(chai.Assertion.prototype, 'foo', function () { - * var obj = utils.flag(this, 'object'); - * new chai.Assertion(obj).to.be.instanceof(Foo); + * var obj = utils.flag(this, 'object'); + * new chai.Assertion(obj).to.be.instanceof(Foo); * }); * * Can also be accessed directly from `chai.Assertion`. @@ -27,14 +27,13 @@ import {transferFlags} from './transferFlags.js'; * * expect(myFoo).to.be.foo; * - * @param {Object} ctx object to which the property is added - * @param {String} name of property to add + * @param {object} ctx object to which the property is added + * @param {string} name of property to add * @param {Function} getter function to be used for name * @namespace Utils * @name addProperty - * @api public + * @public */ - export function addProperty(ctx, name, getter) { getter = getter === undefined ? function () {} : getter; diff --git a/lib/chai/utils/compareByInspect.js b/lib/chai/utils/compareByInspect.js index 829de728..5ab27a20 100644 --- a/lib/chai/utils/compareByInspect.js +++ b/lib/chai/utils/compareByInspect.js @@ -14,14 +14,13 @@ import {inspect} from './inspect.js'; * and objects with irregular/missing toString can still be sorted without a * TypeError. * - * @param {Mixed} first element to compare - * @param {Mixed} second element to compare - * @returns {Number} -1 if 'a' should come before 'b'; otherwise 1 + * @param {unknown} a first element to compare + * @param {unknown} b second element to compare + * @returns {number} -1 if 'a' should come before 'b'; otherwise 1 * @name compareByInspect * @namespace Utils - * @api public + * @public */ - export function compareByInspect(a, b) { return inspect(a) < inspect(b) ? -1 : 1; } diff --git a/lib/chai/utils/expectTypes.js b/lib/chai/utils/expectTypes.js index 4a80d06a..4f99532f 100644 --- a/lib/chai/utils/expectTypes.js +++ b/lib/chai/utils/expectTypes.js @@ -4,6 +4,10 @@ * MIT Licensed */ +import {AssertionError} from 'assertion-error'; +import {flag} from './flag.js'; +import {type} from './type-detect.js'; + /** * ### .expectTypes(obj, types) * @@ -11,17 +15,12 @@ * * utils.expectTypes(this, ['array', 'object', 'string']); * - * @param {Mixed} obj constructed Assertion - * @param {Array} type A list of allowed types for this assertion + * @param {unknown} obj constructed Assertion + * @param {Array} types A list of allowed types for this assertion * @namespace Utils * @name expectTypes - * @api public + * @public */ - -import {AssertionError} from 'assertion-error'; -import {flag} from './flag.js'; -import {type} from './type-detect.js'; - export function expectTypes(obj, types) { var flagMsg = flag(obj, 'message'); var ssfi = flag(obj, 'ssfi'); diff --git a/lib/chai/utils/flag.js b/lib/chai/utils/flag.js index 79637ad3..89434b71 100644 --- a/lib/chai/utils/flag.js +++ b/lib/chai/utils/flag.js @@ -15,14 +15,14 @@ * utils.flag(this, 'foo', 'bar'); // setter * utils.flag(this, 'foo'); // getter, returns `bar` * - * @param {Object} object constructed Assertion - * @param {String} key - * @param {Mixed} value (optional) + * @param {object} obj object constructed Assertion + * @param {string} key + * @param {unknown} value (optional) * @namespace Utils * @name flag - * @api private + * @returns {unknown | undefined} + * @private */ - export function flag(obj, key, value) { var flags = obj.__flags || (obj.__flags = Object.create(null)); if (arguments.length === 3) { diff --git a/lib/chai/utils/getActual.js b/lib/chai/utils/getActual.js index e9604679..1b4b3aa2 100644 --- a/lib/chai/utils/getActual.js +++ b/lib/chai/utils/getActual.js @@ -9,12 +9,12 @@ * * Returns the `actual` value for an Assertion. * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments + * @param {object} obj object (constructed Assertion) + * @param {unknown} args chai.Assertion.prototype.assert arguments + * @returns {unknown} * @namespace Utils * @name getActual */ - export function getActual(obj, args) { return args.length > 4 ? args[4] : obj._obj; } diff --git a/lib/chai/utils/getEnumerableProperties.js b/lib/chai/utils/getEnumerableProperties.js index a84252cf..46960524 100644 --- a/lib/chai/utils/getEnumerableProperties.js +++ b/lib/chai/utils/getEnumerableProperties.js @@ -10,13 +10,12 @@ * This allows the retrieval of enumerable property names of an object, * inherited or not. * - * @param {Object} object + * @param {object} object * @returns {Array} * @namespace Utils * @name getEnumerableProperties - * @api public + * @public */ - module.exports = function getEnumerableProperties(object) { var result = []; for (var name in object) { diff --git a/lib/chai/utils/getMessage.js b/lib/chai/utils/getMessage.js index 83e59974..b184c990 100644 --- a/lib/chai/utils/getMessage.js +++ b/lib/chai/utils/getMessage.js @@ -20,13 +20,13 @@ import {objDisplay} from './objDisplay.js'; * - `#{act}` actual value * - `#{exp}` expected value * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments + * @param {object} obj object (constructed Assertion) + * @param {unknown} args chai.Assertion.prototype.assert arguments + * @returns {unknown} * @namespace Utils * @name getMessage - * @api public + * @public */ - export function getMessage(obj, args) { var negate = flag(obj, 'negate') , val = flag(obj, 'object') diff --git a/lib/chai/utils/getOperator.js b/lib/chai/utils/getOperator.js index a2afa505..7a57d786 100644 --- a/lib/chai/utils/getOperator.js +++ b/lib/chai/utils/getOperator.js @@ -1,6 +1,10 @@ import {flag} from './flag.js'; import {type} from './type-detect.js'; +/** + * @param {unknown} obj + * @returns {boolean} + */ function isObjectType(obj) { var objectType = type(obj); var objectTypes = ['Array', 'Object', 'Function']; @@ -17,13 +21,13 @@ function isObjectType(obj) { * * Returns the `operator` or `undefined` value for an Assertion. * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments + * @param {object} obj object (constructed Assertion) + * @param {unknown} args chai.Assertion.prototype.assert arguments + * @returns {unknown} * @namespace Utils * @name getOperator - * @api public + * @public */ - export function getOperator(obj, args) { var operator = flag(obj, 'operator'); var negate = flag(obj, 'negate'); diff --git a/lib/chai/utils/getOwnEnumerableProperties.js b/lib/chai/utils/getOwnEnumerableProperties.js index ac69b502..9e8e830b 100644 --- a/lib/chai/utils/getOwnEnumerableProperties.js +++ b/lib/chai/utils/getOwnEnumerableProperties.js @@ -13,13 +13,12 @@ import {getOwnEnumerablePropertySymbols} from './getOwnEnumerablePropertySymbols * symbols of an object. This function is necessary because Object.keys only * returns enumerable property names, not enumerable property symbols. * - * @param {Object} object + * @param {object} obj * @returns {Array} * @namespace Utils * @name getOwnEnumerableProperties - * @api public + * @public */ - export function getOwnEnumerableProperties(obj) { return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj)); } diff --git a/lib/chai/utils/getOwnEnumerablePropertySymbols.js b/lib/chai/utils/getOwnEnumerablePropertySymbols.js index 99571c64..d8d6d096 100644 --- a/lib/chai/utils/getOwnEnumerablePropertySymbols.js +++ b/lib/chai/utils/getOwnEnumerablePropertySymbols.js @@ -11,13 +11,12 @@ * object. This function is necessary because Object.getOwnPropertySymbols * returns both enumerable and non-enumerable property symbols. * - * @param {Object} object + * @param {object} obj * @returns {Array} * @namespace Utils * @name getOwnEnumerablePropertySymbols - * @api public + * @public */ - export function getOwnEnumerablePropertySymbols(obj) { if (typeof Object.getOwnPropertySymbols !== 'function') return []; diff --git a/lib/chai/utils/getProperties.js b/lib/chai/utils/getProperties.js index 99f40a44..b43c7104 100644 --- a/lib/chai/utils/getProperties.js +++ b/lib/chai/utils/getProperties.js @@ -10,16 +10,18 @@ * This allows the retrieval of property names of an object, enumerable or not, * inherited or not. * - * @param {Object} object + * @param {object} object * @returns {Array} * @namespace Utils * @name getProperties - * @api public + * @public */ - export function getProperties(object) { var result = Object.getOwnPropertyNames(object); + /** + * @param {unknown} property + */ function addProperty(property) { if (result.indexOf(property) === -1) { result.push(property); diff --git a/lib/chai/utils/index.js b/lib/chai/utils/index.js index 5f52828c..0602997a 100644 --- a/lib/chai/utils/index.js +++ b/lib/chai/utils/index.js @@ -40,7 +40,12 @@ export {default as eql} from 'deep-eql'; // Deep path info export {getPathInfo, hasProperty} from 'pathval'; -// Function name +/** + * Function name + * + * @param {Function} fn + * @returns {string} + */ export function getName(fn) { return fn.name } diff --git a/lib/chai/utils/inspect.js b/lib/chai/utils/inspect.js index 3100c1aa..dcd9ad79 100644 --- a/lib/chai/utils/inspect.js +++ b/lib/chai/utils/inspect.js @@ -10,12 +10,13 @@ import {config} from '../config.js'; * Echoes the value of a value. Tries to print the value out * in the best way possible given the different types. * - * @param {Object} obj The object to print out. - * @param {Boolean} showHidden Flag that shows hidden (not enumerable) + * @param {object} obj The object to print out. + * @param {boolean} showHidden Flag that shows hidden (not enumerable) * properties of objects. Default is false. - * @param {Number} depth Depth in which to descend in object. Default is 2. - * @param {Boolean} colors Flag to turn on ANSI escape codes to color the + * @param {number} depth Depth in which to descend in object. Default is 2. + * @param {boolean} colors Flag to turn on ANSI escape codes to color the * output. Default is false (no coloring). + * @returns {string} * @namespace Utils * @name inspect */ diff --git a/lib/chai/utils/isNaN.js b/lib/chai/utils/isNaN.js index 7b1e0f06..acc10d6f 100644 --- a/lib/chai/utils/isNaN.js +++ b/lib/chai/utils/isNaN.js @@ -11,11 +11,11 @@ * * utils.isNaN(NaN); // true * - * @param {Value} The value which has to be checked if it is NaN + * @param {unknown} value The value which has to be checked if it is NaN + * @returns {boolean} * @name isNaN - * @api private + * @private */ - function _isNaN(value) { // Refer http://www.ecma-international.org/ecma-262/6.0/#sec-isnan-number // section's NOTE. diff --git a/lib/chai/utils/isProxyEnabled.js b/lib/chai/utils/isProxyEnabled.js index 780c2a27..5b6b62aa 100644 --- a/lib/chai/utils/isProxyEnabled.js +++ b/lib/chai/utils/isProxyEnabled.js @@ -15,8 +15,8 @@ import {config} from '../config.js'; * * @namespace Utils * @name isProxyEnabled + * @returns {boolean} */ - export function isProxyEnabled() { return config.useProxy && typeof Proxy !== 'undefined' && diff --git a/lib/chai/utils/objDisplay.js b/lib/chai/utils/objDisplay.js index c04f12df..76f014a8 100644 --- a/lib/chai/utils/objDisplay.js +++ b/lib/chai/utils/objDisplay.js @@ -14,13 +14,12 @@ import {config} from '../config.js'; * criteria to be inspected in-line for error * messages or should be truncated. * - * @param {Mixed} javascript object to inspect + * @param {unknown} obj javascript object to inspect * @returns {string} stringified object * @name objDisplay * @namespace Utils - * @api public + * @public */ - export function objDisplay(obj) { var str = inspect(obj) , type = Object.prototype.toString.call(obj); diff --git a/lib/chai/utils/overwriteChainableMethod.js b/lib/chai/utils/overwriteChainableMethod.js index a7f3f6a1..68fc89f6 100644 --- a/lib/chai/utils/overwriteChainableMethod.js +++ b/lib/chai/utils/overwriteChainableMethod.js @@ -16,10 +16,10 @@ import {transferFlags} from './transferFlags.js'; * name. * * utils.overwriteChainableMethod(chai.Assertion.prototype, 'lengthOf', - * function (_super) { - * } - * , function (_super) { - * } + * function (_super) { + * } + * , function (_super) { + * } * ); * * Can also be accessed directly from `chai.Assertion`. @@ -31,15 +31,14 @@ import {transferFlags} from './transferFlags.js'; * expect(myFoo).to.have.lengthOf(3); * expect(myFoo).to.have.lengthOf.above(3); * - * @param {Object} ctx object whose method / property is to be overwritten - * @param {String} name of method / property to overwrite + * @param {object} ctx object whose method / property is to be overwritten + * @param {string} name of method / property to overwrite * @param {Function} method function that returns a function to be used for name * @param {Function} chainingBehavior function that returns a function to be used for property * @namespace Utils * @name overwriteChainableMethod - * @api public + * @public */ - export function overwriteChainableMethod(ctx, name, method, chainingBehavior) { var chainableBehavior = ctx.__methods[name]; diff --git a/lib/chai/utils/overwriteMethod.js b/lib/chai/utils/overwriteMethod.js index 17cb0d91..d101f3b0 100644 --- a/lib/chai/utils/overwriteMethod.js +++ b/lib/chai/utils/overwriteMethod.js @@ -18,14 +18,14 @@ import {transferFlags} from './transferFlags.js'; * to be used for name. * * utils.overwriteMethod(chai.Assertion.prototype, 'equal', function (_super) { - * return function (str) { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.value).to.equal(str); - * } else { - * _super.apply(this, arguments); + * return function (str) { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.value).to.equal(str); + * } else { + * _super.apply(this, arguments); + * } * } - * } * }); * * Can also be accessed directly from `chai.Assertion`. @@ -36,14 +36,13 @@ import {transferFlags} from './transferFlags.js'; * * expect(myFoo).to.equal('bar'); * - * @param {Object} ctx object whose method is to be overwritten - * @param {String} name of method to overwrite + * @param {object} ctx object whose method is to be overwritten + * @param {string} name of method to overwrite * @param {Function} method function that returns a function to be used for name * @namespace Utils * @name overwriteMethod - * @api public + * @public */ - export function overwriteMethod(ctx, name, method) { var _method = ctx[name] , _super = function () { diff --git a/lib/chai/utils/overwriteProperty.js b/lib/chai/utils/overwriteProperty.js index defeee25..97f3486a 100644 --- a/lib/chai/utils/overwriteProperty.js +++ b/lib/chai/utils/overwriteProperty.js @@ -16,17 +16,16 @@ import {transferFlags} from './transferFlags.js'; * access to previous value. Must return function to use as getter. * * utils.overwriteProperty(chai.Assertion.prototype, 'ok', function (_super) { - * return function () { - * var obj = utils.flag(this, 'object'); - * if (obj instanceof Foo) { - * new chai.Assertion(obj.name).to.equal('bar'); - * } else { - * _super.call(this); + * return function () { + * var obj = utils.flag(this, 'object'); + * if (obj instanceof Foo) { + * new chai.Assertion(obj.name).to.equal('bar'); + * } else { + * _super.call(this); + * } * } - * } * }); * - * * Can also be accessed directly from `chai.Assertion`. * * chai.Assertion.overwriteProperty('foo', fn); @@ -35,14 +34,13 @@ import {transferFlags} from './transferFlags.js'; * * expect(myFoo).to.be.ok; * - * @param {Object} ctx object whose property is to be overwritten - * @param {String} name of property to overwrite + * @param {object} ctx object whose property is to be overwritten + * @param {string} name of property to overwrite * @param {Function} getter function that returns a getter function to be used for name * @namespace Utils * @name overwriteProperty - * @api public + * @public */ - export function overwriteProperty(ctx, name, getter) { var _get = Object.getOwnPropertyDescriptor(ctx, name) , _super = function () {}; diff --git a/lib/chai/utils/proxify.js b/lib/chai/utils/proxify.js index ca1a2c2b..3789892f 100644 --- a/lib/chai/utils/proxify.js +++ b/lib/chai/utils/proxify.js @@ -9,6 +9,8 @@ import {isProxyEnabled} from './isProxyEnabled.js'; * MIT Licensed */ +const builtins = ['__flags', '__methods', '_obj', 'assert']; + /** * ### .proxify(object) * @@ -22,14 +24,12 @@ import {isProxyEnabled} from './isProxyEnabled.js'; * If proxies are unsupported or disabled via the user's Chai config, then * return object without modification. * - * @param {Object} obj - * @param {String} nonChainableMethodName + * @param {object} obj + * @param {string} nonChainableMethodName + * @returns {unknown} * @namespace Utils * @name proxify */ - -const builtins = ['__flags', '__methods', '_obj', 'assert']; - export function proxify(obj ,nonChainableMethodName) { if (!isProxyEnabled()) return obj; @@ -103,13 +103,13 @@ export function proxify(obj ,nonChainableMethodName) { /** * # stringDistanceCapped(strA, strB, cap) * Return the Levenshtein distance between two strings, but no more than cap. + * * @param {string} strA * @param {string} strB - * @param {number} number - * @return {number} min(string distance between strA and strB, cap) - * @api private + * @param {number} cap + * @returns {number} min(string distance between strA and strB, cap) + * @private */ - function stringDistanceCapped(strA, strB, cap) { if (Math.abs(strA.length - strB.length) >= cap) { return cap; diff --git a/lib/chai/utils/test.js b/lib/chai/utils/test.js index 5a400bdb..2fc98cec 100644 --- a/lib/chai/utils/test.js +++ b/lib/chai/utils/test.js @@ -11,12 +11,12 @@ import {flag} from './flag.js'; * * Test an object for expression. * - * @param {Object} object (constructed Assertion) - * @param {Arguments} chai.Assertion.prototype.assert arguments + * @param {object} obj (constructed Assertion) + * @param {unknown} args + * @returns {unknown} * @namespace Utils * @name test */ - export function test(obj, args) { var negate = flag(obj, 'negate') , expr = args[0]; diff --git a/lib/chai/utils/transferFlags.js b/lib/chai/utils/transferFlags.js index a1a7d3ef..2669941c 100644 --- a/lib/chai/utils/transferFlags.js +++ b/lib/chai/utils/transferFlags.js @@ -12,21 +12,19 @@ * assertion flags (namely `object`, `ssfi`, `lockSsfi`, * and `message`) will not be transferred. * - * * var newAssertion = new Assertion(); * utils.transferFlags(assertion, newAssertion); * * var anotherAssertion = new Assertion(myObj); * utils.transferFlags(assertion, anotherAssertion, false); * - * @param {Assertion} assertion the assertion to transfer the flags from - * @param {Object} object the object to transfer the flags to; usually a new assertion - * @param {Boolean} includeAll + * @param {import('../assertion.js').Assertion} assertion the assertion to transfer the flags from + * @param {object} object the object to transfer the flags to; usually a new assertion + * @param {boolean} includeAll * @namespace Utils * @name transferFlags - * @api private + * @private */ - export function transferFlags(assertion, object, includeAll) { var flags = assertion.__flags || (assertion.__flags = Object.create(null)); diff --git a/lib/chai/utils/type-detect.js b/lib/chai/utils/type-detect.js index 5a86a6ab..995332b2 100644 --- a/lib/chai/utils/type-detect.js +++ b/lib/chai/utils/type-detect.js @@ -1,3 +1,7 @@ +/** + * @param {unknown} obj + * @returns {string} + */ export function type(obj) { if (typeof obj === 'undefined') { return 'undefined'; diff --git a/package-lock.json b/package-lock.json index 9897e045..b3410299 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,8 @@ "@web/test-runner": "^0.18.0", "@web/test-runner-playwright": "^0.11.0", "esbuild": "^0.19.10", + "eslint": "^8.56.0", + "eslint-plugin-jsdoc": "^48.0.4", "mocha": "^10.2.0" }, "engines": { @@ -49,6 +51,15 @@ "node": ">=12.17" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.23.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", @@ -85,6 +96,20 @@ "node": ">=6.9.0" } }, + "node_modules/@es-joy/jsdoccomment": { + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", + "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", + "dev": true, + "dependencies": { + "comment-parser": "1.4.1", + "esquery": "^1.5.0", + "jsdoc-type-pratt-parser": "~4.0.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.19.10", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.10.tgz", @@ -453,6 +478,139 @@ "node": ">=12" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", @@ -1136,6 +1294,12 @@ "@types/node": "*" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "node_modules/@web/browser-logs": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/@web/browser-logs/-/browser-logs-0.4.0.tgz", @@ -1397,6 +1561,27 @@ "node": ">= 0.6" } }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/agent-base": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", @@ -1409,6 +1594,22 @@ "node": ">= 14" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, "node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1467,6 +1668,15 @@ "node": ">= 8" } }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "dev": true, + "engines": { + "node": ">=14" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1696,6 +1906,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/camelcase": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", @@ -2051,6 +2270,15 @@ "node": ">=12.17" } }, + "node_modules/comment-parser": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", + "dev": true, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -2112,6 +2340,20 @@ "node-fetch": "^2.6.12" } }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/data-uri-to-buffer": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", @@ -2170,6 +2412,12 @@ "integrity": "sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==", "dev": true }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, "node_modules/deepmerge": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", @@ -2277,6 +2525,18 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -2396,20 +2656,271 @@ "esgenerate": "bin/esgenerate.js" }, "engines": { - "node": ">=6.0" - }, - "optionalDependencies": { - "source-map": "~0.6.1" + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/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, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "48.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.0.4.tgz", + "integrity": "sha512-A0cH+5svWPXzGZszBjXA1t0aAqVGS+/x3i02KFmb73rU0iMLnadEcVWcD/dGBZHIfAMKr3YpWh58f6wn4N909w==", + "dev": true, + "dependencies": { + "@es-joy/jsdoccomment": "~0.41.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.4", + "escape-string-regexp": "^4.0.0", + "esquery": "^1.5.0", + "is-builtin-module": "^3.2.1", + "semver": "^7.5.4", + "spdx-expression-parse": "^4.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/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": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "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/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, - "node_modules/escodegen/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==", + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, - "optional": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, "engines": { - "node": ">=0.10.0" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esprima": { @@ -2425,6 +2936,30 @@ "node": ">=4" } }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -2493,6 +3028,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -2515,6 +3056,18 @@ "node": ">=8.6.0" } }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, "node_modules/fastq": { "version": "1.16.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz", @@ -2533,6 +3086,18 @@ "pend": "~1.2.0" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -2582,6 +3147,26 @@ "flat": "cli.js" } }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -2724,6 +3309,33 @@ "node": ">= 6" } }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/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/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -2762,6 +3374,12 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -2954,6 +3572,31 @@ "node": ">= 4" } }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, "node_modules/inflation": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/inflation/-/inflation-2.1.0.tgz", @@ -3099,6 +3742,15 @@ "node": ">=0.12.0" } }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-obj": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", @@ -3165,6 +3817,12 @@ "url": "https://github.com/sponsors/gjtorikian/" } }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, "node_modules/istanbul-lib-coverage": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", @@ -3240,6 +3898,33 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsdoc-type-pratt-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", + "integrity": "sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==", + "dev": true, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, "node_modules/jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -3261,6 +3946,15 @@ "node": ">= 0.6" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/koa": { "version": "2.14.2", "resolved": "https://registry.npmjs.org/koa/-/koa-2.14.2.tgz", @@ -3359,6 +4053,19 @@ "ms": "^2.1.1" } }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/lighthouse-logger": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", @@ -3417,6 +4124,12 @@ "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", "dev": true }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -3864,6 +4577,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, "node_modules/negotiator": { "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", @@ -4001,6 +4720,23 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -4064,6 +4800,18 @@ "node": ">= 14" } }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -4097,6 +4845,15 @@ "node": ">=0.10.0" } }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", @@ -4217,6 +4974,15 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", @@ -4453,6 +5219,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/resolve-path": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/resolve-path/-/resolve-path-1.4.0.tgz", @@ -4525,6 +5300,63 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/rollup": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", @@ -4660,6 +5492,27 @@ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "dev": true }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -4792,6 +5645,28 @@ "node": ">= 8" } }, + "node_modules/spdx-exceptions": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz", + "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", + "dev": true + }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -4943,6 +5818,12 @@ "streamx": "^2.15.0" } }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4997,6 +5878,18 @@ "node": ">=0.6.x" } }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", @@ -5065,6 +5958,15 @@ "node": ">= 0.8" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -5110,6 +6012,21 @@ "node": ">=12" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/wordwrapjs": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-5.1.0.tgz", diff --git a/package.json b/package.json index be668933..f2f9aad1 100644 --- a/package.json +++ b/package.json @@ -31,10 +31,11 @@ "prebuild": "npm run clean", "build": "npm run build:esm", "build:esm": "esbuild --bundle --format=esm --keep-names --outfile=chai.js index.js", - "pretest": "npm run build", + "pretest": "npm run lint && npm run build", "test": "npm run test-node && npm run test-chrome", "test-node": "mocha --require ./test/bootstrap/index.js --reporter dot test/*.js", "test-chrome": "web-test-runner --playwright", + "lint": "eslint lib/", "clean": "rm -f chai.js coverage" }, "engines": { @@ -53,6 +54,8 @@ "@web/test-runner": "^0.18.0", "@web/test-runner-playwright": "^0.11.0", "esbuild": "^0.19.10", + "eslint": "^8.56.0", + "eslint-plugin-jsdoc": "^48.0.4", "mocha": "^10.2.0" } } From 61159d1a808af63ca64d9c57d582a624ab5761d9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Feb 2024 10:36:08 +0100 Subject: [PATCH 21/30] build(deps-dev): bump ip from 1.1.8 to 1.1.9 (#1608) Bumps [ip](https://github.com/indutny/node-ip) from 1.1.8 to 1.1.9. - [Commits](https://github.com/indutny/node-ip/compare/v1.1.8...v1.1.9) --- updated-dependencies: - dependency-name: ip dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index b3410299..4ce438d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chai", - "version": "5.0.3", + "version": "5.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chai", - "version": "5.0.3", + "version": "5.1.0", "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", @@ -3623,9 +3623,9 @@ "dev": true }, "node_modules/ip": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", - "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz", + "integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==", "dev": true }, "node_modules/is-binary-path": { @@ -5631,9 +5631,9 @@ } }, "node_modules/socks/node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz", + "integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==", "dev": true }, "node_modules/source-map": { From 91e58ed96dc9993b6389af854a32a87f849fbc85 Mon Sep 17 00:00:00 2001 From: Matti Schneider Date: Wed, 13 Mar 2024 23:49:01 +0530 Subject: [PATCH 22/30] Correct Mocha import instructions (#1611) * Correct Mocha usage instructions * Use long options Improve understandability of instructions --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 065a4275..24249718 100644 --- a/README.md +++ b/README.md @@ -98,9 +98,9 @@ import { expect, use } from 'chai'; // Creates local variables `expect` and `us ### Usage with Mocha ```bash -mocha spec.js -r chai/register-assert # Using Assert style -mocha spec.js -r chai/register-expect # Using Expect style -mocha spec.js -r chai/register-should # Using Should style +mocha spec.js --require chai/register-assert.js # Using Assert style +mocha spec.js --require chai/register-expect.js # Using Expect style +mocha spec.js --require chai/register-should.js # Using Should style ``` [Read more about these styles in our docs](http://chaijs.com/guide/styles/). From 37263c08b85f1f7a55d9522607a9b40f2ee651cd Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Thu, 9 May 2024 11:14:13 +0100 Subject: [PATCH 23/30] fix: support some virtual contexts in `toThrow` (#1609) * fix: support some virtual contexts in `toThrow` This adds support for VM situations where we pass a `RegExp` from another process. Note that we don't have a full fix for this stuff until `check-error` also supports `Error` being from another origin. * fix: support throwing of unusual errors Adds support for throwing things like `undefined`, functions, etc. * chore: upgrade check-error --- lib/chai/core/assertions.js | 28 +++++++++++++++++++++------- lib/chai/utils/index.js | 11 +++++++++++ package-lock.json | 8 ++++---- package.json | 2 +- test/assert.js | 8 ++++++++ test/virtual-machines.js | 34 ++++++++++++++++++++++++++++++++++ web-test-runner.config.js | 5 ++++- 7 files changed, 83 insertions(+), 13 deletions(-) create mode 100644 test/virtual-machines.js diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 7d72b068..a1664297 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -2676,15 +2676,17 @@ function assertThrows (errorLike, errMsgMatcher, msg) { , negate = flag(this, 'negate') || false; new Assertion(obj, flagMsg, ssfi, true).is.a('function'); - if (errorLike instanceof RegExp || typeof errorLike === 'string') { + if (_.isRegExp(errorLike) || typeof errorLike === 'string') { errMsgMatcher = errorLike; errorLike = null; } - var caughtErr; + let caughtErr; + let errorWasThrown = false; try { obj(); } catch (err) { + errorWasThrown = true; caughtErr = err; } @@ -2708,14 +2710,26 @@ function assertThrows (errorLike, errMsgMatcher, msg) { errorLikeString = _.checkError.getConstructorName(errorLike); } + let actual = caughtErr; + if (caughtErr instanceof Error) { + actual = caughtErr.toString(); + } else if (typeof caughtErr === 'string') { + actual = caughtErr; + } else if (caughtErr && (typeof caughtErr === 'object' || typeof caughtErr === 'function')) { + try { + actual = _.checkError.getConstructorName(caughtErr); + } catch (_err) { + // somehow wasn't a constructor, maybe we got a function thrown + // or similar + } + } + this.assert( - caughtErr + errorWasThrown , 'expected #{this} to throw ' + errorLikeString , 'expected #{this} to not throw an error but #{act} was thrown' , errorLike && errorLike.toString() - , (caughtErr instanceof Error ? - caughtErr.toString() : (typeof caughtErr === 'string' ? caughtErr : caughtErr && - _.checkError.getConstructorName(caughtErr))) + , actual ); } @@ -2760,7 +2774,7 @@ function assertThrows (errorLike, errMsgMatcher, msg) { if (caughtErr && errMsgMatcher !== undefined && errMsgMatcher !== null) { // Here we check compatible messages var placeholder = 'including'; - if (errMsgMatcher instanceof RegExp) { + if (_.isRegExp(errMsgMatcher)) { placeholder = 'matching' } diff --git a/lib/chai/utils/index.js b/lib/chai/utils/index.js index 0602997a..80306f79 100644 --- a/lib/chai/utils/index.js +++ b/lib/chai/utils/index.js @@ -94,3 +94,14 @@ export {isNaN} from './isNaN.js'; // getOperator method export {getOperator} from './getOperator.js'; + +/** + * Determines if an object is a `RegExp` + * This is used since `instanceof` will not work in virtual contexts + * + * @param {*} obj Object to test + * @returns {boolean} + */ +export function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +} diff --git a/package-lock.json b/package-lock.json index 4ce438d5..4848b60c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", - "check-error": "^2.0.0", + "check-error": "^2.1.1", "deep-eql": "^5.0.1", "loupe": "^3.1.0", "pathval": "^2.0.0" @@ -2027,9 +2027,9 @@ } }, "node_modules/check-error": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.0.0.tgz", - "integrity": "sha512-tjLAOBHKVxtPoHe/SA7kNOMvhCRdCJ3vETdeY0RuAc9popf+hyaSV6ZEg9hr4cpWF7jmo/JSWEnLDrnijS9Tog==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", "engines": { "node": ">= 16" } diff --git a/package.json b/package.json index f2f9aad1..a2cb11ff 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ }, "dependencies": { "assertion-error": "^2.0.1", - "check-error": "^2.0.0", + "check-error": "^2.1.1", "deep-eql": "^5.0.1", "loupe": "^3.1.0", "pathval": "^2.0.0" diff --git a/test/assert.js b/test/assert.js index c469dda1..c10a6775 100644 --- a/test/assert.js +++ b/test/assert.js @@ -1635,6 +1635,8 @@ describe('assert', function () { }); it('throws / throw / Throw', function() { + class CustomError extends Error {} + ['throws', 'throw', 'Throw'].forEach(function (throws) { assert[throws](function() { throw new Error('foo'); }); assert[throws](function() { throw new Error(''); }, ''); @@ -1644,6 +1646,12 @@ describe('assert', function () { assert[throws](function() { throw new Error('bar'); }, Error, 'bar'); assert[throws](function() { throw new Error(''); }, Error, ''); assert[throws](function() { throw new Error('foo') }, ''); + assert[throws](function() { throw ''; }, ''); + assert[throws](function() { throw ''; }, /^$/); + assert[throws](function() { throw new Error(''); }, /^$/); + assert[throws](function() { throw undefined; }); + assert[throws](function() { throw new CustomError('foo'); }); + assert[throws](function() { throw (() => {}); }); var thrownErr = assert[throws](function() { throw new Error('foo'); }); assert(thrownErr instanceof Error, 'assert.' + throws + ' returns error'); diff --git a/test/virtual-machines.js b/test/virtual-machines.js new file mode 100644 index 00000000..da5ec416 --- /dev/null +++ b/test/virtual-machines.js @@ -0,0 +1,34 @@ +import vm from 'node:vm'; +import * as chai from '../index.js'; + +const {assert} = chai; +const vmContext = {assert}; +vm.createContext(vmContext); + +/** + * Run the code in a virtual context + * + * @param {string} code Code to run + */ +function runCodeInVm(code) { + vm.runInContext(code, vmContext); +} + +describe('node virtual machines', function () { + it('throws', function() { + const shouldNotThrow = [ + `assert.throws(function() { throw ''; }, /^$/);`, + `assert.throws(function() { throw new Error('bleepbloop'); });`, + `assert.throws(function() { throw new Error(''); });`, + `assert.throws(function() { throw new Error('swoosh'); }, /swoosh/);` + ]; + + for (const code of shouldNotThrow) { + assert.doesNotThrow( + () => { + runCodeInVm(code); + } + ); + } + }); +}); diff --git a/web-test-runner.config.js b/web-test-runner.config.js index 50d70191..b9b6cb25 100644 --- a/web-test-runner.config.js +++ b/web-test-runner.config.js @@ -5,7 +5,10 @@ const commonjs = fromRollup(rollupCommonjs); export default { nodeResolve: true, - files: ["test/*.js"], + files: [ + "test/*.js", + "!test/virtual-machines.js" + ], plugins: [ commonjs({ include: [ From 14fcf6b114b996ff2d8bb58df5d773ecf8fa1716 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 9 May 2024 12:24:56 +0200 Subject: [PATCH 24/30] Fix secret name in publish action (#1614) --- .github/workflows/npm-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 415e1452..c4ad9e98 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -32,4 +32,4 @@ jobs: - run: npm ci - run: npm publish env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{secrets.npm_secret}} From 5ab5b8606980270eb04a222da0e9c18fab73dee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Fri, 10 May 2024 10:29:41 +0200 Subject: [PATCH 25/30] Publish npm packages with provenance (#1615) * Publish npm packages with provenance * Set version to 0.0.0 because we dynamically generate it now --- .github/workflows/npm-publish.yml | 19 +++++++++++++------ package.json | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c4ad9e98..3671059a 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -1,7 +1,7 @@ # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages -name: Node.js Package +name: Publish to npm on: release: @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 - run: npm ci - run: npx playwright install --with-deps - run: npm run build --if-present @@ -23,13 +23,20 @@ jobs: publish-npm: needs: build runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20 - registry-url: https://registry.npmjs.org/ + node-version: 22.x + registry-url: "https://registry.npmjs.org" + cache: "npm" - run: npm ci - - run: npm publish + - run: npm run build --if-present + - run: npm version ${TAG_NAME} --git-tag-version=false + env: + TAG_NAME: ${{ github.ref_name }} + - run: npm publish --provenance --access public env: - NODE_AUTH_TOKEN: ${{secrets.npm_secret}} + NODE_AUTH_TOKEN: ${{ secrets.npm_secret }} diff --git a/package.json b/package.json index a2cb11ff..cc8fb27b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "Veselin Todorov ", "John Firebaugh " ], - "version": "5.1.0", + "version": "0.0.0-development", "repository": { "type": "git", "url": "https://github.com/chaijs/chai" From ec189253cb53c1e99080f3b6ffd38e212525a029 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 12:01:54 +0100 Subject: [PATCH 26/30] build(deps-dev): bump braces from 3.0.2 to 3.0.3 (#1625) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4848b60c..62224626 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "chai", - "version": "5.1.0", + "version": "0.0.0-development", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "chai", - "version": "5.1.0", + "version": "0.0.0-development", "license": "MIT", "dependencies": { "assertion-error": "^2.0.1", @@ -1808,12 +1808,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -3099,9 +3099,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" From 3ce594407409ff6580cfbf7de8a24f9024869473 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Sat, 7 Sep 2024 14:07:28 +0700 Subject: [PATCH 27/30] chore: bump loupe and deep-eql (#1635) --- package-lock.json | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62224626..bb405e8d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2399,9 +2399,10 @@ } }, "node_modules/deep-eql": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.1.tgz", - "integrity": "sha512-nwQCf6ne2gez3o1MxWifqkciwt0zhl0LO1/UwVu4uMBuPmflWM4oQ70XMqHqnBJA+nhzncaqL9HVL6KkHJ28lw==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "license": "MIT", "engines": { "node": ">=6" } @@ -4235,9 +4236,10 @@ } }, "node_modules/loupe": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.0.tgz", - "integrity": "sha512-qKl+FrLXUhFuHUoDJG7f8P8gEMHq9NFS0c6ghXG1J0rldmZFQZoNVv/vyirE9qwCIhWZDsvEFd1sbFu3GvRQFg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz", + "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "license": "MIT", "dependencies": { "get-func-name": "^2.0.1" } From ca5d4624bae1602f3e9d91700f8cee24b9bdc0b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 7 Sep 2024 13:11:50 +0000 Subject: [PATCH 28/30] build(deps-dev): bump @75lb/deep-merge from 1.1.1 to 1.1.2 (#1636) Bumps [@75lb/deep-merge](https://github.com/75lb/deep-merge) from 1.1.1 to 1.1.2. - [Commits](https://github.com/75lb/deep-merge/compare/v1.1.1...v1.1.2) --- updated-dependencies: - dependency-name: "@75lb/deep-merge" dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index bb405e8d..b9d9d3d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,12 +30,12 @@ } }, "node_modules/@75lb/deep-merge": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.1.tgz", - "integrity": "sha512-xvgv6pkMGBA6GwdyJbNAnDmfAIR/DfWhrj9jgWh3TY7gRm3KO46x/GPjRg6wJ0nOepwqrNxFfojebh0Df4h4Tw==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@75lb/deep-merge/-/deep-merge-1.1.2.tgz", + "integrity": "sha512-08K9ou5VNbheZFxM5tDWoqjA3ImC50DiuuJ2tj1yEPRfkp8lLLg6XAaJ4On+a0yAXor/8ay5gHnAIshRM44Kpw==", "dev": true, "dependencies": { - "lodash.assignwith": "^4.2.0", + "lodash": "^4.17.21", "typical": "^7.1.1" }, "engines": { @@ -4113,12 +4113,6 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, - "node_modules/lodash.assignwith": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", - "integrity": "sha512-ZznplvbvtjK2gMvnQ1BR/zqPFZmS6jbK4p+6Up4xcRYA7yMIwxHCfbTcrYxXKzzqLsQ05eJPVznEW3tuwV7k1g==", - "dev": true - }, "node_modules/lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", From baf6ce9cf076f7ada6cbd12de3948d39f715229c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 07:37:22 +0100 Subject: [PATCH 29/30] build(deps): bump rollup from 4.9.1 to 4.22.4 (#1637) Bumps [rollup](https://github.com/rollup/rollup) from 4.9.1 to 4.22.4. - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.9.1...v4.22.4) --- updated-dependencies: - dependency-name: rollup dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 155 ++++++++++++++++++++++++++++++---------------- 1 file changed, 100 insertions(+), 55 deletions(-) diff --git a/package-lock.json b/package-lock.json index b9d9d3d7..93f02c97 100644 --- a/package-lock.json +++ b/package-lock.json @@ -864,9 +864,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.9.1.tgz", - "integrity": "sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", + "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", "cpu": [ "arm" ], @@ -877,9 +877,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.9.1.tgz", - "integrity": "sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", + "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", "cpu": [ "arm64" ], @@ -890,9 +890,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.9.1.tgz", - "integrity": "sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", + "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", "cpu": [ "arm64" ], @@ -903,9 +903,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.9.1.tgz", - "integrity": "sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", + "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", "cpu": [ "x64" ], @@ -916,9 +916,22 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.9.1.tgz", - "integrity": "sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", + "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", + "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", "cpu": [ "arm" ], @@ -929,9 +942,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.9.1.tgz", - "integrity": "sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", + "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", "cpu": [ "arm64" ], @@ -942,9 +955,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.9.1.tgz", - "integrity": "sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", + "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", "cpu": [ "arm64" ], @@ -954,10 +967,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", + "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.9.1.tgz", - "integrity": "sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", + "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", "cpu": [ "riscv64" ], @@ -967,10 +993,23 @@ "linux" ] }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", + "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.9.1.tgz", - "integrity": "sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", + "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", "cpu": [ "x64" ], @@ -981,9 +1020,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.9.1.tgz", - "integrity": "sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", + "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", "cpu": [ "x64" ], @@ -994,9 +1033,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.9.1.tgz", - "integrity": "sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", + "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", "cpu": [ "arm64" ], @@ -1007,9 +1046,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.9.1.tgz", - "integrity": "sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", + "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", "cpu": [ "ia32" ], @@ -1020,9 +1059,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.9.1.tgz", - "integrity": "sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", + "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", "cpu": [ "x64" ], @@ -5354,10 +5393,13 @@ } }, "node_modules/rollup": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.9.1.tgz", - "integrity": "sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", + "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, "bin": { "rollup": "dist/bin/rollup" }, @@ -5366,19 +5408,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.9.1", - "@rollup/rollup-android-arm64": "4.9.1", - "@rollup/rollup-darwin-arm64": "4.9.1", - "@rollup/rollup-darwin-x64": "4.9.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.9.1", - "@rollup/rollup-linux-arm64-gnu": "4.9.1", - "@rollup/rollup-linux-arm64-musl": "4.9.1", - "@rollup/rollup-linux-riscv64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-gnu": "4.9.1", - "@rollup/rollup-linux-x64-musl": "4.9.1", - "@rollup/rollup-win32-arm64-msvc": "4.9.1", - "@rollup/rollup-win32-ia32-msvc": "4.9.1", - "@rollup/rollup-win32-x64-msvc": "4.9.1", + "@rollup/rollup-android-arm-eabi": "4.22.4", + "@rollup/rollup-android-arm64": "4.22.4", + "@rollup/rollup-darwin-arm64": "4.22.4", + "@rollup/rollup-darwin-x64": "4.22.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", + "@rollup/rollup-linux-arm-musleabihf": "4.22.4", + "@rollup/rollup-linux-arm64-gnu": "4.22.4", + "@rollup/rollup-linux-arm64-musl": "4.22.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", + "@rollup/rollup-linux-riscv64-gnu": "4.22.4", + "@rollup/rollup-linux-s390x-gnu": "4.22.4", + "@rollup/rollup-linux-x64-gnu": "4.22.4", + "@rollup/rollup-linux-x64-musl": "4.22.4", + "@rollup/rollup-win32-arm64-msvc": "4.22.4", + "@rollup/rollup-win32-ia32-msvc": "4.22.4", + "@rollup/rollup-win32-x64-msvc": "4.22.4", "fsevents": "~2.3.2" } }, From 01ac941a770dccb7d431eb349a92613930a1f832 Mon Sep 17 00:00:00 2001 From: James Garbutt <43081j@users.noreply.github.com> Date: Sun, 29 Sep 2024 18:38:05 +0700 Subject: [PATCH 30/30] chore: update deep dependencies (#1641) Updates a few deep dependencies to fix the various high level audits we have flagged. --- package-lock.json | 901 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 633 insertions(+), 268 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93f02c97..7878d735 100644 --- a/package-lock.json +++ b/package-lock.json @@ -672,32 +672,26 @@ } }, "node_modules/@puppeteer/browsers": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-1.4.6.tgz", - "integrity": "sha512-x4BEjr2SjOPowNeiguzjozQbsc6h437ovD/wu+JpaenxVLm3jkgzHY2xOslMTp50HoTvQreMjiexiGQw1sqZlQ==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-2.3.0.tgz", + "integrity": "sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "debug": "4.3.4", - "extract-zip": "2.0.1", - "progress": "2.0.3", - "proxy-agent": "6.3.0", - "tar-fs": "3.0.4", - "unbzip2-stream": "1.4.3", - "yargs": "17.7.1" + "debug": "^4.3.5", + "extract-zip": "^2.0.1", + "progress": "^2.0.3", + "proxy-agent": "^6.4.0", + "semver": "^7.6.3", + "tar-fs": "^3.0.6", + "unbzip2-stream": "^1.4.3", + "yargs": "^17.7.2" }, "bin": { "browsers": "lib/cjs/main-cli.js" }, "engines": { - "node": ">=16.3.0" - }, - "peerDependencies": { - "typescript": ">= 4.7.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "node": ">=18" } }, "node_modules/@puppeteer/browsers/node_modules/ansi-styles": { @@ -705,6 +699,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -720,6 +715,7 @@ "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": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -734,6 +730,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -745,13 +742,40 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/@puppeteer/browsers/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@puppeteer/browsers/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/@puppeteer/browsers/node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -765,10 +789,11 @@ } }, "node_modules/@puppeteer/browsers/node_modules/yargs": { - "version": "17.7.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.1.tgz", - "integrity": "sha512-cwiTb08Xuv5fqF4AovYacTFNxk62th7LKJ6BL9IGUpTJrWoU7/7WdQGTP2SjKf1dUNBGzDd28p/Yfs/GI6JrLw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -787,6 +812,7 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -1075,7 +1101,8 @@ "version": "0.23.0", "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@types/accepts": { "version": "1.3.7", @@ -1328,6 +1355,7 @@ "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "@types/node": "*" @@ -1361,22 +1389,23 @@ } }, "node_modules/@web/dev-server": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.4.1.tgz", - "integrity": "sha512-GHeyH8MBZQpODFiHiXAdX4hOVbeDyD/DUermUinh/nexWAZUcXyXa200RItuAL6b25MQ3D/5hKNDypujSvXxiw==", + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.4.6.tgz", + "integrity": "sha512-jj/1bcElAy5EZet8m2CcUdzxT+CRvUjIXGh8Lt7vxtthkN9PzY9wlhWx/9WOs5iwlnG1oj0VGo6f/zvbPO0s9w==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.11", "@types/command-line-args": "^5.0.0", "@web/config-loader": "^0.3.0", - "@web/dev-server-core": "^0.7.0", + "@web/dev-server-core": "^0.7.2", "@web/dev-server-rollup": "^0.6.1", "camelcase": "^6.2.0", "command-line-args": "^5.1.1", "command-line-usage": "^7.0.1", "debounce": "^1.2.0", "deepmerge": "^4.2.2", - "ip": "^1.1.5", + "internal-ip": "^6.2.0", "nanocolors": "^0.2.1", "open": "^8.0.2", "portfinder": "^1.0.32" @@ -1390,15 +1419,16 @@ } }, "node_modules/@web/dev-server-core": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@web/dev-server-core/-/dev-server-core-0.7.0.tgz", - "integrity": "sha512-1FJe6cJ3r0x0ZmxY/FnXVduQD4lKX7QgYhyS6N+VmIpV+tBU4sGRbcrmeoYeY+nlnPa6p2oNuonk3X5ln/W95g==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@web/dev-server-core/-/dev-server-core-0.7.3.tgz", + "integrity": "sha512-GS+Ok6HiqNZOsw2oEv5V2OISZ2s/6icJodyGjUuD3RChr0G5HiESbKf2K8mZV4shTz9sRC9KSQf8qvno2gPKrQ==", "dev": true, + "license": "MIT", "dependencies": { "@types/koa": "^2.11.6", "@types/ws": "^7.4.0", "@web/parse5-utils": "^2.1.0", - "chokidar": "^3.4.3", + "chokidar": "^4.0.1", "clone": "^2.1.2", "es-module-lexer": "^1.0.0", "get-stream": "^6.0.0", @@ -1412,12 +1442,42 @@ "mime-types": "^2.1.27", "parse5": "^6.0.1", "picomatch": "^2.2.2", - "ws": "^7.4.2" + "ws": "^7.5.10" }, "engines": { "node": ">=18.0.0" } }, + "node_modules/@web/dev-server-core/node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@web/dev-server-core/node_modules/readdirp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.1.tgz", + "integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@web/dev-server-rollup": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.6.1.tgz", @@ -1449,15 +1509,16 @@ } }, "node_modules/@web/test-runner": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.18.0.tgz", - "integrity": "sha512-aAlQrdSqwCie1mxuSK5kM0RYDJZL4Q0Hd5LeXn1on3OtHLtgztL4dZzzNSuAWablR2/Vuve3ChwDDxmYSTqXRg==", + "version": "0.18.3", + "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.18.3.tgz", + "integrity": "sha512-QkVK8Qguw3Zhyu8SYR7F4VdcjyXBeJNr8W8L++s4zO/Ok7DR/Wu7+rLswn3H7OH3xYoCHRmwteehcFejefz6ew==", "dev": true, + "license": "MIT", "dependencies": { "@web/browser-logs": "^0.4.0", "@web/config-loader": "^0.3.0", "@web/dev-server": "^0.4.0", - "@web/test-runner-chrome": "^0.15.0", + "@web/test-runner-chrome": "^0.16.0", "@web/test-runner-commands": "^0.9.0", "@web/test-runner-core": "^0.13.0", "@web/test-runner-mocha": "^0.9.0", @@ -1480,16 +1541,17 @@ } }, "node_modules/@web/test-runner-chrome": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@web/test-runner-chrome/-/test-runner-chrome-0.15.0.tgz", - "integrity": "sha512-ZqkTJGQ57FDz3lWw+9CKfHuTV64S9GzBy5+0siSQulEVPfGiTzpksx9DohtA3BCLXdbEq4OHg40/XIQJomlc9w==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@web/test-runner-chrome/-/test-runner-chrome-0.16.0.tgz", + "integrity": "sha512-Edc6Y49aVB6k18S5IOj9OCX3rEf8F3jptIu0p95+imqxmcutFEh1GNmlAk2bQGnXS0U6uVY7Xbf61fiaXUQqhg==", "dev": true, + "license": "MIT", "dependencies": { "@web/test-runner-core": "^0.13.0", "@web/test-runner-coverage-v8": "^0.8.0", "async-mutex": "0.4.0", "chrome-launcher": "^0.15.0", - "puppeteer-core": "^20.0.0" + "puppeteer-core": "^22.0.0" }, "engines": { "node": ">=18.0.0" @@ -1509,10 +1571,11 @@ } }, "node_modules/@web/test-runner-core": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@web/test-runner-core/-/test-runner-core-0.13.0.tgz", - "integrity": "sha512-mUrETPg9n4dHWEk+D46BU3xVhQf+ljT4cG7FSpmF7AIOsXWgWHoaXp6ReeVcEmM5fmznXec2O/apTb9hpGrP3w==", + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/@web/test-runner-core/-/test-runner-core-0.13.4.tgz", + "integrity": "sha512-84E1025aUSjvZU1j17eCTwV7m5Zg3cZHErV3+CaJM9JPCesZwLraIa0ONIQ9w4KLgcDgJFw9UnJ0LbFf42h6tg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/code-frame": "^7.12.11", "@types/babel__code-frame": "^7.0.2", @@ -1522,15 +1585,15 @@ "@types/istanbul-lib-coverage": "^2.0.3", "@types/istanbul-reports": "^3.0.0", "@web/browser-logs": "^0.4.0", - "@web/dev-server-core": "^0.7.0", - "chokidar": "^3.4.3", + "@web/dev-server-core": "^0.7.3", + "chokidar": "^4.0.1", "cli-cursor": "^3.1.0", "co-body": "^6.1.0", "convert-source-map": "^2.0.0", "debounce": "^1.2.0", "dependency-graph": "^0.11.0", "globby": "^11.0.1", - "ip": "^1.1.5", + "internal-ip": "^6.2.0", "istanbul-lib-coverage": "^3.0.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.0.2", @@ -1545,6 +1608,36 @@ "node": ">=18.0.0" } }, + "node_modules/@web/test-runner-core/node_modules/chokidar": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@web/test-runner-core/node_modules/readdirp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.1.tgz", + "integrity": "sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@web/test-runner-coverage-v8": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/@web/test-runner-coverage-v8/-/test-runner-coverage-v8-0.8.0.tgz", @@ -1622,10 +1715,11 @@ } }, "node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, + "license": "MIT", "dependencies": { "debug": "^4.3.4" }, @@ -1753,6 +1847,7 @@ "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.0.1" }, @@ -1783,15 +1878,17 @@ "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.0.tgz", "integrity": "sha512-eJFZ1YhRR8UN8eBLoNzcDPcy/jqjsg6I1AP+KvWQX80BqOSW1oJPJXDylPUEeMr2ZQvHgnQ//Lp6f3RQ1zI7HA==", "dev": true, + "license": "MIT", "dependencies": { "tslib": "^2.4.0" } }, "node_modules/b4a": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.4.tgz", - "integrity": "sha512-fpWrvyVHEKyeEvbKZTVOeZF3VSKKWtJxFIxX/jaVPf+cLbGUSitjb49pHLqPV2BUNNZ0LcoeEGfE/YCpyDYHIw==", - "dev": true + "version": "1.6.7", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.6.7.tgz", + "integrity": "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==", + "dev": true, + "license": "Apache-2.0" }, "node_modules/balanced-match": { "version": "1.0.2", @@ -1799,6 +1896,58 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/bare-events": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.5.0.tgz", + "integrity": "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A==", + "dev": true, + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-fs": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-2.3.5.tgz", + "integrity": "sha512-SlE9eTxifPDJrT6YgemQ1WGFleevzwY+XAP1Xqgl56HtcrisC2CHCZ2tq6dBpcH2TnNxwUEUGhweo+lrQtYuiw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-events": "^2.0.0", + "bare-path": "^2.0.0", + "bare-stream": "^2.0.0" + } + }, + "node_modules/bare-os": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.4.tgz", + "integrity": "sha512-z3UiI2yi1mK0sXeRdc4O1Kk8aOa/e+FNWZcTiPB/dfTWyLypuE99LibgRaQki914Jq//yAWylcAt+mknKdixRQ==", + "dev": true, + "license": "Apache-2.0", + "optional": true + }, + "node_modules/bare-path": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.3.tgz", + "integrity": "sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "bare-os": "^2.1.0" + } + }, + "node_modules/bare-stream": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.0.tgz", + "integrity": "sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "b4a": "^1.6.6", + "streamx": "^2.20.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -1817,13 +1966,15 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "MIT" }, "node_modules/basic-ftp": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.4.tgz", - "integrity": "sha512-8PzkB0arJFV4jJWSGOYR+OEic6aeKMu/osRhBULN6RY0ykby6LKhbmuQ5ublvaas5BOwboah5D87nrHyuh8PPA==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.5.tgz", + "integrity": "sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } @@ -1883,6 +2034,7 @@ "url": "https://feross.org/support" } ], + "license": "MIT", "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" @@ -1893,6 +2045,7 @@ "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true, + "license": "MIT", "engines": { "node": "*" } @@ -2105,6 +2258,7 @@ "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.15.2.tgz", "integrity": "sha512-zdLEwNo3aUVzIhKhTtXfxhdvZhUghrnmkvcAq2NoDd+LeOHKf03H5jwZ8T/STsAlzyALkBVK552iaG1fGf1xVQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@types/node": "*", "escape-string-regexp": "^4.0.0", @@ -2123,6 +2277,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -2131,12 +2286,15 @@ } }, "node_modules/chromium-bidi": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.4.16.tgz", - "integrity": "sha512-7ZbXdWERxRxSwo3txsBjjmc/NLxqb1Bk30mRb0BMS4YIaiV6zvKZqL/UAH+DdqcDYayDWk2n/y8klkBDODrPvA==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-0.6.3.tgz", + "integrity": "sha512-qXlsCmpCZJAnoTYI83Iu6EdYQpMYdVkCfq08KDh2pmlVqK5t5IA9mGs4/LwCwp4fqisSOMXZxP3HIh8w8aRn0A==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "mitt": "3.0.0" + "mitt": "3.0.1", + "urlpattern-polyfill": "10.0.0", + "zod": "3.23.8" }, "peerDependencies": { "devtools-protocol": "*" @@ -2370,15 +2528,6 @@ "node": ">= 0.8" } }, - "node_modules/cross-fetch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz", - "integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==", - "dev": true, - "dependencies": { - "node-fetch": "^2.6.12" - } - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2394,10 +2543,11 @@ } }, "node_modules/data-uri-to-buffer": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", - "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz", + "integrity": "sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==", "dev": true, + "license": "MIT", "engines": { "node": ">= 14" } @@ -2467,6 +2617,19 @@ "node": ">=0.10.0" } }, + "node_modules/default-gateway": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz", + "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">= 10" + } + }, "node_modules/define-data-property": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", @@ -2495,6 +2658,7 @@ "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", "dev": true, + "license": "MIT", "dependencies": { "ast-types": "^0.13.4", "escodegen": "^2.1.0", @@ -2539,10 +2703,11 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1147663", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1147663.tgz", - "integrity": "sha512-hyWmRrexdhbZ1tcJUGpO95ivbRhWXz++F4Ko+n21AY5PNln2ovoJw+8ZMNDTtip+CNFQfrtLVh/w4009dXO/eQ==", - "dev": true + "version": "0.0.1312386", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz", + "integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==", + "dev": true, + "license": "BSD-3-Clause" }, "node_modules/diff": { "version": "5.1.0", @@ -2603,6 +2768,7 @@ "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, + "license": "MIT", "dependencies": { "once": "^1.4.0" } @@ -2686,6 +2852,7 @@ "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esprima": "^4.0.1", "estraverse": "^5.2.0", @@ -2707,6 +2874,7 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true, + "license": "BSD-3-Clause", "optional": true, "engines": { "node": ">=0.10.0" @@ -2968,6 +3136,7 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true, + "license": "BSD-2-Clause", "bin": { "esparse": "bin/esparse.js", "esvalidate": "bin/esvalidate.js" @@ -3033,11 +3202,36 @@ "node": ">= 0.6" } }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "debug": "^4.1.1", "get-stream": "^5.1.0", @@ -3058,6 +3252,7 @@ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, + "license": "MIT", "dependencies": { "pump": "^3.0.0" }, @@ -3078,7 +3273,8 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-glob": { "version": "3.3.2", @@ -3122,6 +3318,7 @@ "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", "dev": true, + "license": "MIT", "dependencies": { "pend": "~1.2.0" } @@ -3217,17 +3414,18 @@ } }, "node_modules/fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=14.14" } }, "node_modules/fs.realpath": { @@ -3304,15 +3502,16 @@ } }, "node_modules/get-uri": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", - "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.3.tgz", + "integrity": "sha512-BzUrJBS9EcUb4cFol8r4W3v1cPsSyajLSthNkz5BxbpDcHN5tIrM10E2eNvfnvBn3DaT3DUgx0OpsBKkaOpanw==", "dev": true, + "license": "MIT", "dependencies": { "basic-ftp": "^5.0.2", - "data-uri-to-buffer": "^6.0.0", + "data-uri-to-buffer": "^6.0.2", "debug": "^4.3.4", - "fs-extra": "^8.1.0" + "fs-extra": "^11.2.0" }, "engines": { "node": ">= 14" @@ -3412,7 +3611,8 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/graphemer": { "version": "1.4.0", @@ -3546,10 +3746,11 @@ } }, "node_modules/http-proxy-agent": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", - "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.1.0", "debug": "^4.3.4" @@ -3559,10 +3760,11 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -3571,6 +3773,16 @@ "node": ">= 14" } }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -3601,7 +3813,8 @@ "type": "consulting", "url": "https://feross.org/support" } - ] + ], + "license": "BSD-3-Clause" }, "node_modules/ignore": { "version": "5.3.0", @@ -3662,11 +3875,58 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/ip": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.9.tgz", - "integrity": "sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==", - "dev": true + "node_modules/internal-ip": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-6.2.0.tgz", + "integrity": "sha512-D8WGsR6yDt8uq7vDMu7mjcR+yRMm3dW8yufyChmszWRjcSHuxLBkR3GdS2HZAjodsaGuCvXeEJpueisXJULghg==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-gateway": "^6.0.0", + "ipaddr.js": "^1.9.1", + "is-ip": "^3.1.0", + "p-event": "^4.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/internal-ip?sponsor=1" + } + }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/ip-regex": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-4.3.0.tgz", + "integrity": "sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.10" + } }, "node_modules/is-binary-path": { "version": "2.1.0", @@ -3767,6 +4027,19 @@ "node": ">=0.10.0" } }, + "node_modules/is-ip": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-ip/-/is-ip-3.1.0.tgz", + "integrity": "sha512-35vd5necO7IitFPjd/YBeqwWnyDWbuLH9ZXQdMfDA8TEo7pv5X8yfrvVO3xbJbLUlERCMvf6X0hTUamQxCYJ9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ip-regex": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -3938,6 +4211,13 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true, + "license": "MIT" + }, "node_modules/jsdoc-type-pratt-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", @@ -3966,10 +4246,14 @@ "dev": true }, "node_modules/jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", + "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, "optionalDependencies": { "graceful-fs": "^4.1.6" } @@ -4111,6 +4395,7 @@ "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.4.2.tgz", "integrity": "sha512-gPWxznF6TKmUHrOQjlVo2UbaL2EJ71mb2CCeRs/2qBpi4L/g4LUVc9+3lKQ6DTUZwJswfM7ainGrLO1+fOqa2g==", "dev": true, + "license": "Apache-2.0", "dependencies": { "debug": "^2.6.9", "marky": "^1.2.2" @@ -4121,6 +4406,7 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -4129,7 +4415,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/locate-path": { "version": "6.0.0", @@ -4317,7 +4604,8 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/marky/-/marky-1.2.5.tgz", "integrity": "sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/media-typer": { "version": "0.3.0", @@ -4328,6 +4616,13 @@ "node": ">= 0.6" } }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -4338,12 +4633,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -4402,10 +4698,11 @@ } }, "node_modules/mitt": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.0.tgz", - "integrity": "sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==", - "dev": true + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true, + "license": "MIT" }, "node_modules/mkdirp": { "version": "1.0.4", @@ -4419,12 +4716,6 @@ "node": ">=10" } }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, "node_modules/mocha": { "version": "10.2.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", @@ -4632,52 +4923,11 @@ "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4.0" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/node-fetch/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/node-fetch/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/node-fetch/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -4687,6 +4937,19 @@ "node": ">=0.10.0" } }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -4772,6 +5035,32 @@ "node": ">= 0.8.0" } }, + "node_modules/p-event": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", + "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", + "dev": true, + "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", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -4802,33 +5091,47 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/pac-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", - "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.2.tgz", + "integrity": "sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==", "dev": true, + "license": "MIT", "dependencies": { "@tootallnate/quickjs-emscripten": "^0.23.0", "agent-base": "^7.0.2", "debug": "^4.3.4", "get-uri": "^6.0.1", "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.2", - "pac-resolver": "^7.0.0", - "socks-proxy-agent": "^8.0.2" + "https-proxy-agent": "^7.0.5", + "pac-resolver": "^7.0.1", + "socks-proxy-agent": "^8.0.4" }, "engines": { "node": ">= 14" } }, "node_modules/pac-resolver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.0.tgz", - "integrity": "sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.1.tgz", + "integrity": "sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==", "dev": true, + "license": "MIT", "dependencies": { "degenerator": "^5.0.0", - "ip": "^1.1.8", "netmask": "^2.0.2" }, "engines": { @@ -4916,7 +5219,8 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/picomatch": { "version": "2.3.1", @@ -5023,24 +5327,26 @@ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.4.0" } }, "node_modules/proxy-agent": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.3.0.tgz", - "integrity": "sha512-0LdR757eTj/JfuU7TL2YCuAZnxWXu3tkJbg4Oq3geW/qFNT/32T0sp2HnZ9O0lMR4q3vwAt0+xCA8SR0WAD0og==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-6.4.0.tgz", + "integrity": "sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==", "dev": true, + "license": "MIT", "dependencies": { "agent-base": "^7.0.2", "debug": "^4.3.4", - "http-proxy-agent": "^7.0.0", - "https-proxy-agent": "^7.0.0", + "http-proxy-agent": "^7.0.1", + "https-proxy-agent": "^7.0.3", "lru-cache": "^7.14.1", - "pac-proxy-agent": "^7.0.0", + "pac-proxy-agent": "^7.0.1", "proxy-from-env": "^1.1.0", - "socks-proxy-agent": "^8.0.1" + "socks-proxy-agent": "^8.0.2" }, "engines": { "node": ">= 14" @@ -5051,6 +5357,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } @@ -5059,13 +5366,15 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dev": true, + "license": "MIT", "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -5081,35 +5390,53 @@ } }, "node_modules/puppeteer-core": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-20.9.0.tgz", - "integrity": "sha512-H9fYZQzMTRrkboEfPmf7m3CLDN6JvbxXA3qTtS+dFt27tR+CsFHzPsT6pzp6lYL6bJbAPaR0HaPO6uSi+F94Pg==", + "version": "22.15.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-22.15.0.tgz", + "integrity": "sha512-cHArnywCiAAVXa3t4GGL2vttNxh7GqXtIYGym99egkNJ3oG//wL9LkvO4WE8W1TJe95t1F1ocu9X4xWaGsOKOA==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@puppeteer/browsers": "1.4.6", - "chromium-bidi": "0.4.16", - "cross-fetch": "4.0.0", - "debug": "4.3.4", - "devtools-protocol": "0.0.1147663", - "ws": "8.13.0" + "@puppeteer/browsers": "2.3.0", + "chromium-bidi": "0.6.3", + "debug": "^4.3.6", + "devtools-protocol": "0.0.1312386", + "ws": "^8.18.0" }, "engines": { - "node": ">=16.3.0" + "node": ">=18" + } + }, + "node_modules/puppeteer-core/node_modules/debug": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" }, - "peerDependencies": { - "typescript": ">= 4.7.4" + "engines": { + "node": ">=6.0" }, "peerDependenciesMeta": { - "typescript": { + "supports-color": { "optional": true } } }, + "node_modules/puppeteer-core/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, "node_modules/puppeteer-core/node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -5165,7 +5492,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz", "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/randombytes": { "version": "2.1.0", @@ -5477,13 +5805,11 @@ "dev": true }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -5491,18 +5817,6 @@ "node": ">=10" } }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/serialize-javascript": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", @@ -5638,45 +5952,42 @@ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "dev": true, + "license": "MIT", "dependencies": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.13.0", + "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, "node_modules/socks-proxy-agent": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", - "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz", + "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==", "dev": true, + "license": "MIT", "dependencies": { - "agent-base": "^7.0.2", + "agent-base": "^7.1.1", "debug": "^4.3.4", - "socks": "^2.7.1" + "socks": "^2.8.3" }, "engines": { "node": ">= 14" } }, - "node_modules/socks/node_modules/ip": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.1.tgz", - "integrity": "sha512-lJUL9imLTNi1ZfXT+DU6rBBdbiKGBuay9B6xGSPVjUeQwaH1RIGqef8RZkUtHioLmSNpPR5M4HVKJGm1j8FWVQ==", - "dev": true - }, "node_modules/source-map": { "version": "0.7.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", @@ -5708,6 +6019,13 @@ "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==", "dev": true }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -5727,13 +6045,18 @@ } }, "node_modules/streamx": { - "version": "2.15.6", - "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz", - "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==", + "version": "2.20.1", + "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.20.1.tgz", + "integrity": "sha512-uTa0mU6WUC65iUvzKH4X9hEdvSW7rbPxPtwfWiLMSj3qTdQbAiUboZTxauKfpFuGIGa1C2BYijZ7wgdUXICJhA==", "dev": true, + "license": "MIT", "dependencies": { - "fast-fifo": "^1.1.0", - "queue-tick": "^1.0.1" + "fast-fifo": "^1.3.2", + "queue-tick": "^1.0.1", + "text-decoder": "^1.1.0" + }, + "optionalDependencies": { + "bare-events": "^2.2.0" } }, "node_modules/string-width": { @@ -5762,6 +6085,16 @@ "node": ">=8" } }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -5838,27 +6171,42 @@ } }, "node_modules/tar-fs": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.4.tgz", - "integrity": "sha512-5AFQU8b9qLfZCX9zp2duONhPmZv0hGYiBPJsyUdqMjzq/mqVpy/rEUSeHk1+YitmxugaptgBh5oDGU3VsAJq4w==", + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.0.6.tgz", + "integrity": "sha512-iokBDQQkUyeXhgPYaZxmczGPhnhXZ0CmrqI+MOb/WFGS9DW5wnfrLgtjUJBvz50vQ3qfRwJ62QVoCFu8mPVu5w==", "dev": true, + "license": "MIT", "dependencies": { - "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", "tar-stream": "^3.1.5" + }, + "optionalDependencies": { + "bare-fs": "^2.1.1", + "bare-path": "^2.1.0" } }, "node_modules/tar-stream": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.6.tgz", - "integrity": "sha512-B/UyjYwPpMBv+PaFSWAmtYjwdrlEaZQEhMIBFNC5oEG8lpiW8XjcSdmEaClj28ArfKScKHs2nshz3k2le6crsg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.1.7.tgz", + "integrity": "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==", "dev": true, + "license": "MIT", "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, + "node_modules/text-decoder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.0.tgz", + "integrity": "sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "b4a": "^1.6.4" + } + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -5869,7 +6217,8 @@ "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/to-regex-range": { "version": "5.0.1", @@ -5905,10 +6254,11 @@ } }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", - "dev": true + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "dev": true, + "license": "0BSD" }, "node_modules/tsscmp": { "version": "1.0.6", @@ -5970,6 +6320,7 @@ "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==", "dev": true, + "license": "MIT", "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" @@ -5982,12 +6333,13 @@ "dev": true }, "node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, + "license": "MIT", "engines": { - "node": ">= 4.0.0" + "node": ">= 10.0.0" } }, "node_modules/unpipe": { @@ -6008,6 +6360,13 @@ "punycode": "^2.1.0" } }, + "node_modules/urlpattern-polyfill": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", + "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", + "dev": true, + "license": "MIT" + }, "node_modules/v8-to-istanbul": { "version": "9.2.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", @@ -6137,10 +6496,11 @@ "dev": true }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.3.0" }, @@ -6166,12 +6526,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", @@ -6219,6 +6573,7 @@ "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", "dev": true, + "license": "MIT", "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" @@ -6244,6 +6599,16 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.23.8", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.23.8.tgz", + "integrity": "sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } } } }