From aa0cb9a2159ba5e517f167d69a47258947958097 Mon Sep 17 00:00:00 2001 From: chaoslee Date: Sat, 23 Nov 2024 17:32:48 +0800 Subject: [PATCH] workspace: [UPGRADE] deps: `@produck/eslint-rules` [FIXED] all tests --- eslint.config.mjs | 5 +- package-lock.json | 217 ++++++++++-------- package.json | 8 +- packages/duck-log/package.json | 1 + packages/duck-log/test/DuckLog.spec.mjs | 1 + packages/duck-log/test/Logger.spec.mjs | 2 + packages/duck-runner/package.json | 1 + packages/duck-runner/test/DuckRunner.spec.mjs | 5 +- packages/duck-runner/test/Runner.spec.mjs | 3 +- .../test/Template/Processes.spec.mjs | 2 + .../duck-runner/test/Template/Solo.spec.mjs | 2 + packages/duck-web/package.json | 1 + packages/duck-web/test/DuckWeb.spec.mjs | 65 +++--- packages/duck-workspace/package.json | 3 +- .../test/DuckWorkspace.spec.mjs | 1 + packages/duck/package.json | 2 +- packages/duck/test/Duck.spec.mjs | 24 -- 17 files changed, 178 insertions(+), 165 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 130e19c..48931a4 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,7 +1,7 @@ import globals from 'globals'; import pluginJs from '@eslint/js'; import tseslint from 'typescript-eslint'; -import ProduckRules from '@produck/eslint-rules'; +import * as ProduckEslint from '@produck/eslint-rules'; /** @type {import('eslint').Linter.Config[]} */ export default [ @@ -9,5 +9,6 @@ export default [ {languageOptions: { globals: {...globals.browser, ...globals.node} }}, pluginJs.configs.recommended, ...tseslint.configs.recommended, - ProduckRules, + ProduckEslint.config, + ProduckEslint.excludeGitIgnore(import.meta.url), ]; diff --git a/package-lock.json b/package-lock.json index fbae9ed..2946a5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,15 +14,15 @@ ], "devDependencies": { "@eslint/js": "^9.15.0", - "@produck/eslint-rules": "^0.1.2", - "@types/mocha": "^10.0.9", - "@types/node": "^22.9.1", + "@produck/eslint-rules": "^0.2.0", + "@types/mocha": "^10.0.10", + "@types/node": "^22.9.3", "c8": "^10.1.2", "eslint": "^9.15.0", "globals": "^15.12.0", "lerna": "^8.1.9", "mocha": "^10.8.2", - "rollup": "^4.27.3", + "rollup": "^4.27.4", "typescript-eslint": "^8.15.0" } }, @@ -125,6 +125,24 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/@eslint/compat": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-1.2.3.tgz", + "integrity": "sha512-wlZhwlDFxkxIZ571aH0FoK4h4Vwx7P3HJx62Gp8hTc10bfpwT2x0nULuAHmQSJBOWPgPeVf+9YtnD4j50zVHmA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": "^9.10.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, "node_modules/@eslint/config-array": { "version": "0.19.0", "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.0.tgz", @@ -1340,12 +1358,12 @@ } }, "node_modules/@produck/compose": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/@produck/compose/-/compose-0.1.8.tgz", - "integrity": "sha512-kEyoch7TgujQMur1z6AqcFPVRav7vock/0jNGw6HqILCSs1k0BF6lIFogJIQYzK1RANxxRRP/903KmLtmrl66A==", + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/@produck/compose/-/compose-0.1.9.tgz", + "integrity": "sha512-HBFtDD3/OQ77k1haqKhVfRn1IFJLRN278IzAclXiyUhQ4tdrdaYJNb/6eKWwYWz6uj77CWeGWH/YVJEHlllQkg==", "license": "MIT", "dependencies": { - "@produck/idiom": "^0.3.1", + "@produck/idiom": "^0.3.2", "@produck/ow": "^0.1.2" } }, @@ -1370,11 +1388,14 @@ "link": true }, "node_modules/@produck/eslint-rules": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@produck/eslint-rules/-/eslint-rules-0.1.2.tgz", - "integrity": "sha512-DhAJN29sUYVscL5e6nz0lK8A8QZ9HtW6z03Z5DNGcaZNwyvJqmPvxF9UQ3GucAAdNmNjLKDsP8KEasSMQWNr3Q==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@produck/eslint-rules/-/eslint-rules-0.2.0.tgz", + "integrity": "sha512-cVCr8XQWSYLQFBCuzG0rqfco/ShcLLA2KJDwwq19U8CWaw1E5Di80QrKZcBaKTf/CBnT8ncOmelnzEzIF/ocCQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@eslint/compat": "^1.2.3" + } }, "node_modules/@produck/idiom": { "version": "0.3.2", @@ -1403,9 +1424,9 @@ "license": "MIT" }, "node_modules/@produck/workspace": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/@produck/workspace/-/workspace-0.2.6.tgz", - "integrity": "sha512-162xfqRlMD4WuP1aRGCo/lIbDahNi6jU1X6iqsjiD9Vwsqphdsj1E0NGQw0+TndixP4zqew7oVuqxMtxbBSP4A==", + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/@produck/workspace/-/workspace-0.2.7.tgz", + "integrity": "sha512-Yv2HBuAcVLw3E8yjy+C4LJ6jAi42PNgdxDDW2hnvGp4qsvtG9re6gyuxc5T3d+tjCa2iCowrGXWNss+7JoE8SQ==", "license": "MIT", "dependencies": { "@produck/idiom": "^0.3.2", @@ -1413,9 +1434,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.3.tgz", - "integrity": "sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz", + "integrity": "sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==", "cpu": [ "arm" ], @@ -1427,9 +1448,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.3.tgz", - "integrity": "sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz", + "integrity": "sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==", "cpu": [ "arm64" ], @@ -1441,9 +1462,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.3.tgz", - "integrity": "sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz", + "integrity": "sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==", "cpu": [ "arm64" ], @@ -1455,9 +1476,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.3.tgz", - "integrity": "sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz", + "integrity": "sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==", "cpu": [ "x64" ], @@ -1469,9 +1490,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.3.tgz", - "integrity": "sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz", + "integrity": "sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==", "cpu": [ "arm64" ], @@ -1483,9 +1504,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.3.tgz", - "integrity": "sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz", + "integrity": "sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==", "cpu": [ "x64" ], @@ -1497,9 +1518,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.3.tgz", - "integrity": "sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz", + "integrity": "sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==", "cpu": [ "arm" ], @@ -1511,9 +1532,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.3.tgz", - "integrity": "sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz", + "integrity": "sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==", "cpu": [ "arm" ], @@ -1525,9 +1546,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.3.tgz", - "integrity": "sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz", + "integrity": "sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==", "cpu": [ "arm64" ], @@ -1539,9 +1560,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.3.tgz", - "integrity": "sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz", + "integrity": "sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==", "cpu": [ "arm64" ], @@ -1553,9 +1574,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.3.tgz", - "integrity": "sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz", + "integrity": "sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==", "cpu": [ "ppc64" ], @@ -1567,9 +1588,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.3.tgz", - "integrity": "sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz", + "integrity": "sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==", "cpu": [ "riscv64" ], @@ -1581,9 +1602,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.3.tgz", - "integrity": "sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz", + "integrity": "sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==", "cpu": [ "s390x" ], @@ -1595,9 +1616,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.3.tgz", - "integrity": "sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz", + "integrity": "sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==", "cpu": [ "x64" ], @@ -1609,9 +1630,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.3.tgz", - "integrity": "sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz", + "integrity": "sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==", "cpu": [ "x64" ], @@ -1623,9 +1644,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.3.tgz", - "integrity": "sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz", + "integrity": "sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==", "cpu": [ "arm64" ], @@ -1637,9 +1658,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.3.tgz", - "integrity": "sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz", + "integrity": "sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==", "cpu": [ "ia32" ], @@ -1651,9 +1672,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.3.tgz", - "integrity": "sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz", + "integrity": "sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==", "cpu": [ "x64" ], @@ -1847,16 +1868,16 @@ "license": "MIT" }, "node_modules/@types/mocha": { - "version": "10.0.9", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.9.tgz", - "integrity": "sha512-sicdRoWtYevwxjOHNMPTl3vSfJM6oyW8o1wXeI7uww6b6xHg8eBznQDNSGBCDJmsE8UMxP05JgZRtsKbTqt//Q==", + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", "dev": true, "license": "MIT" }, "node_modules/@types/node": { - "version": "22.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.1.tgz", - "integrity": "sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==", + "version": "22.9.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.3.tgz", + "integrity": "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==", "dev": true, "license": "MIT", "dependencies": { @@ -8122,9 +8143,9 @@ } }, "node_modules/rollup": { - "version": "4.27.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.3.tgz", - "integrity": "sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==", + "version": "4.27.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz", + "integrity": "sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==", "dev": true, "license": "MIT", "dependencies": { @@ -8138,24 +8159,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.27.3", - "@rollup/rollup-android-arm64": "4.27.3", - "@rollup/rollup-darwin-arm64": "4.27.3", - "@rollup/rollup-darwin-x64": "4.27.3", - "@rollup/rollup-freebsd-arm64": "4.27.3", - "@rollup/rollup-freebsd-x64": "4.27.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.27.3", - "@rollup/rollup-linux-arm-musleabihf": "4.27.3", - "@rollup/rollup-linux-arm64-gnu": "4.27.3", - "@rollup/rollup-linux-arm64-musl": "4.27.3", - "@rollup/rollup-linux-powerpc64le-gnu": "4.27.3", - "@rollup/rollup-linux-riscv64-gnu": "4.27.3", - "@rollup/rollup-linux-s390x-gnu": "4.27.3", - "@rollup/rollup-linux-x64-gnu": "4.27.3", - "@rollup/rollup-linux-x64-musl": "4.27.3", - "@rollup/rollup-win32-arm64-msvc": "4.27.3", - "@rollup/rollup-win32-ia32-msvc": "4.27.3", - "@rollup/rollup-win32-x64-msvc": "4.27.3", + "@rollup/rollup-android-arm-eabi": "4.27.4", + "@rollup/rollup-android-arm64": "4.27.4", + "@rollup/rollup-darwin-arm64": "4.27.4", + "@rollup/rollup-darwin-x64": "4.27.4", + "@rollup/rollup-freebsd-arm64": "4.27.4", + "@rollup/rollup-freebsd-x64": "4.27.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.27.4", + "@rollup/rollup-linux-arm-musleabihf": "4.27.4", + "@rollup/rollup-linux-arm64-gnu": "4.27.4", + "@rollup/rollup-linux-arm64-musl": "4.27.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.27.4", + "@rollup/rollup-linux-riscv64-gnu": "4.27.4", + "@rollup/rollup-linux-s390x-gnu": "4.27.4", + "@rollup/rollup-linux-x64-gnu": "4.27.4", + "@rollup/rollup-linux-x64-musl": "4.27.4", + "@rollup/rollup-win32-arm64-msvc": "4.27.4", + "@rollup/rollup-win32-ia32-msvc": "4.27.4", + "@rollup/rollup-win32-x64-msvc": "4.27.4", "fsevents": "~2.3.2" } }, @@ -9542,7 +9563,7 @@ "version": "1.0.5", "license": "MIT", "dependencies": { - "@produck/compose": "^0.1.8", + "@produck/compose": "^0.1.9", "@produck/idiom": "^0.3.2", "@produck/kit": "^0.1.9", "@produck/mold": "^0.3.1", @@ -9601,7 +9622,7 @@ "@produck/idiom": "^0.3.2", "@produck/mold": "^0.3.1", "@produck/ow": "^0.1.2", - "@produck/workspace": "^0.2.6" + "@produck/workspace": "^0.2.7" } } } diff --git a/package.json b/package.json index b12669d..ae95695 100644 --- a/package.json +++ b/package.json @@ -10,15 +10,15 @@ }, "devDependencies": { "@eslint/js": "^9.15.0", - "@produck/eslint-rules": "^0.1.2", - "@types/mocha": "^10.0.9", - "@types/node": "^22.9.1", + "@produck/eslint-rules": "^0.2.0", + "@types/mocha": "^10.0.10", + "@types/node": "^22.9.3", "c8": "^10.1.2", "eslint": "^9.15.0", "globals": "^15.12.0", "lerna": "^8.1.9", "mocha": "^10.8.2", - "rollup": "^4.27.3", + "rollup": "^4.27.4", "typescript-eslint": "^8.15.0" }, "workspaces": [ diff --git a/packages/duck-log/package.json b/packages/duck-log/package.json index 929dbff..11399f1 100644 --- a/packages/duck-log/package.json +++ b/packages/duck-log/package.json @@ -8,6 +8,7 @@ "main": "src/index.cjs", "type": "module", "exports": { + "types": "./index.d.ts", "import": "./src/index.mjs", "require": "./src/index.cjs" }, diff --git a/packages/duck-log/test/DuckLog.spec.mjs b/packages/duck-log/test/DuckLog.spec.mjs index 080a375..b048f6f 100644 --- a/packages/duck-log/test/DuckLog.spec.mjs +++ b/packages/duck-log/test/DuckLog.spec.mjs @@ -1,4 +1,5 @@ import assert from 'node:assert/strict'; +import { describe, it } from 'mocha'; import * as Duck from '@produck/duck'; import * as DuckLog from '../src/index.mjs'; diff --git a/packages/duck-log/test/Logger.spec.mjs b/packages/duck-log/test/Logger.spec.mjs index 7d238c1..d3c13e0 100644 --- a/packages/duck-log/test/Logger.spec.mjs +++ b/packages/duck-log/test/Logger.spec.mjs @@ -1,4 +1,6 @@ import assert from 'node:assert/strict'; +import { describe, it } from 'mocha'; + import * as Logger from '../src/Logger/index.mjs'; describe('DuckLog::Logger', function () { diff --git a/packages/duck-runner/package.json b/packages/duck-runner/package.json index 73d9dde..7c2f7db 100644 --- a/packages/duck-runner/package.json +++ b/packages/duck-runner/package.json @@ -8,6 +8,7 @@ "main": "src/index.cjs", "type": "module", "exports": { + "types": "./index.d.ts", "import": "./src/index.mjs", "require": "./src/index.cjs" }, diff --git a/packages/duck-runner/test/DuckRunner.spec.mjs b/packages/duck-runner/test/DuckRunner.spec.mjs index 87fa00b..4b8c951 100644 --- a/packages/duck-runner/test/DuckRunner.spec.mjs +++ b/packages/duck-runner/test/DuckRunner.spec.mjs @@ -1,6 +1,7 @@ import assert from 'node:assert/strict'; -import * as Duck from '@produck/duck'; +import { describe, it } from 'mocha'; +import * as Duck from '@produck/duck'; import * as DuckRunner from '../src/index.mjs'; describe('DuckRunner', function () { @@ -96,7 +97,7 @@ describe('DuckRunner', function () { })(); }, { name: 'Error', - message: 'Assembler is NOT ready.', + message: 'Installation not completed.', }); }); }); diff --git a/packages/duck-runner/test/Runner.spec.mjs b/packages/duck-runner/test/Runner.spec.mjs index fe534f2..5539747 100644 --- a/packages/duck-runner/test/Runner.spec.mjs +++ b/packages/duck-runner/test/Runner.spec.mjs @@ -1,6 +1,7 @@ import assert from 'node:assert/strict'; -import * as Duck from '@produck/duck'; +import { describe, it } from 'mocha'; +import * as Duck from '@produck/duck'; import * as Runner from '../src/Runner/index.mjs'; const ProductKit = Duck.define({ id: 'foo' })(); diff --git a/packages/duck-runner/test/Template/Processes.spec.mjs b/packages/duck-runner/test/Template/Processes.spec.mjs index c81bc8e..d14ef26 100644 --- a/packages/duck-runner/test/Template/Processes.spec.mjs +++ b/packages/duck-runner/test/Template/Processes.spec.mjs @@ -1,5 +1,7 @@ import assert from 'node:assert/strict'; import cluster from 'node:cluster'; +import { describe, it, after } from 'mocha'; + import * as Duck from '@produck/duck'; import * as DuckRunner from '../../src/index.mjs'; diff --git a/packages/duck-runner/test/Template/Solo.spec.mjs b/packages/duck-runner/test/Template/Solo.spec.mjs index 7f96fa8..70f6105 100644 --- a/packages/duck-runner/test/Template/Solo.spec.mjs +++ b/packages/duck-runner/test/Template/Solo.spec.mjs @@ -1,4 +1,6 @@ import assert from 'node:assert/strict'; +import { describe, it } from 'mocha'; + import * as Duck from '@produck/duck'; import * as DuckRunner from '../../src/index.mjs'; diff --git a/packages/duck-web/package.json b/packages/duck-web/package.json index 96e7259..b48d622 100644 --- a/packages/duck-web/package.json +++ b/packages/duck-web/package.json @@ -8,6 +8,7 @@ "main": "src/index.cjs", "type": "module", "exports": { + "types": "./index.d.ts", "import": "./src/index.mjs", "require": "./src/index.cjs" }, diff --git a/packages/duck-web/test/DuckWeb.spec.mjs b/packages/duck-web/test/DuckWeb.spec.mjs index 903e624..a87cfa7 100644 --- a/packages/duck-web/test/DuckWeb.spec.mjs +++ b/packages/duck-web/test/DuckWeb.spec.mjs @@ -1,6 +1,7 @@ import assert from 'node:assert/strict'; import http from 'node:http'; -import supertest from 'supertest'; +import { describe, it } from 'mocha'; + import * as Duck from '@produck/duck'; import * as DuckWeb from '../src/index.mjs'; @@ -81,8 +82,8 @@ describe('DuckWeb', function () { }); })(); }, { - name: 'Error', - message: 'The `.provider` MUST return a function as `Application`.', + name: 'TypeError', + message: 'Invalid ".provider()=>", one "function" expected.', }); }); }); @@ -148,8 +149,8 @@ describe('DuckWeb', function () { Kit.Web.Application('Foo'); }, { - name: 'Error', - message: 'Bad Application(Foo), one "(req, res) => any" expected.', + name: 'TypeError', + message: 'Invalid "Application(Foo)=>", one "(req, res) => any" expected.', }); }); @@ -166,28 +167,27 @@ describe('DuckWeb', function () { const listener = Kit.Web.App('Default'); const server = http.createServer(listener).listen(8080, '127.0.0.2'); - const client = supertest('http://127.0.0.2:8080'); - - await client - .get('/') - .expect('Content-Type', 'application/json') - .expect(200) - .expect(res => { - assert.deepEqual(res.body, { - meta: { - id: 'foo', - name: 'Default Product Name', - version: '0.0.0', - description: 'No descrition', - }, - components: [{ - id: 'org.produck.duck.web', - name: 'DuckWeb', - version: res.body.components[0].version, - description: 'For creating and managing multiple application providers.', - }], - }); - }); + const response = await fetch('http://127.0.0.2:8080/'); + + assert.equal(response.headers.get('Content-Type'), 'application/json'); + assert.equal(response.status, 200); + + const json = await response.json(); + + assert.deepEqual(json, { + meta: { + id: 'foo', + name: 'Default Product Name', + version: '0.0.0', + description: 'No descrition', + }, + components: [{ + id: 'org.produck.duck.web', + name: 'DuckWeb', + version: json.components[0].version, + description: 'For creating and managing multiple application providers.', + }], + }); server.close(); }); @@ -207,12 +207,13 @@ describe('DuckWeb', function () { const listener = Kit.Web.App('Redirect'); const server = http.createServer(listener).listen(8080, '127.0.0.2'); - const client = supertest('http://127.0.0.2:8080'); - await client - .get('/') - .expect(302) - .expect('Location', 'https://127.0.0.2:8080/'); + const response = await fetch('http://127.0.0.2:8080/', { + redirect: 'manual', + }); + + assert.equal(response.status, 302); + assert.equal(response.headers.get('Location'), 'https://127.0.0.2:8080/'); server.close(); }); diff --git a/packages/duck-workspace/package.json b/packages/duck-workspace/package.json index 7405d25..f4e1ba0 100644 --- a/packages/duck-workspace/package.json +++ b/packages/duck-workspace/package.json @@ -8,6 +8,7 @@ "main": "src/index.cjs", "type": "module", "exports": { + "types": "./index.d.ts", "import": "./src/index.mjs", "require": "./src/index.cjs" }, @@ -38,6 +39,6 @@ "@produck/idiom": "^0.3.2", "@produck/mold": "^0.3.1", "@produck/ow": "^0.1.2", - "@produck/workspace": "^0.2.6" + "@produck/workspace": "^0.2.7" } } diff --git a/packages/duck-workspace/test/DuckWorkspace.spec.mjs b/packages/duck-workspace/test/DuckWorkspace.spec.mjs index 1d7d2fe..13fa3da 100644 --- a/packages/duck-workspace/test/DuckWorkspace.spec.mjs +++ b/packages/duck-workspace/test/DuckWorkspace.spec.mjs @@ -1,5 +1,6 @@ import * as assert from 'node:assert/strict'; import path from 'node:path'; +import { describe, it } from 'mocha'; import * as Duck from '@produck/duck'; import * as DuckWorkspace from '../src/index.mjs'; diff --git a/packages/duck/package.json b/packages/duck/package.json index f449240..7e0097a 100644 --- a/packages/duck/package.json +++ b/packages/duck/package.json @@ -41,7 +41,7 @@ "url": "https://github.com/produck/duck/issues" }, "dependencies": { - "@produck/compose": "^0.1.8", + "@produck/compose": "^0.1.9", "@produck/idiom": "^0.3.2", "@produck/kit": "^0.1.9", "@produck/mold": "^0.3.1", diff --git a/packages/duck/test/Duck.spec.mjs b/packages/duck/test/Duck.spec.mjs index dabf36b..2833f77 100644 --- a/packages/duck/test/Duck.spec.mjs +++ b/packages/duck/test/Duck.spec.mjs @@ -167,29 +167,5 @@ describe('Duck', function () { }); }); }); - - describe('Kit::ReadyTo()', function () { - it('should throw if bad fn.', function () { - assert.throws(() => { - Duck.define({ id: 'org.example.test' }, Kit => { - Kit.ReadyTo(); - })(); - }, { - name: 'TypeError', - message: 'Invalid "fn", one "function" expected.', - }); - }); - - it('should throw if bad message.', function () { - assert.throws(() => { - Duck.define({ id: 'org.example.test' }, Kit => { - Kit.ReadyTo(() => {}, 1); - })(); - }, { - name: 'TypeError', - message: 'Invalid "message", one "string" expected.', - }); - }); - }); }); });