diff --git a/.github/workflows/tests-ci.yml b/.github/workflows/tests-ci.yml index 611590ee1..5a90ebb3d 100644 --- a/.github/workflows/tests-ci.yml +++ b/.github/workflows/tests-ci.yml @@ -1,4 +1,4 @@ -name: Run Tests in Node and Browsers +name: Continuous Integration on: push: @@ -12,6 +12,20 @@ on: workflow_dispatch: jobs: + security-audit: + runs-on: ubuntu-latest + steps: + - name: Checkout source + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + + - name: Set up Node.js + uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 + with: + node-version: 18 + + - name: Report known vulnerabilities + run: npm audit + test-with-node: runs-on: ubuntu-latest steps: @@ -36,6 +50,11 @@ jobs: - name: Run tests for all packages run: npm run test:node --ws + - name: Upload test coverage to Codecov + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + test-with-browsers: # Run browser tests using macOS so that WebKit tests don't fail under a Linux environment runs-on: macos-latest diff --git a/README.md b/README.md index 091bee967..4e0a8130c 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![NPM](https://img.shields.io/npm/v/@tbd54566975/web5.svg?style=flat-square&logo=npm&logoColor=FFFFFF&color=FFEC19&santize=true)](https://www.npmjs.com/package/@tbd54566975/web5) [![Build Status](https://img.shields.io/github/actions/workflow/status/TBD54566975/web5-js/tests-ci.yml?branch=main&logo=github&label=ci&logoColor=FFFFFF&style=flat-square)](https://github.com/TBD54566975/web5-js/actions/workflows/tests-ci.yml) +[![Coverage](https://img.shields.io/codecov/c/gh/frankhinek/test-web5-js/main?logo=codecov&logoColor=FFFFFF&style=flat-square&token=YI87CKF1LI)](https://codecov.io/github/TBD54566975/web5-js) [![License](https://img.shields.io/npm/l/@tbd54566975/web5.svg?style=flat-square&color=24f2ff&logo=apache&logoColor=FFFFFF&santize=true)](https://github.com/TBD54566975/web5-js/blob/main/LICENSE) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=flat-square&color=9a1aff&logo=discord&logoColor=FFFFFF&sanitize=true)](https://discord.com/channels/937858703112155166/969272658501976117) diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000..b62bdd9f5 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,45 @@ +comment: + layout: "header, diff, components" + +component_management: + default_rules: + statuses: + - type: project + target: auto # auto compares coverage to the previous base commit + threshold: 10% # allows a 10% drop from the previous base commit coverage + - type: patch + target: 100 # every PR opened should strive for full test coverage + + individual_components: + - component_id: package_crypto + name: crypto + paths: ["packages/crypto/**"] + + - component_id: package_dids + name: dids + paths: ["packages/dids/**"] + + - component_id: package-web5 + name: web5 + paths: ["packages/web5/**"] + + - component_id: package-web5-agent + name: web5-agent + paths: ["packages/web5-agent/**"] + + - component_id: package-web5-proxy-agent + name: web5-proxy-agent + paths: ["packages/web5-proxy-agent/**"] + + - component_id: package-web5-user-agent + name: web5-user-agent + paths: ["packages/web5-user-agent/**"] + +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true # Don't gate PRs based on Codecov passing thresholds diff --git a/package-lock.json b/package-lock.json index ed6a3c56a..018a9327b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -105,9 +105,9 @@ "integrity": "sha512-fCCB6XMrr6CqJiHNjfFNGT0v//dxOBMrOMqUIzpPc/mmITweLEyhvMpY9bF+jZ9z3vaMAau5E8B68DW77QMXkg==" }, "node_modules/@esbuild/android-arm": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.7.tgz", - "integrity": "sha512-yhzDbiVcmq6T1/XEvdcJIVcXHdLjDJ5cQ0Dp9R9p9ERMBTeO1dR5tc8YYv8zwDeBw1xZm+Eo3MRo8cwclhBS0g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", + "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", "cpu": [ "arm" ], @@ -116,15 +116,14 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.7.tgz", - "integrity": "sha512-tYFw0lBJSEvLoGzzYh1kXuzoX1iPkbOk3O29VqzQb0HbOy7t/yw1hGkvwoJhXHwzQUPsShyYcTgRf6bDBcfnTw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", + "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", "cpu": [ "arm64" ], @@ -133,15 +132,14 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/android-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.7.tgz", - "integrity": "sha512-3P2OuTxwAtM3k/yEWTNUJRjMPG1ce8rXs51GTtvEC5z1j8fC1plHeVVczdeHECU7aM2/Buc0MwZ6ciM/zysnWg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", + "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", "cpu": [ "x64" ], @@ -150,15 +148,14 @@ "os": [ "android" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.7.tgz", - "integrity": "sha512-VUb9GK23z8jkosHU9yJNUgQpsfJn+7ZyBm6adi2Ec5/U241eR1tAn82QicnUzaFDaffeixiHwikjmnec/YXEZg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", + "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", "cpu": [ "arm64" ], @@ -167,15 +164,14 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.7.tgz", - "integrity": "sha512-duterlv3tit3HI9vhzMWnSVaB1B6YsXpFq1Ntd6Fou82BB1l4tucYy3FI9dHv3tvtDuS0NiGf/k6XsdBqPZ01w==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", + "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", "cpu": [ "x64" ], @@ -184,15 +180,14 @@ "os": [ "darwin" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.7.tgz", - "integrity": "sha512-9kkycpBFes/vhi7B7o0cf+q2WdJi+EpVzpVTqtWFNiutARWDFFLcB93J8PR1cG228sucsl3B+7Ts27izE6qiaQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", + "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", "cpu": [ "arm64" ], @@ -201,15 +196,14 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.7.tgz", - "integrity": "sha512-5Ahf6jzWXJ4J2uh9dpy5DKOO+PeRUE/9DMys6VuYfwgQzd6n5+pVFm58L2Z2gRe611RX6SdydnNaiIKM3svY7g==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", + "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", "cpu": [ "x64" ], @@ -218,15 +212,14 @@ "os": [ "freebsd" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.7.tgz", - "integrity": "sha512-QqJnyCfu5OF78Olt7JJSZ7OSv/B4Hf+ZJWp4kkq9xwMsgu7yWq3crIic8gGOpDYTqVKKMDAVDgRXy5Wd/nWZyQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", + "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", "cpu": [ "arm" ], @@ -235,15 +228,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.7.tgz", - "integrity": "sha512-2wv0xYDskk2+MzIm/AEprDip39a23Chptc4mL7hsHg26P0gD8RUhzmDu0KCH2vMThUI1sChXXoK9uH0KYQKaDg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", + "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", "cpu": [ "arm64" ], @@ -252,15 +244,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.7.tgz", - "integrity": "sha512-APVYbEilKbD5ptmKdnIcXej2/+GdV65TfTjxR2Uk8t1EsOk49t6HapZW6DS/Bwlvh5hDwtLapdSumIVNGxgqLg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", + "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", "cpu": [ "ia32" ], @@ -269,15 +260,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.7.tgz", - "integrity": "sha512-5wPUAGclplQrAW7EFr3F84Y/d++7G0KykohaF4p54+iNWhUnMVU8Bh2sxiEOXUy4zKIdpHByMgJ5/Ko6QhtTUw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", + "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", "cpu": [ "loong64" ], @@ -286,15 +276,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.7.tgz", - "integrity": "sha512-hxzlXtWF6yWfkE/SMTscNiVqLOAn7fOuIF3q/kiZaXxftz1DhZW/HpnTmTTWrzrS7zJWQxHHT4QSxyAj33COmA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", + "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", "cpu": [ "mips64el" ], @@ -303,15 +292,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.7.tgz", - "integrity": "sha512-WM83Dac0LdXty5xPhlOuCD5Egfk1xLND/oRLYeB7Jb/tY4kzFSDgLlq91wYbHua/s03tQGA9iXvyjgymMw62Vw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", + "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", "cpu": [ "ppc64" ], @@ -320,15 +308,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.7.tgz", - "integrity": "sha512-3nkNnNg4Ax6MS/l8O8Ynq2lGEVJYyJ2EoY3PHjNJ4PuZ80EYLMrFTFZ4L/Hc16AxgtXKwmNP9TM0YKNiBzBiJQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", + "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", "cpu": [ "riscv64" ], @@ -337,15 +324,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.7.tgz", - "integrity": "sha512-3SA/2VJuv0o1uD7zuqxEP+RrAyRxnkGddq0bwHQ98v1KNlzXD/JvxwTO3T6GM5RH6JUd29RTVQTOJfyzMkkppA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", + "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", "cpu": [ "s390x" ], @@ -354,15 +340,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.7.tgz", - "integrity": "sha512-xi/tbqCqvPIzU+zJVyrpz12xqciTAPMi2fXEWGnapZymoGhuL2GIWIRXg4O2v5BXaYA5TSaiKYE14L0QhUTuQg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", + "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", "cpu": [ "x64" ], @@ -371,15 +356,14 @@ "os": [ "linux" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.7.tgz", - "integrity": "sha512-NUsYbq3B+JdNKn8SXkItFvdes9qTwEoS3aLALtiWciW/ystiCKM20Fgv9XQBOXfhUHyh5CLEeZDXzLOrwBXuCQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", + "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", "cpu": [ "x64" ], @@ -388,15 +372,14 @@ "os": [ "netbsd" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.7.tgz", - "integrity": "sha512-qjwzsgeve9I8Tbsko2FEkdSk2iiezuNGFgipQxY/736NePXDaDZRodIejYGWOlbYXugdxb0nif5yvypH6lKBmA==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", + "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", "cpu": [ "x64" ], @@ -405,15 +388,14 @@ "os": [ "openbsd" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.7.tgz", - "integrity": "sha512-mFWDz4RoBTzPphTCkM7Kc7Qpa0o/Z01acajR+Ai7LdfKgcP/C6jYOaKwv7nKzD0+MjOT20j7You9g4ozYy1dKQ==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", + "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", "cpu": [ "x64" ], @@ -422,15 +404,14 @@ "os": [ "sunos" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.7.tgz", - "integrity": "sha512-m39UmX19RvEIuC8sYZ0M+eQtdXw4IePDSZ78ZQmYyFaXY9krq4YzQCK2XWIJomNLtg4q+W5aXr8bW3AbqWNoVg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", + "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", "cpu": [ "arm64" ], @@ -439,15 +420,14 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.7.tgz", - "integrity": "sha512-1cbzSEZA1fANwmT6rjJ4G1qQXHxCxGIcNYFYR9ctI82/prT38lnwSRZ0i5p/MVXksw9eMlHlet6pGu2/qkXFCg==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", + "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", "cpu": [ "ia32" ], @@ -456,15 +436,14 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=12" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.7.tgz", - "integrity": "sha512-QaQ8IH0JLacfGf5cf0HCCPnQuCTd/dAI257vXBgb/cccKGbH/6pVtI1gwhdAQ0Y48QSpTIFrh9etVyNdZY+zzw==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", + "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", "cpu": [ "x64" ], @@ -473,7 +452,6 @@ "os": [ "win32" ], - "peer": true, "engines": { "node": ">=12" } @@ -2984,9 +2962,9 @@ "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "node_modules/esbuild": { - "version": "0.16.7", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.7.tgz", - "integrity": "sha512-P6OBFYFSQOGzfApqCeYKqfKRRbCIRsdppTXFo4aAvtiW3o8TTyiIplBvHJI171saPAiy3WlawJHCveJVIOIx1A==", + "version": "0.16.17", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", + "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", "dev": true, "hasInstallScript": true, "bin": { @@ -2996,28 +2974,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.16.7", - "@esbuild/android-arm64": "0.16.7", - "@esbuild/android-x64": "0.16.7", - "@esbuild/darwin-arm64": "0.16.7", - "@esbuild/darwin-x64": "0.16.7", - "@esbuild/freebsd-arm64": "0.16.7", - "@esbuild/freebsd-x64": "0.16.7", - "@esbuild/linux-arm": "0.16.7", - "@esbuild/linux-arm64": "0.16.7", - "@esbuild/linux-ia32": "0.16.7", - "@esbuild/linux-loong64": "0.16.7", - "@esbuild/linux-mips64el": "0.16.7", - "@esbuild/linux-ppc64": "0.16.7", - "@esbuild/linux-riscv64": "0.16.7", - "@esbuild/linux-s390x": "0.16.7", - "@esbuild/linux-x64": "0.16.7", - "@esbuild/netbsd-x64": "0.16.7", - "@esbuild/openbsd-x64": "0.16.7", - "@esbuild/sunos-x64": "0.16.7", - "@esbuild/win32-arm64": "0.16.7", - "@esbuild/win32-ia32": "0.16.7", - "@esbuild/win32-x64": "0.16.7" + "@esbuild/android-arm": "0.16.17", + "@esbuild/android-arm64": "0.16.17", + "@esbuild/android-x64": "0.16.17", + "@esbuild/darwin-arm64": "0.16.17", + "@esbuild/darwin-x64": "0.16.17", + "@esbuild/freebsd-arm64": "0.16.17", + "@esbuild/freebsd-x64": "0.16.17", + "@esbuild/linux-arm": "0.16.17", + "@esbuild/linux-arm64": "0.16.17", + "@esbuild/linux-ia32": "0.16.17", + "@esbuild/linux-loong64": "0.16.17", + "@esbuild/linux-mips64el": "0.16.17", + "@esbuild/linux-ppc64": "0.16.17", + "@esbuild/linux-riscv64": "0.16.17", + "@esbuild/linux-s390x": "0.16.17", + "@esbuild/linux-x64": "0.16.17", + "@esbuild/netbsd-x64": "0.16.17", + "@esbuild/openbsd-x64": "0.16.17", + "@esbuild/sunos-x64": "0.16.17", + "@esbuild/win32-arm64": "0.16.17", + "@esbuild/win32-ia32": "0.16.17", + "@esbuild/win32-x64": "0.16.17" } }, "node_modules/escalade": { @@ -4355,15 +4333,6 @@ "node": ">=10" } }, - "node_modules/istanbul-badges-readme": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/istanbul-badges-readme/-/istanbul-badges-readme-1.8.5.tgz", - "integrity": "sha512-VEh90ofuufPZIbLeDF2g14wpe0sebhirG0xHooYKpNPYOkGXm6y+HJFotQqIzCg0NmbCnlKnOPL1B2oxG7/piA==", - "dev": true, - "bin": { - "istanbul-badges-readme": "lib/index.js" - } - }, "node_modules/istanbul-lib-coverage": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", @@ -7739,13 +7708,17 @@ }, "devDependencies": { "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/ed2curve": "0.2.2", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", - "esbuild": "0.16.7", + "chai-as-promised": "7.1.1", + "esbuild": "0.16.17", "eslint": "8.39.0", "karma": "6.4.1", "karma-chai": "0.1.0", @@ -7759,6 +7732,8 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "engines": { @@ -7777,15 +7752,17 @@ }, "devDependencies": { "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", "c8": "7.14.0", "chai": "4.3.7", - "esbuild": "0.16.7", + "chai-as-promised": "7.1.1", + "esbuild": "0.16.17", "eslint": "8.39.0", - "istanbul-badges-readme": "1.8.5", "karma": "6.4.1", "karma-chai": "0.1.0", "karma-chrome-launcher": "3.1.1", @@ -7798,6 +7775,8 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "engines": { @@ -7823,6 +7802,8 @@ "devDependencies": { "@types/chai": "4.3.0", "@types/chai-as-promised": "7.1.5", + "@types/eslint": "8.37.0", + "@types/mocha": "10.0.1", "@types/ms": "0.7.31", "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", @@ -7832,7 +7813,6 @@ "chai-as-promised": "7.1.1", "esbuild": "0.16.17", "eslint": "8.39.0", - "istanbul-badges-readme": "1.8.5", "karma": "6.4.1", "karma-chai": "0.1.0", "karma-chrome-launcher": "3.1.1", @@ -7863,12 +7843,16 @@ }, "devDependencies": { "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", - "esbuild": "0.16.7", + "chai-as-promised": "7.1.1", + "esbuild": "0.16.17", "eslint": "8.39.0", "karma": "6.4.1", "karma-chai": "0.1.0", @@ -7882,6 +7866,8 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "engines": { @@ -7897,14 +7883,17 @@ }, "devDependencies": { "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/ed2curve": "0.2.2", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", "chai-as-promised": "7.1.1", - "esbuild": "0.16.7", + "esbuild": "0.16.17", "eslint": "8.39.0", "karma": "6.4.1", "karma-chai": "0.1.0", @@ -7918,6 +7907,8 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "engines": { @@ -7943,9 +7934,14 @@ "devDependencies": { "@faker-js/faker": "8.0.1", "@playwright/test": "1.33.0", + "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/flat": "5.0.2", + "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", "chai-as-promised": "7.1.1", "esbuild": "0.16.17", @@ -7969,784 +7965,6 @@ "engines": { "node": ">=18.0.0" } - }, - "packages/web5-user-agent/node_modules/@esbuild/android-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", - "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/android-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", - "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/android-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", - "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/darwin-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", - "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/darwin-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", - "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", - "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/freebsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", - "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", - "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", - "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", - "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-loong64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", - "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-mips64el": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", - "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-ppc64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", - "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-riscv64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", - "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-s390x": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", - "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/linux-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", - "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/netbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", - "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/openbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", - "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/sunos-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", - "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/win32-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", - "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/win32-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", - "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/@esbuild/win32-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", - "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5-user-agent/node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } - }, - "packages/web5/node_modules/@esbuild/android-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.16.17.tgz", - "integrity": "sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/android-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.16.17.tgz", - "integrity": "sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/android-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.16.17.tgz", - "integrity": "sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/darwin-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.16.17.tgz", - "integrity": "sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/darwin-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.16.17.tgz", - "integrity": "sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/freebsd-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.16.17.tgz", - "integrity": "sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/freebsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.16.17.tgz", - "integrity": "sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-arm": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.16.17.tgz", - "integrity": "sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==", - "cpu": [ - "arm" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.16.17.tgz", - "integrity": "sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.16.17.tgz", - "integrity": "sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-loong64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.16.17.tgz", - "integrity": "sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-mips64el": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.16.17.tgz", - "integrity": "sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==", - "cpu": [ - "mips64el" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-ppc64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.16.17.tgz", - "integrity": "sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==", - "cpu": [ - "ppc64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-riscv64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.16.17.tgz", - "integrity": "sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==", - "cpu": [ - "riscv64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-s390x": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.16.17.tgz", - "integrity": "sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==", - "cpu": [ - "s390x" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/linux-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.16.17.tgz", - "integrity": "sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/netbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.16.17.tgz", - "integrity": "sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/openbsd-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.16.17.tgz", - "integrity": "sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/sunos-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.16.17.tgz", - "integrity": "sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/win32-arm64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.16.17.tgz", - "integrity": "sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/win32-ia32": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.16.17.tgz", - "integrity": "sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==", - "cpu": [ - "ia32" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/@esbuild/win32-x64": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.16.17.tgz", - "integrity": "sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "packages/web5/node_modules/esbuild": { - "version": "0.16.17", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.16.17.tgz", - "integrity": "sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==", - "dev": true, - "hasInstallScript": true, - "bin": { - "esbuild": "bin/esbuild" - }, - "engines": { - "node": ">=12" - }, - "optionalDependencies": { - "@esbuild/android-arm": "0.16.17", - "@esbuild/android-arm64": "0.16.17", - "@esbuild/android-x64": "0.16.17", - "@esbuild/darwin-arm64": "0.16.17", - "@esbuild/darwin-x64": "0.16.17", - "@esbuild/freebsd-arm64": "0.16.17", - "@esbuild/freebsd-x64": "0.16.17", - "@esbuild/linux-arm": "0.16.17", - "@esbuild/linux-arm64": "0.16.17", - "@esbuild/linux-ia32": "0.16.17", - "@esbuild/linux-loong64": "0.16.17", - "@esbuild/linux-mips64el": "0.16.17", - "@esbuild/linux-ppc64": "0.16.17", - "@esbuild/linux-riscv64": "0.16.17", - "@esbuild/linux-s390x": "0.16.17", - "@esbuild/linux-x64": "0.16.17", - "@esbuild/netbsd-x64": "0.16.17", - "@esbuild/openbsd-x64": "0.16.17", - "@esbuild/sunos-x64": "0.16.17", - "@esbuild/win32-arm64": "0.16.17", - "@esbuild/win32-ia32": "0.16.17", - "@esbuild/win32-x64": "0.16.17" - } } } } diff --git a/packages/web5/.c8rc b/packages/crypto/.c8rc.json similarity index 83% rename from packages/web5/.c8rc rename to packages/crypto/.c8rc.json index 12fd16da8..0d483c700 100644 --- a/packages/web5/.c8rc +++ b/packages/crypto/.c8rc.json @@ -12,9 +12,7 @@ "__tests__/types/**" ], "reporter": [ - "text", "cobertura", - "html", - "json-summary" + "text" ] -} +} \ No newline at end of file diff --git a/packages/crypto/.mocharc.json b/packages/crypto/.mocharc.json index 2e8b2e076..c223f40c7 100644 --- a/packages/crypto/.mocharc.json +++ b/packages/crypto/.mocharc.json @@ -1,3 +1,5 @@ { - "enable-source-maps": true -} \ No newline at end of file + "enable-source-maps": true, + "exit": true, + "spec": ["__tests__/**/*.spec.js"] + } \ No newline at end of file diff --git a/packages/crypto/package.json b/packages/crypto/package.json index 58d65ea72..82b13675b 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -10,7 +10,7 @@ "build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc", "lint": "eslint . --ext .js --max-warnings 0", "lint:fix": "eslint . --ext .js --fix", - "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && mocha \"__tests__/**/*.spec.js\" --exit", + "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha", "test:browser": "karma start karma.conf.cjs" }, "homepage": "https://github.com/TBD54566975/web5-js/tree/main/packages/crypto#readme", @@ -79,13 +79,17 @@ }, "devDependencies": { "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/ed2curve": "0.2.2", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", - "esbuild": "0.16.7", + "chai-as-promised": "7.1.1", + "esbuild": "0.16.17", "eslint": "8.39.0", "karma": "6.4.1", "karma-chai": "0.1.0", @@ -99,9 +103,11 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "overrides": { - "socket.io-parser@>4.0.4 <4.2.3": "4.2.3" + "socket.io-parser@>4.0.4 <4.2.3": "4.2.3" } } \ No newline at end of file diff --git a/packages/dids/.c8rc b/packages/dids/.c8rc.json similarity index 80% rename from packages/dids/.c8rc rename to packages/dids/.c8rc.json index 2c5756b6d..0d483c700 100644 --- a/packages/dids/.c8rc +++ b/packages/dids/.c8rc.json @@ -8,13 +8,11 @@ "__tests__/src/**" ], "exclude": [ + "__tests__/src/main.js", "__tests__/types/**" ], "reporter": [ - "text", "cobertura", - "html", - "json-summary" + "text" ] -} - +} \ No newline at end of file diff --git a/packages/dids/.mocharc.json b/packages/dids/.mocharc.json index 2e8b2e076..c223f40c7 100644 --- a/packages/dids/.mocharc.json +++ b/packages/dids/.mocharc.json @@ -1,3 +1,5 @@ { - "enable-source-maps": true -} \ No newline at end of file + "enable-source-maps": true, + "exit": true, + "spec": ["__tests__/**/*.spec.js"] + } \ No newline at end of file diff --git a/packages/dids/package.json b/packages/dids/package.json index 5e29e778b..9d6b80f96 100644 --- a/packages/dids/package.json +++ b/packages/dids/package.json @@ -7,11 +7,10 @@ "module": "./dist/esm/main.mjs", "types": "./dist/types/main.d.ts", "scripts": { - "make-coverage-badges": "istanbul-badges-readme", "build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc", "lint": "eslint . --ext .js --max-warnings 0", "lint:fix": "eslint . --ext .js --fix", - "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha \"__tests__/**/*.spec.js\" --exit && npm run make-coverage-badges", + "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha", "test:browser": "karma start karma.conf.cjs" }, "homepage": "https://github.com/TBD54566975/web5-js/tree/main/packages/dids#readme", @@ -86,15 +85,17 @@ }, "devDependencies": { "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", "c8": "7.14.0", "chai": "4.3.7", - "esbuild": "0.16.7", + "chai-as-promised": "7.1.1", + "esbuild": "0.16.17", "eslint": "8.39.0", - "istanbul-badges-readme": "1.8.5", "karma": "6.4.1", "karma-chai": "0.1.0", "karma-chrome-launcher": "3.1.1", @@ -107,9 +108,11 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "overrides": { "socket.io-parser@>4.0.4 <4.2.3": "4.2.3" - } -} + } +} \ No newline at end of file diff --git a/packages/web5-agent/.c8rc.json b/packages/web5-agent/.c8rc.json new file mode 100644 index 000000000..0d483c700 --- /dev/null +++ b/packages/web5-agent/.c8rc.json @@ -0,0 +1,18 @@ +{ + "all": true, + "cache": false, + "extension": [ + ".js" + ], + "include": [ + "__tests__/src/**" + ], + "exclude": [ + "__tests__/src/main.js", + "__tests__/types/**" + ], + "reporter": [ + "cobertura", + "text" + ] +} \ No newline at end of file diff --git a/packages/web5-agent/.mocharc.json b/packages/web5-agent/.mocharc.json index 2e8b2e076..c223f40c7 100644 --- a/packages/web5-agent/.mocharc.json +++ b/packages/web5-agent/.mocharc.json @@ -1,3 +1,5 @@ { - "enable-source-maps": true -} \ No newline at end of file + "enable-source-maps": true, + "exit": true, + "spec": ["__tests__/**/*.spec.js"] + } \ No newline at end of file diff --git a/packages/web5-agent/package.json b/packages/web5-agent/package.json index 91c866c94..5a59bf763 100644 --- a/packages/web5-agent/package.json +++ b/packages/web5-agent/package.json @@ -10,7 +10,7 @@ "build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc", "lint": "eslint . --ext .js --max-warnings 0", "lint:fix": "eslint . --ext .js --fix", - "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && mocha \"__tests__/**/*.spec.js\" --exit", + "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha", "test:browser": "karma start karma.conf.cjs" }, "homepage": "https://github.com/TBD54566975/web5-js/tree/main/packages/web5-agent#readme", @@ -79,13 +79,17 @@ "@tbd54566975/dwn-sdk-js": "0.0.32" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "5.59.0", - "@typescript-eslint/parser": "5.59.0", "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", + "@typescript-eslint/eslint-plugin": "5.59.0", + "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", - "esbuild": "0.16.7", + "chai-as-promised": "7.1.1", + "esbuild": "0.16.17", "eslint": "8.39.0", "karma": "6.4.1", "karma-chai": "0.1.0", @@ -99,6 +103,8 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "overrides": { diff --git a/packages/web5-proxy-agent/.c8rc.json b/packages/web5-proxy-agent/.c8rc.json new file mode 100644 index 000000000..0d483c700 --- /dev/null +++ b/packages/web5-proxy-agent/.c8rc.json @@ -0,0 +1,18 @@ +{ + "all": true, + "cache": false, + "extension": [ + ".js" + ], + "include": [ + "__tests__/src/**" + ], + "exclude": [ + "__tests__/src/main.js", + "__tests__/types/**" + ], + "reporter": [ + "cobertura", + "text" + ] +} \ No newline at end of file diff --git a/packages/web5-proxy-agent/.mocharc.json b/packages/web5-proxy-agent/.mocharc.json index 2e8b2e076..c223f40c7 100644 --- a/packages/web5-proxy-agent/.mocharc.json +++ b/packages/web5-proxy-agent/.mocharc.json @@ -1,3 +1,5 @@ { - "enable-source-maps": true -} \ No newline at end of file + "enable-source-maps": true, + "exit": true, + "spec": ["__tests__/**/*.spec.js"] + } \ No newline at end of file diff --git a/packages/web5-proxy-agent/package.json b/packages/web5-proxy-agent/package.json index 718d39c64..32bfb8aaf 100644 --- a/packages/web5-proxy-agent/package.json +++ b/packages/web5-proxy-agent/package.json @@ -10,7 +10,7 @@ "build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc", "lint": "eslint . --ext .js --max-warnings 0", "lint:fix": "eslint . --ext .js --fix", - "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && mocha \"__tests__/**/*.spec.js\" --exit", + "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha", "test:browser": "karma start karma.conf.cjs" }, "homepage": "https://github.com/TBD54566975/web5-js/tree/main/packages/web5-proxy-agent#readme", @@ -79,14 +79,17 @@ }, "devDependencies": { "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/ed2curve": "0.2.2", "@types/eslint": "8.37.0", "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", "chai-as-promised": "7.1.1", - "esbuild": "0.16.7", + "esbuild": "0.16.17", "eslint": "8.39.0", "karma": "6.4.1", "karma-chai": "0.1.0", @@ -100,6 +103,8 @@ "node-stdlib-browser": "1.2.0", "playwright": "1.31.2", "rimraf": "4.4.0", + "sinon": "15.0.2", + "source-map-loader": "4.0.1", "typescript": "5.0.4" }, "overrides": { diff --git a/packages/web5-user-agent/.c8rc.json b/packages/web5-user-agent/.c8rc.json new file mode 100644 index 000000000..0d483c700 --- /dev/null +++ b/packages/web5-user-agent/.c8rc.json @@ -0,0 +1,18 @@ +{ + "all": true, + "cache": false, + "extension": [ + ".js" + ], + "include": [ + "__tests__/src/**" + ], + "exclude": [ + "__tests__/src/main.js", + "__tests__/types/**" + ], + "reporter": [ + "cobertura", + "text" + ] +} \ No newline at end of file diff --git a/packages/web5-user-agent/.mocharc.json b/packages/web5-user-agent/.mocharc.json index 2e8b2e076..c223f40c7 100644 --- a/packages/web5-user-agent/.mocharc.json +++ b/packages/web5-user-agent/.mocharc.json @@ -1,3 +1,5 @@ { - "enable-source-maps": true -} \ No newline at end of file + "enable-source-maps": true, + "exit": true, + "spec": ["__tests__/**/*.spec.js"] + } \ No newline at end of file diff --git a/packages/web5-user-agent/package.json b/packages/web5-user-agent/package.json index a3f5941ea..a168abd8b 100644 --- a/packages/web5-user-agent/package.json +++ b/packages/web5-user-agent/package.json @@ -10,7 +10,7 @@ "build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc", "lint": "eslint . --ext .js --max-warnings 0", "lint:fix": "eslint . --ext .js --fix", - "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && mocha \"__tests__/**/*.spec.js\" --exit", + "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha", "test:browser": "karma start karma.conf.cjs" }, "homepage": "https://github.com/TBD54566975/web5-js/tree/main/packages/web5-user-agent#readme", @@ -89,9 +89,14 @@ "devDependencies": { "@faker-js/faker": "8.0.1", "@playwright/test": "1.33.0", + "@types/chai": "4.3.0", + "@types/chai-as-promised": "7.1.5", "@types/flat": "5.0.2", + "@types/mocha": "10.0.1", + "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", "@typescript-eslint/parser": "5.59.0", + "c8": "7.14.0", "chai": "4.3.7", "chai-as-promised": "7.1.1", "esbuild": "0.16.17", diff --git a/packages/web5/.c8rc.json b/packages/web5/.c8rc.json new file mode 100644 index 000000000..0d483c700 --- /dev/null +++ b/packages/web5/.c8rc.json @@ -0,0 +1,18 @@ +{ + "all": true, + "cache": false, + "extension": [ + ".js" + ], + "include": [ + "__tests__/src/**" + ], + "exclude": [ + "__tests__/src/main.js", + "__tests__/types/**" + ], + "reporter": [ + "cobertura", + "text" + ] +} \ No newline at end of file diff --git a/packages/web5/.mocharc.json b/packages/web5/.mocharc.json index 2e8b2e076..c223f40c7 100644 --- a/packages/web5/.mocharc.json +++ b/packages/web5/.mocharc.json @@ -1,3 +1,5 @@ { - "enable-source-maps": true -} \ No newline at end of file + "enable-source-maps": true, + "exit": true, + "spec": ["__tests__/**/*.spec.js"] + } \ No newline at end of file diff --git a/packages/web5/README.md b/packages/web5/README.md index 1ec287149..8dad7b6a1 100644 --- a/packages/web5/README.md +++ b/packages/web5/README.md @@ -2,6 +2,7 @@ [![NPM](https://img.shields.io/npm/v/@tbd54566975/web5.svg?style=flat-square&logo=npm&logoColor=FFFFFF&color=FFEC19&santize=true)](https://www.npmjs.com/package/@tbd54566975/web5) [![Build Status](https://img.shields.io/github/actions/workflow/status/TBD54566975/web5-js/tests-ci.yml?branch=main&logo=github&label=ci&logoColor=FFFFFF&style=flat-square)](https://github.com/TBD54566975/web5-js/actions/workflows/tests-ci.yml) +[![Coverage](https://img.shields.io/codecov/c/gh/frankhinek/test-web5-js/main?logo=codecov&logoColor=FFFFFF&style=flat-square&token=YI87CKF1LI)](https://codecov.io/github/TBD54566975/web5-js) [![License](https://img.shields.io/npm/l/@tbd54566975/web5.svg?style=flat-square&color=24f2ff&logo=apache&logoColor=FFFFFF&santize=true)](https://github.com/TBD54566975/web5-js/blob/main/LICENSE) [![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=flat-square&color=9a1aff&logo=discord&logoColor=FFFFFF&sanitize=true)](https://discord.com/channels/937858703112155166/969272658501976117) diff --git a/packages/web5/package.json b/packages/web5/package.json index 461ea7c5e..5dba625c8 100644 --- a/packages/web5/package.json +++ b/packages/web5/package.json @@ -10,8 +10,7 @@ "build": "rimraf dist && node build/bundles.js && echo '{\"type\": \"commonjs\"}' > ./dist/cjs/package.json && tsc", "lint": "eslint . --ext .js --max-warnings 0", "lint:fix": "eslint . --ext .js --fix", - "make-coverage-badges": "istanbul-badges-readme", - "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha \"__tests__/**/*.spec.js\" --exit && npm run make-coverage-badges", + "test:node": "rimraf __tests__ && tsc -p tsconfig.test.json && c8 mocha", "test:browser": "karma start karma.conf.cjs" }, "homepage": "https://github.com/TBD54566975/web5-js/tree/main/packages/web5#readme", @@ -94,6 +93,8 @@ "devDependencies": { "@types/chai": "4.3.0", "@types/chai-as-promised": "7.1.5", + "@types/eslint": "8.37.0", + "@types/mocha": "10.0.1", "@types/ms": "0.7.31", "@types/sinon": "10.0.15", "@typescript-eslint/eslint-plugin": "5.59.0", @@ -103,7 +104,6 @@ "chai-as-promised": "7.1.1", "esbuild": "0.16.17", "eslint": "8.39.0", - "istanbul-badges-readme": "1.8.5", "karma": "6.4.1", "karma-chai": "0.1.0", "karma-chrome-launcher": "3.1.1", @@ -123,4 +123,4 @@ "overrides": { "socket.io-parser@>4.0.4 <4.2.3": "4.2.3" } -} +} \ No newline at end of file