diff --git a/eslint.config.js b/eslint.config.js index 50f55dc3d..9c6bfa9d4 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -242,6 +242,8 @@ export default [ "no-console": "off", "vitest/no-focused-tests": "error", // Equivalent to mocha/no-exclusive-tests "vitest/no-disabled-tests": "warn", // Equivalent to mocha/no-skipped-tests + // WebSocket constructor mocks use `this` to refer to the new instance — no alternative API + "unicorn/no-this-outside-of-class": "off", }, }, { @@ -270,6 +272,8 @@ export default [ eslintConfigPrettier, { // All test and test-helper files: disable no-unsafe-* rules (tests legitimately use `any` for mocking) + // Also disable no-this-outside-of-class: Mocha root hooks use `this.currentTest` as the framework + // context mechanism — there is no alternative API for accessing the current test in hook functions. files: ["test/**/*.ts"], rules: { "@typescript-eslint/no-unsafe-assignment": "off", @@ -280,6 +284,15 @@ export default [ "@typescript-eslint/no-base-to-string": "off", "@typescript-eslint/require-await": "off", "@typescript-eslint/unbound-method": "off", + "unicorn/no-this-outside-of-class": "off", + }, + }, + { + // oclif hook files: oclif calls hook functions with `this` set to the Hook.Context object, + // so `this.warn()`, `this.error()`, `this.log()` are the correct oclif-idiomatic API here. + files: ["src/hooks/**/*.ts"], + rules: { + "unicorn/no-this-outside-of-class": "off", }, }, { diff --git a/package.json b/package.json index 83d7c4756..82456323b 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "./dist/src/hooks/init/version-flag", "./dist/src/hooks/init/patch-arg-names" ], - "command_not_found": "./dist/src/hooks/command_not_found/did-you-mean" + "command_not_found": "./dist/src/hooks/command-not-found/did-you-mean" }, "hidden": [ "aliases" @@ -160,10 +160,10 @@ "dotenv": "^17.4.2", "eslint": "^10.3.0", "eslint-config-prettier": "^10.1.8", - "eslint-plugin-n": "^17.24.0", + "eslint-plugin-n": "^18.0.1", "eslint-plugin-prettier": "^5.5.5", "eslint-plugin-react-hooks": "^7.1.1", - "eslint-plugin-unicorn": "^64.0.0", + "eslint-plugin-unicorn": "^65.0.0", "execa": "^9.6.1", "fs-extra": "^11.3.5", "get-port": "^7.2.0", diff --git a/packages/react-web-cli/src/AblyCliTerminal.tsx b/packages/react-web-cli/src/AblyCliTerminal.tsx index 5b1c379f4..516dbd89c 100644 --- a/packages/react-web-cli/src/AblyCliTerminal.tsx +++ b/packages/react-web-cli/src/AblyCliTerminal.tsx @@ -1742,10 +1742,11 @@ const AblyCliTerminalInner = ( updateSessionActive(false); // Check if this was a user-initiated close - const userClosedTerminal = - event.reason === "user-closed-primary" || - event.reason === "user-closed-secondary" || - event.reason === "manual-reconnect"; + const userClosedTerminal = [ + "user-closed-primary", + "user-closed-secondary", + "manual-reconnect", + ].includes(event.reason); if (userClosedTerminal) { debugLog( diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b521c18ed..52d69c88b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -176,8 +176,8 @@ importers: specifier: ^10.1.8 version: 10.1.8(eslint@10.3.0(jiti@2.6.1)) eslint-plugin-n: - specifier: ^17.24.0 - version: 17.24.0(eslint@10.3.0(jiti@2.6.1))(typescript@5.9.3) + specifier: ^18.0.1 + version: 18.0.1(eslint@10.3.0(jiti@2.6.1))(ts-declaration-location@1.0.7(typescript@5.9.3))(typescript@5.9.3) eslint-plugin-prettier: specifier: ^5.5.5 version: 5.5.5(eslint-config-prettier@10.1.8(eslint@10.3.0(jiti@2.6.1)))(eslint@10.3.0(jiti@2.6.1))(prettier@3.8.3) @@ -185,8 +185,8 @@ importers: specifier: ^7.1.1 version: 7.1.1(eslint@10.3.0(jiti@2.6.1)) eslint-plugin-unicorn: - specifier: ^64.0.0 - version: 64.0.0(eslint@10.3.0(jiti@2.6.1)) + specifier: ^65.0.0 + version: 65.0.0(eslint@10.3.0(jiti@2.6.1)) execa: specifier: ^9.6.1 version: 9.6.1 @@ -353,7 +353,7 @@ importers: version: 4.1.6(vitest@4.1.6) eslint-plugin-react: specifier: ^7.37.5 - version: 7.37.5(eslint@10.3.0(jiti@2.6.1)) + version: 7.37.5(eslint@10.5.0(jiti@2.6.1)) lucide-react: specifier: ^1.14.0 version: 1.14.0(react@19.2.6) @@ -583,6 +583,10 @@ packages: resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} engines: {node: '>=6.9.0'} + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + '@babel/compat-data@7.29.3': resolution: {integrity: sha512-LIVqM46zQWZhj17qA8wb4nW/ixr2y1Nw+r1etiAWgRM6U1IqP+LNhL1yg440jYZR72jCWcWbLWzIosH+uP1fqg==} engines: {node: '>=6.9.0'} @@ -617,8 +621,8 @@ packages: resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.28.5': - resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} '@babel/helper-validator-option@7.27.1': @@ -638,6 +642,10 @@ packages: resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} engines: {node: '>=6.9.0'} + '@babel/runtime@7.29.7': + resolution: {integrity: sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==} + engines: {node: '>=6.9.0'} + '@babel/template@7.28.6': resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==} engines: {node: '>=6.9.0'} @@ -1061,6 +1069,10 @@ packages: resolution: {integrity: sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@eslint/config-helpers@0.6.0': + resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@eslint/core@1.2.1': resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} @@ -1082,6 +1094,10 @@ packages: resolution: {integrity: sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@eslint/plugin-kit@0.7.2': + resolution: {integrity: sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@gar/promise-retry@1.0.3': resolution: {integrity: sha512-GmzA9ckNokPypTg10pgpeHNQe7ph+iIKKmhKu3Ob9ANkswreCx7R3cKmY781K8QK3AqVL3xVh9A42JvIAbkkSA==} engines: {node: ^20.17.0 || >=22.9.0} @@ -1613,84 +1629,72 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-arm64-gnu@1.0.0-rc.18': resolution: {integrity: sha512-SOrT/cT4ukTmgnrEz/Hg3m7LBnuCLW9psDeMKrimRWY4I8DmnO7Lco8W2vtqPmMkbVu8iJ+g4GFLVLLOVjJ9DQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.0.0-rc.17': resolution: {integrity: sha512-b/CgbwAJpmrRLp02RPfhbudf5tZnN9nsPWK82znefso832etkem8H7FSZwxrOI9djcdTP7U6YfNhbRnh7djErg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [musl] '@rolldown/binding-linux-arm64-musl@1.0.0-rc.18': resolution: {integrity: sha512-QWjdxN1HJCpBTAcZ5N5F7wju3gVPzRzSpmGzx7na0c/1qpN9CFil+xt+l9lV/1M6/gqHSNXCiqPfwhVJPeLnug==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] - libc: [musl] '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.17': resolution: {integrity: sha512-4EII1iNGRUN5WwGbF/kOh/EIkoDN9HsupgLQoXfY+D1oyJm7/F4t5PYU5n8SWZgG0FEwakyM8pGgwcBYruGTlA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.18': resolution: {integrity: sha512-ugCOyj7a4d9h3q9B+wXmf6g3a68UsjGh6dob5DHevHGMwDUbhsYNbSPxJsENcIttJZ9jv7qGM2UesLw5jqIhdg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.17': resolution: {integrity: sha512-AH8oq3XqQo4IibpVXvPeLDI5pzkpYn0WiZAfT05kFzoJ6tQNzwRdDYQ45M8I/gslbodRZwW8uxLhbSBbkv96rA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] - libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.18': resolution: {integrity: sha512-kKWRhbsotpXkGbcd5dllUWg5gEXcDAa8u5YnP9AV5DYNbvJHGzzuwv7dpmhc8NqKMJldl0a+x76IHbspEpEmdA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.0.0-rc.17': resolution: {integrity: sha512-cLnjV3xfo7KslbU41Z7z8BH/E1y5mzUYzAqih1d1MDaIGZRCMqTijqLv76/P7fyHuvUcfGsIpqCdddbxLLK9rA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.0.0-rc.18': resolution: {integrity: sha512-uCo8ElcCIAMyYAZyuIZ81oFkhTSIllNvUCHCAlbhlN4ji3uC28h7IIdlXyIvGO7HsuqnV9p3rD/bpH7XhIyhRw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [glibc] '@rolldown/binding-linux-x64-musl@1.0.0-rc.17': resolution: {integrity: sha512-0phclDw1spsL7dUB37sIARuis2tAgomCJXAHZlpt8PXZ4Ba0dRP1e+66lsRqrfhISeN9bEGNjQs+T/Fbd7oYGw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [musl] '@rolldown/binding-linux-x64-musl@1.0.0-rc.18': resolution: {integrity: sha512-XNOQZtuE6yUIvx4rwGemwh8kpL1xvU41FXy/s9K7T/3JVcqGzo3NfKM2HrbrGgfPYGFW42f07Wk++aOC6B9NWA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] - libc: [musl] '@rolldown/binding-openharmony-arm64@1.0.0-rc.17': resolution: {integrity: sha512-0ag/hEgXOwgw4t8QyQvUCxvEg+V0KBcA6YuOx9g0r02MprutRF5dyljgm3EmR02O292UX7UeS6HzWHAl6KgyhA==} @@ -1795,85 +1799,71 @@ packages: resolution: {integrity: sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.59.0': resolution: {integrity: sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.59.0': resolution: {integrity: sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.59.0': resolution: {integrity: sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.59.0': resolution: {integrity: sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.59.0': resolution: {integrity: sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==} cpu: [loong64] os: [linux] - libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.59.0': resolution: {integrity: sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.59.0': resolution: {integrity: sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==} cpu: [ppc64] os: [linux] - libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.59.0': resolution: {integrity: sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.59.0': resolution: {integrity: sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.59.0': resolution: {integrity: sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.40.2': resolution: {integrity: sha512-lG7Xa+BmBNwpjmVUbmyKxdQJ3Q6whHjMjzQplOs5Z+Gj7mxPtWakGHqzMqNER68G67kmCX9qX57aRsW5V0VOng==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.59.0': resolution: {integrity: sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.59.0': resolution: {integrity: sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-openbsd-x64@4.59.0': resolution: {integrity: sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==} @@ -2209,28 +2199,24 @@ packages: engines: {node: '>= 20'} cpu: [arm64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-arm64-musl@4.2.4': resolution: {integrity: sha512-bBADEGAbo4ASnppIziaQJelekCxdMaxisrk+fB7Thit72IBnALp9K6ffA2G4ruj90G9XRS2VQ6q2bCKbfFV82g==} engines: {node: '>= 20'} cpu: [arm64] os: [linux] - libc: [musl] '@tailwindcss/oxide-linux-x64-gnu@4.2.4': resolution: {integrity: sha512-7Mx25E4WTfnht0TVRTyC00j3i0M+EeFe7wguMDTlX4mRxafznw0CA8WJkFjWYH5BlgELd1kSjuU2JiPnNZbJDA==} engines: {node: '>= 20'} cpu: [x64] os: [linux] - libc: [glibc] '@tailwindcss/oxide-linux-x64-musl@4.2.4': resolution: {integrity: sha512-2wwJRF7nyhOR0hhHoChc04xngV3iS+akccHTGtz965FwF0up4b2lOdo6kI1EbDaEXKgvcrFBYcYQQ/rrnWFVfA==} engines: {node: '>= 20'} cpu: [x64] os: [linux] - libc: [musl] '@tailwindcss/oxide-wasm32-wasi@4.2.4': resolution: {integrity: sha512-FQsqApeor8Fo6gUEklzmaa9994orJZZDBAlQpK2Mq+DslRKFJeD6AjHpBQ0kZFQohVr8o85PPh8eOy86VlSCmw==} @@ -2846,8 +2832,8 @@ packages: buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - builtin-modules@5.0.0: - resolution: {integrity: sha512-bkXY9WsVpY7CvMhKSR6pZilZu9Ln5WDrKVBUXf2S443etkmEO4V58heTecXcUIsNsi4Rx8JUO4NfX1IcQl4deg==} + builtin-modules@5.2.0: + resolution: {integrity: sha512-02yxLeyxF4dNl6SlY6/5HfRSrSdZ/sCPoxy2kZNP5dZZX8LSAD9aE2gtJIUgWrsQTiMPl3mxESyrobSwvRGisQ==} engines: {node: '>=18.20'} bundle-name@4.1.0: @@ -2961,10 +2947,6 @@ packages: cjs-module-lexer@1.2.3: resolution: {integrity: sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==} - clean-regexp@1.0.0: - resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} - engines: {node: '>=4'} - clean-stack@3.0.1: resolution: {integrity: sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==} engines: {node: '>=10'} @@ -3184,8 +3166,8 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} - detect-indent@7.0.1: - resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} + detect-indent@7.0.2: + resolution: {integrity: sha512-y+8xyqdGLL+6sh0tVeHcfP/QDd8gUgbasolJJpY7NgeQGSZ739bDtSiaiDgtoicy+mtYB81dKLxO9xRhCyIB3A==} engines: {node: '>=12.20'} detect-libc@2.1.2: @@ -3249,12 +3231,8 @@ packages: end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} - enhanced-resolve@5.18.1: - resolution: {integrity: sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==} - engines: {node: '>=10.13.0'} - - enhanced-resolve@5.20.1: - resolution: {integrity: sha512-Qohcme7V1inbAfvjItgw0EaxVX5q2rdVEZHRBrEQdRZTssLDGsL8Lwrznl8oQ/6kuTJONLaDcGjkNP247XEhcA==} + enhanced-resolve@5.24.0: + resolution: {integrity: sha512-SkE2t82KlkkxQRVMVLAGKxLfORGQfrkx5dkj+vlgXRVNEdPc4eZcR+J/Fvj8C+yKSFH5L0q3NFlyufOVQnCcYQ==} engines: {node: '>=10.13.0'} entities@6.0.1: @@ -3319,10 +3297,6 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -3345,11 +3319,18 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.24.0: - resolution: {integrity: sha512-/gC7/KAYmfNnPNOb3eu8vw+TdVnV0zhdQwexsw6FLXbhzroVj20vRn2qL8lDWDGnAQ2J8DhdfvXxX9EoxvERvw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-plugin-n@18.0.1: + resolution: {integrity: sha512-q3ARhk+eZRc7myR0KHx+R3/GJeOHF+Ir6PK95Pu2tEX8Sl/4BIpmmVLva2kPrjC2gCmn6WHlHm+3yeo6Rxhycw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} peerDependencies: - eslint: '>=8.23.0' + eslint: '>=8.57.1' + ts-declaration-location: ^1.0.6 + typescript: '>=5.0.0' + peerDependenciesMeta: + ts-declaration-location: + optional: true + typescript: + optional: true eslint-plugin-prettier@5.5.5: resolution: {integrity: sha512-hscXkbqUZ2sPithAuLm5MXL+Wph+U7wHngPBv9OMWwlP8iaflyxpjTYZkmdgB4/vPIhemRlBEoLrH7UC1n7aUw==} @@ -3382,8 +3363,8 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - eslint-plugin-unicorn@64.0.0: - resolution: {integrity: sha512-rNZwalHh8i0UfPlhNwg5BTUO1CMdKNmjqe+TgzOTZnpKoi8VBgsW7u9qCHIdpxEzZ1uwrJrPF0uRb7l//K38gA==} + eslint-plugin-unicorn@65.0.0: + resolution: {integrity: sha512-wE75x2QqMuPgZXcoc8LgTz7+gk5+SZK93Cxe6jkfouKp6+FwYwjMGrbYQTMRH8HK8X6jeTBhPPI2Cun923EMLQ==} engines: {node: ^20.10.0 || >=21.0.0} peerDependencies: eslint: '>=9.38.0' @@ -3410,6 +3391,16 @@ packages: jiti: optional: true + eslint@10.5.0: + resolution: {integrity: sha512-1y+7C+vi12bUK1IpZeaV3gsH9fHLBmPvYmPx42pvT/E9yG0IC8g3PUZZgp0+JLJl7ZDK0flc2gc+Aw9dpCvIsQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + espree@11.2.0: resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} engines: {node: ^20.19.0 || ^22.13.0 || >=24} @@ -3678,9 +3669,6 @@ packages: resolution: {integrity: sha512-w9UMqWwJxHNOvoNzSJ2oPF5wvYcvP7jUvYzhp67yEhTi17ZDBBC1z9pTdGuzjD+EFIqLSYRweZjqfiPzQ06Ebg==} engines: {node: '>= 0.4'} - get-tsconfig@4.13.7: - resolution: {integrity: sha512-7tN6rFgBlMgpBML5j8typ92BKFi2sFQvIdpAqLA2beia5avZDrMs0FLZiM5etShWq5irVyGcGMEA1jcDaK7A/Q==} - get-tsconfig@4.14.0: resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} @@ -4218,28 +4206,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} @@ -4602,8 +4586,8 @@ packages: resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} engines: {node: '>=18'} - nwsapi@2.2.23: - resolution: {integrity: sha512-7wfH4sLbt4M0gCDzGE6vzQBo0bfTKjU7Sfpqy/7gs1qBfYz2vEJH6vXcBKpO3+6Yu1telwd0t9HpyOoLEQQbIQ==} + nwsapi@2.2.24: + resolution: {integrity: sha512-7YRhZ3jS45LwmSCT4b2sVFHt/WuovaktDU07QrtOBY2PXskss5a9jfmR9jptyumwXST+rFjrmppMY1KT/yn35A==} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -4955,10 +4939,6 @@ packages: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} - regexp-tree@0.1.27: - resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} - hasBin: true - regexp.prototype.flags@1.5.4: resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} @@ -4974,8 +4954,8 @@ packages: resolution: {integrity: sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA==} engines: {node: '>=0.10.0'} - regjsparser@0.13.1: - resolution: {integrity: sha512-dLsljMd9sqwRkby8zhO1gSg3PnJIBFid8f4CQj/sXx+7cKx+E7u0PKhZ+U4wmhx7EfmtvnA318oVaIkAB1lRJw==} + regjsparser@0.13.2: + resolution: {integrity: sha512-NgRBy2Nx/bE+9F27nVHnqcN5HjyLmecqsqx2PJHu3/IEtADD4WuxuXIVExD5PoSDFVrl78dOonfcOe5O+5nbzQ==} hasBin: true require-from-string@2.0.2: @@ -5113,6 +5093,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.8.4: + resolution: {integrity: sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==} + engines: {node: '>=10'} + hasBin: true + sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} @@ -5366,8 +5351,8 @@ packages: tailwindcss@4.2.4: resolution: {integrity: sha512-HhKppgO81FQof5m6TEnuBWCZGgfRAWbaeOaGT00KOy/Pf/j6oUihdvBpA7ltCeAvZpFhW3j0PTclkxsd4IXYDA==} - tapable@2.3.2: - resolution: {integrity: sha512-1MOpMXuhGzGL5TTCZFItxCc0AARf1EZFQkGqMm7ERKj8+Hgr5oLvJOVFcC+lRmR8hCe2S3jC4T5D7Vg/d7/fhA==} + tapable@2.3.3: + resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==} engines: {node: '>=6'} tar@7.5.11: @@ -5484,6 +5469,7 @@ packages: tsconfck@3.1.6: resolution: {integrity: sha512-ks6Vjr/jEw0P1gmOVwutM3B7fWxoWBL2KRDb1JfqGVawBmO5UsvmWOQFGHBPl5yxYz4eERr19E6L7NMv+Fej4w==} engines: {node: ^18 || >=20} + deprecated: unmaintained hasBin: true peerDependencies: typescript: ^5.0.0 @@ -5927,6 +5913,18 @@ packages: utf-8-validate: optional: true + ws@8.21.0: + resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} + 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 + wsl-utils@0.3.1: resolution: {integrity: sha512-g/eziiSUNBSsdDJtCLB8bdYEUMj4jR7AGeUo96p/3dTafgjHhpF4RiCFPiRILwjQoDXx5MqkBr4fwWtR3Ky4Wg==} engines: {node: '>=20'} @@ -6514,7 +6512,13 @@ snapshots: '@babel/code-frame@7.29.0': dependencies: - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/code-frame@7.29.7': + dependencies: + '@babel/helper-validator-identifier': 7.29.7 js-tokens: 4.0.0 picocolors: 1.1.1 @@ -6569,14 +6573,14 @@ snapshots: dependencies: '@babel/core': 7.29.0 '@babel/helper-module-imports': 7.28.6 - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.29.7 '@babel/traverse': 7.29.0 transitivePeerDependencies: - supports-color '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-validator-identifier@7.28.5': {} + '@babel/helper-validator-identifier@7.29.7': {} '@babel/helper-validator-option@7.27.1': {} @@ -6591,6 +6595,8 @@ snapshots: '@babel/runtime@7.29.2': {} + '@babel/runtime@7.29.7': {} + '@babel/template@7.28.6': dependencies: '@babel/code-frame': 7.29.0 @@ -6612,7 +6618,7 @@ snapshots: '@babel/types@7.29.0': dependencies: '@babel/helper-string-parser': 7.27.1 - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.29.7 '@bcoe/v8-coverage@1.0.2': {} @@ -6839,6 +6845,11 @@ snapshots: eslint: 10.3.0(jiti@2.6.1) eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.9.1(eslint@10.5.0(jiti@2.6.1))': + dependencies: + eslint: 10.5.0(jiti@2.6.1) + eslint-visitor-keys: 3.4.3 + '@eslint-community/regexpp@4.12.2': {} '@eslint/compat@2.1.0(eslint@10.3.0(jiti@2.6.1))': @@ -6859,6 +6870,10 @@ snapshots: dependencies: '@eslint/core': 1.2.1 + '@eslint/config-helpers@0.6.0': + dependencies: + '@eslint/core': 1.2.1 + '@eslint/core@1.2.1': dependencies: '@types/json-schema': 7.0.15 @@ -6874,6 +6889,11 @@ snapshots: '@eslint/core': 1.2.1 levn: 0.4.1 + '@eslint/plugin-kit@0.7.2': + dependencies: + '@eslint/core': 1.2.1 + levn: 0.4.1 + '@gar/promise-retry@1.0.3': {} '@humanfs/core@0.19.2': @@ -7231,7 +7251,7 @@ snapshots: https-proxy-agent: 7.0.6 node-fetch: 2.6.9 nopt: 8.1.0 - semver: 7.8.0 + semver: 7.8.4 tar: 7.5.11 transitivePeerDependencies: - encoding @@ -7277,7 +7297,7 @@ snapshots: '@npmcli/fs@5.0.0': dependencies: - semver: 7.8.0 + semver: 7.8.4 '@npmcli/redact@4.0.0': {} @@ -7983,7 +8003,7 @@ snapshots: '@tailwindcss/node@4.2.4': dependencies: '@jridgewell/remapping': 2.3.5 - enhanced-resolve: 5.20.1 + enhanced-resolve: 5.24.0 jiti: 2.6.1 lightningcss: 1.32.0 magic-string: 0.30.21 @@ -8058,8 +8078,8 @@ snapshots: '@testing-library/dom@10.4.0': dependencies: - '@babel/code-frame': 7.29.0 - '@babel/runtime': 7.29.2 + '@babel/code-frame': 7.29.7 + '@babel/runtime': 7.29.7 '@types/aria-query': 5.0.4 aria-query: 5.3.0 chalk: 4.1.2 @@ -8277,7 +8297,7 @@ snapshots: '@typescript-eslint/visitor-keys': 8.59.2 debug: 4.4.3(supports-color@8.1.1) minimatch: 10.2.3 - semver: 7.8.0 + semver: 7.8.4 tinyglobby: 0.2.16 ts-api-utils: 2.5.0(typescript@5.9.3) typescript: 5.9.3 @@ -8783,7 +8803,7 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - builtin-modules@5.0.0: {} + builtin-modules@5.2.0: {} bundle-name@4.1.0: dependencies: @@ -8913,10 +8933,6 @@ snapshots: cjs-module-lexer@1.2.3: {} - clean-regexp@1.0.0: - dependencies: - escape-string-regexp: 1.0.5 - clean-stack@3.0.1: dependencies: escape-string-regexp: 4.0.0 @@ -9122,7 +9138,7 @@ snapshots: dequal@2.0.3: {} - detect-indent@7.0.1: {} + detect-indent@7.0.2: {} detect-libc@2.1.2: {} @@ -9183,15 +9199,10 @@ snapshots: dependencies: once: 1.4.0 - enhanced-resolve@5.18.1: - dependencies: - graceful-fs: 4.2.11 - tapable: 2.3.2 - - enhanced-resolve@5.20.1: + enhanced-resolve@5.24.0: dependencies: graceful-fs: 4.2.11 - tapable: 2.3.2 + tapable: 2.3.3 entities@6.0.1: optional: true @@ -9364,14 +9375,12 @@ snapshots: escalade@3.2.0: {} - escape-string-regexp@1.0.5: {} - escape-string-regexp@4.0.0: {} eslint-compat-utils@0.5.1(eslint@10.3.0(jiti@2.6.1)): dependencies: eslint: 10.3.0(jiti@2.6.1) - semver: 7.7.4 + semver: 7.8.4 eslint-config-prettier@10.1.8(eslint@10.3.0(jiti@2.6.1)): dependencies: @@ -9384,20 +9393,20 @@ snapshots: eslint: 10.3.0(jiti@2.6.1) eslint-compat-utils: 0.5.1(eslint@10.3.0(jiti@2.6.1)) - eslint-plugin-n@17.24.0(eslint@10.3.0(jiti@2.6.1))(typescript@5.9.3): + eslint-plugin-n@18.0.1(eslint@10.3.0(jiti@2.6.1))(ts-declaration-location@1.0.7(typescript@5.9.3))(typescript@5.9.3): dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@10.3.0(jiti@2.6.1)) - enhanced-resolve: 5.18.1 + enhanced-resolve: 5.24.0 eslint: 10.3.0(jiti@2.6.1) eslint-plugin-es-x: 7.8.0(eslint@10.3.0(jiti@2.6.1)) - get-tsconfig: 4.13.7 + get-tsconfig: 4.14.0 globals: 15.15.0 globrex: 0.1.2 ignore: 5.3.2 - semver: 7.7.4 + semver: 7.8.4 + optionalDependencies: ts-declaration-location: 1.0.7(typescript@5.9.3) - transitivePeerDependencies: - - typescript + typescript: 5.9.3 eslint-plugin-prettier@5.5.5(eslint-config-prettier@10.1.8(eslint@10.3.0(jiti@2.6.1)))(eslint@10.3.0(jiti@2.6.1))(prettier@3.8.3): dependencies: @@ -9423,7 +9432,7 @@ snapshots: dependencies: eslint: 10.3.0(jiti@2.6.1) - eslint-plugin-react@7.37.5(eslint@10.3.0(jiti@2.6.1)): + eslint-plugin-react@7.37.5(eslint@10.5.0(jiti@2.6.1)): dependencies: array-includes: 3.1.8 array.prototype.findlast: 1.2.5 @@ -9431,7 +9440,7 @@ snapshots: array.prototype.tosorted: 1.1.4 doctrine: 2.1.0 es-iterator-helpers: 1.2.1 - eslint: 10.3.0(jiti@2.6.1) + eslint: 10.5.0(jiti@2.6.1) estraverse: 5.3.0 hasown: 2.0.2 jsx-ast-utils: 3.3.5 @@ -9445,14 +9454,14 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 - eslint-plugin-unicorn@64.0.0(eslint@10.3.0(jiti@2.6.1)): + eslint-plugin-unicorn@65.0.0(eslint@10.3.0(jiti@2.6.1)): dependencies: - '@babel/helper-validator-identifier': 7.28.5 + '@babel/helper-validator-identifier': 7.29.7 '@eslint-community/eslint-utils': 4.9.1(eslint@10.3.0(jiti@2.6.1)) change-case: 5.4.4 ci-info: 4.4.0 - clean-regexp: 1.0.0 core-js-compat: 3.49.0 + detect-indent: 7.0.2 eslint: 10.3.0(jiti@2.6.1) find-up-simple: 1.0.1 globals: 17.6.0 @@ -9460,9 +9469,8 @@ snapshots: is-builtin-module: 5.0.0 jsesc: 3.1.0 pluralize: 8.0.0 - regexp-tree: 0.1.27 - regjsparser: 0.13.1 - semver: 7.7.4 + regjsparser: 0.13.2 + semver: 7.8.4 strip-indent: 4.1.1 eslint-scope@9.1.2: @@ -9513,6 +9521,43 @@ snapshots: transitivePeerDependencies: - supports-color + eslint@10.5.0(jiti@2.6.1): + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.6.1)) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.23.5 + '@eslint/config-helpers': 0.6.0 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.2 + '@humanfs/node': 0.16.8 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.4.3 + '@types/estree': 1.0.9 + ajv: 6.15.0 + cross-spawn: 7.0.6 + debug: 4.4.3(supports-color@8.1.1) + escape-string-regexp: 4.0.0 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 + esquery: 1.7.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + minimatch: 10.2.5 + natural-compare: 1.4.0 + optionator: 0.9.4 + optionalDependencies: + jiti: 2.6.1 + transitivePeerDependencies: + - supports-color + espree@11.2.0: dependencies: acorn: 8.16.0 @@ -9800,10 +9845,6 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 - get-tsconfig@4.13.7: - dependencies: - resolve-pkg-maps: 1.0.0 - get-tsconfig@4.14.0: dependencies: resolve-pkg-maps: 1.0.0 @@ -10076,7 +10117,7 @@ snapshots: is-builtin-module@5.0.0: dependencies: - builtin-modules: 5.0.0 + builtin-modules: 5.2.0 is-callable@1.2.7: {} @@ -10264,7 +10305,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.23 + nwsapi: 2.2.24 parse5: 7.3.0 rrweb-cssom: 0.8.0 saxes: 6.0.0 @@ -10275,7 +10316,7 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.2.0 - ws: 8.20.0 + ws: 8.21.0 xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil @@ -10479,7 +10520,7 @@ snapshots: make-dir@4.0.0: dependencies: - semver: 7.8.0 + semver: 7.8.4 make-error@1.3.6: {} @@ -10698,7 +10739,7 @@ snapshots: path-key: 4.0.0 unicorn-magic: 0.3.0 - nwsapi@2.2.23: + nwsapi@2.2.24: optional: true object-assign@4.1.1: {} @@ -11066,8 +11107,6 @@ snapshots: get-proto: 1.0.1 which-builtin-type: 1.2.1 - regexp-tree@0.1.27: {} - regexp.prototype.flags@1.5.4: dependencies: call-bind: 1.0.8 @@ -11090,7 +11129,7 @@ snapshots: dependencies: rc: 1.2.8 - regjsparser@0.13.1: + regjsparser@0.13.2: dependencies: jsesc: 3.1.0 @@ -11270,6 +11309,8 @@ snapshots: semver@7.8.0: {} + semver@7.8.4: {} + sentence-case@3.0.4: dependencies: no-case: 3.0.4 @@ -11429,7 +11470,7 @@ snapshots: sort-package-json@2.15.1: dependencies: - detect-indent: 7.0.1 + detect-indent: 7.0.2 detect-newline: 4.0.1 get-stdin: 9.0.0 git-hooks-list: 3.2.0 @@ -11588,7 +11629,7 @@ snapshots: tailwindcss@4.2.4: {} - tapable@2.3.2: {} + tapable@2.3.3: {} tar@7.5.11: dependencies: @@ -11676,6 +11717,7 @@ snapshots: dependencies: picomatch: 4.0.4 typescript: 5.9.3 + optional: true ts-interface-checker@0.1.13: {} @@ -12103,6 +12145,9 @@ snapshots: ws@8.20.0: {} + ws@8.21.0: + optional: true + wsl-utils@0.3.1: dependencies: is-wsl: 3.1.1 diff --git a/src/commands/apps/current.ts b/src/commands/apps/current.ts index 48bf809d6..53b2bcaef 100644 --- a/src/commands/apps/current.ts +++ b/src/commands/apps/current.ts @@ -67,7 +67,7 @@ export default class AppsCurrent extends ControlBaseCommand { this.configManager.getKeyName(currentAppId) || "Unnamed key"; const keyName = keyId.includes(".") ? keyId - : `${currentAppId}.${keyId.split(".")[1] ?? keyId}`; + : `${currentAppId}.${keyId.split(".", 2)[1] ?? keyId}`; keyInfo = { keyName, @@ -107,7 +107,7 @@ export default class AppsCurrent extends ControlBaseCommand { // Format the full key name (app_id.key_id) const keyName = keyId.includes(".") ? keyId - : `${currentAppId}.${keyId.split(".")[1] ?? keyId}`; + : `${currentAppId}.${keyId.split(".", 2)[1] ?? keyId}`; this.log(`${formatLabel("API Key")} ${chalk.yellow.bold(keyName)}`); this.log( diff --git a/src/commands/auth/keys/get.ts b/src/commands/auth/keys/get.ts index e98764ed5..0b9772e79 100644 --- a/src/commands/auth/keys/get.ts +++ b/src/commands/auth/keys/get.ts @@ -53,7 +53,7 @@ export default class KeysGetCommand extends ControlBaseCommand { const currentKeyId = this.configManager.getKeyId(appId); const currentKeyName = resolveCurrentKeyName(appId, currentKeyId); const envKey = process.env.ABLY_API_KEY; - const envKeyPrefix = envKey ? envKey.split(":")[0] : undefined; + const envKeyPrefix = envKey ? envKey.split(":", 1)[0] : undefined; const hasEnvOverride = envKey && currentKeyName === keyName && envKeyPrefix !== keyName; diff --git a/src/commands/interactive.ts b/src/commands/interactive.ts index 4d1b89a93..e9090fdc6 100644 --- a/src/commands/interactive.ts +++ b/src/commands/interactive.ts @@ -631,10 +631,8 @@ export default class Interactive extends Command { // Check if this is an escape sequence if ( inDoubleQuote && - (nextChar === '"' || - nextChar === "\\" || - nextChar === "$" || - nextChar === "`") + nextChar !== undefined && + ['"', "\\", "$", "`"].includes(nextChar) ) { escaped = true; continue; diff --git a/src/control-base-command.ts b/src/control-base-command.ts index 8b39a74b6..bee4f264a 100644 --- a/src/control-base-command.ts +++ b/src/control-base-command.ts @@ -206,11 +206,11 @@ export abstract class ControlBaseCommand extends AblyBaseCommand { if (keyNameOrValue.includes(":")) { // Full key value — appId is before the first dot - return keyNameOrValue.split(".")[0]!; + return keyNameOrValue.split(".", 1)[0]!; } // Key name — appId is the first segment - return keyNameOrValue.split(".")[0]!; + return keyNameOrValue.split(".", 1)[0]!; } /** diff --git a/src/help.ts b/src/help.ts index 1d8fd6728..6496a5c3f 100644 --- a/src/help.ts +++ b/src/help.ts @@ -280,7 +280,7 @@ export default class CustomHelp extends Help { const commandListString = this.renderList( combined.map((c) => { const description = - c.description && this.render(c.description.split("\n")[0]!); + c.description && this.render(c.description.split("\n", 1)[0]!); const descString = description ? chalk.whiteBright(description) : undefined; @@ -584,7 +584,7 @@ export default class CustomHelp extends Help { this.renderList( visibleCommands.map((c) => { const description = - c.description && this.render(c.description.split("\n")[0]!); + c.description && this.render(c.description.split("\n", 1)[0]!); return [ chalk.cyan(c.id), description ? chalk.whiteBright(description) : undefined, @@ -614,7 +614,7 @@ export default class CustomHelp extends Help { .filter((t) => this.shouldDisplay({ id: t.name } as Command.Loadable)) // Reuse shouldDisplay logic .map((c) => { const description = - c.description && this.render(c.description.split("\n")[0]!); + c.description && this.render(c.description.split("\n", 1)[0]!); return [ chalk.cyan(c.name), description ? chalk.whiteBright(description) : undefined, diff --git a/src/hooks/command_not_found/did-you-mean.ts b/src/hooks/command-not-found/did-you-mean.ts similarity index 100% rename from src/hooks/command_not_found/did-you-mean.ts rename to src/hooks/command-not-found/did-you-mean.ts diff --git a/src/hooks/command_not_found/prompt-utils.ts b/src/hooks/command-not-found/prompt-utils.ts similarity index 100% rename from src/hooks/command_not_found/prompt-utils.ts rename to src/hooks/command-not-found/prompt-utils.ts diff --git a/src/services/control-api.ts b/src/services/control-api.ts index cca9438fc..f26a85b97 100644 --- a/src/services/control-api.ts +++ b/src/services/control-api.ts @@ -587,7 +587,7 @@ export class ControlApi { method, }; - if (body && (method === "POST" || method === "PUT" || method === "PATCH")) { + if (body && ["POST", "PUT", "PATCH"].includes(method)) { options.body = isFormData ? body : JSON.stringify(body); } diff --git a/src/services/skills-downloader.ts b/src/services/skills-downloader.ts index fda2010c6..b995d5421 100644 --- a/src/services/skills-downloader.ts +++ b/src/services/skills-downloader.ts @@ -131,7 +131,7 @@ async function resolveLatestRelease( * `.github/workflows/release.yml` (ably/agent-skills) — keep these in sync. */ function releaseAssetUrl(repo: string, tag: string): string { - const repoName = repo.split("/")[1]!; + const repoName = repo.split("/", 2)[1]!; return `https://github.com/${repo}/releases/download/${encodeURIComponent(tag)}/${repoName}-${tag}.tar.gz`; } diff --git a/src/services/skills-install-runner.ts b/src/services/skills-install-runner.ts index 445578471..896ff4daa 100644 --- a/src/services/skills-install-runner.ts +++ b/src/services/skills-install-runner.ts @@ -124,9 +124,11 @@ export async function runSkillsInstall( // whenever `hasClaudePlugin || fileCopyTargets.length > 0`. const outcome = await installClaudeCodePlugin(output, source!.sha); if ( - outcome === PluginInstallStatus.Installed || - outcome === PluginInstallStatus.AlreadyInstalled || - outcome === PluginInstallStatus.Partial + [ + PluginInstallStatus.Installed, + PluginInstallStatus.AlreadyInstalled, + PluginInstallStatus.Partial, + ].includes(outcome) ) { pluginInstalled = true; } else { diff --git a/src/spaces-base-command.ts b/src/spaces-base-command.ts index 201cb887f..eef92e288 100644 --- a/src/spaces-base-command.ts +++ b/src/spaces-base-command.ts @@ -230,11 +230,7 @@ export abstract class SpacesBaseCommand extends AblyBaseCommand { return; } - if ( - connection.state === "failed" || - connection.state === "closed" || - connection.state === "suspended" - ) { + if (["failed", "closed", "suspended"].includes(connection.state)) { const errorMsg = `Connection failed with state: ${connection.state}`; this.logCliEvent(flags, "connection", "failed", errorMsg, { state: connection.state, diff --git a/src/utils/api-key.ts b/src/utils/api-key.ts index 283a1fc3c..e765f3409 100644 --- a/src/utils/api-key.ts +++ b/src/utils/api-key.ts @@ -3,7 +3,7 @@ */ export function extractAppIdFromApiKey(apiKey: string): string { - return apiKey.split(".")[0] ?? ""; + return apiKey.split(".", 1)[0] ?? ""; } /** @@ -11,5 +11,5 @@ export function extractAppIdFromApiKey(apiKey: string): string { * (i.e. `APP_ID.KEY_ID`). Empty string if the input is not a valid key. */ export function extractKeyNameFromApiKey(apiKey: string): string { - return apiKey.split(":")[0] ?? ""; + return apiKey.split(":", 1)[0] ?? ""; } diff --git a/src/utils/long-running.ts b/src/utils/long-running.ts index e488f9b60..2f3fac9e7 100644 --- a/src/utils/long-running.ts +++ b/src/utils/long-running.ts @@ -48,10 +48,9 @@ export async function waitUntilInterruptedOrTimeout( const effectiveDuration = typeof durationSeconds === "number" && durationSeconds > 0 ? durationSeconds - : process.env.ABLY_CLI_DEFAULT_DURATION - ? Number(process.env.ABLY_CLI_DEFAULT_DURATION) > 0 - ? Number(process.env.ABLY_CLI_DEFAULT_DURATION) - : undefined + : process.env.ABLY_CLI_DEFAULT_DURATION && + Number(process.env.ABLY_CLI_DEFAULT_DURATION) > 0 + ? Number(process.env.ABLY_CLI_DEFAULT_DURATION) : undefined; if (effectiveDuration) { diff --git a/src/utils/terminal-diagnostics.ts b/src/utils/terminal-diagnostics.ts index 0a3322227..907019a71 100644 --- a/src/utils/terminal-diagnostics.ts +++ b/src/utils/terminal-diagnostics.ts @@ -109,7 +109,7 @@ export class TerminalDiagnostics { stdinWithRaw.setRawMode = function (mode: boolean): NodeJS.ReadStream { TerminalDiagnostics.log(`setRawMode(${mode}) called`); try { - const result = originalSetRawMode.call(this, mode); + const result = originalSetRawMode.call(stdinWithRaw, mode); TerminalDiagnostics.log(`setRawMode(${mode}) succeeded`); return result; } catch (error) { diff --git a/test/e2e/auth/auth-tokens-e2e.test.ts b/test/e2e/auth/auth-tokens-e2e.test.ts index 6daaeb913..1f3f6c836 100644 --- a/test/e2e/auth/auth-tokens-e2e.test.ts +++ b/test/e2e/auth/auth-tokens-e2e.test.ts @@ -169,7 +169,7 @@ describe.skipIf(SHOULD_SKIP_E2E)("Auth Tokens E2E Tests", () => { const apiKey = E2E_API_KEY || ""; const [keyId, keySecret] = apiKey.split(":"); - const appId = keyId!.split(".")[0]; + const appId = keyId!.split(".", 1)[0]; const revocationKey = `e2e-revoke-group-${Date.now()}`; // Step 1: Manually create a JWT with the x-ably-revocation-key claim diff --git a/test/e2e/auth/basic-auth.test.ts b/test/e2e/auth/basic-auth.test.ts index 256620483..c0b896e00 100644 --- a/test/e2e/auth/basic-auth.test.ts +++ b/test/e2e/auth/basic-auth.test.ts @@ -88,7 +88,7 @@ describe("Authentication E2E", () => { // Extract app ID from API key (simulating BaseCommand logic) const apiKey = process.env.ABLY_API_KEY; - const appId = apiKey.split(".")[0]; + const appId = apiKey.split(".", 1)[0]; expect(appId).toBe("test-app"); }); }); diff --git a/test/e2e/stats/stats.test.ts b/test/e2e/stats/stats.test.ts index e55177e7e..6ae73f5d7 100644 --- a/test/e2e/stats/stats.test.ts +++ b/test/e2e/stats/stats.test.ts @@ -246,7 +246,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( } // Extract app ID from API key - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; const result = await runCommand(["stats", "app", appId], { timeoutMs: 60000, @@ -274,7 +274,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( throw new Error("E2E_API_KEY is not available for testing"); } - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; const result = await runCommand( ["stats", "app", appId, "--unit", "hour"], @@ -298,7 +298,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( throw new Error("E2E_API_KEY is not available for testing"); } - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; const result = await runCommand( ["stats", "app", appId, "--unit", "day"], @@ -319,7 +319,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( throw new Error("E2E_API_KEY is not available for testing"); } - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; const result = await runCommand( ["stats", "app", appId, "--limit", "5"], @@ -342,7 +342,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( throw new Error("E2E_API_KEY is not available for testing"); } - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; const result = await runCommand( ["stats", "app", appId, "--json", "--limit", "1"], @@ -382,7 +382,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( throw new Error("E2E_API_KEY is not available for testing"); } - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; const result = await runCommand( ["stats", "app", appId, "--pretty-json", "--limit", "1"], @@ -409,7 +409,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( } const cliPath = join(process.cwd(), "bin", "run.js"); - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; // Start live stats subscription const statsMonitor = spawn( @@ -578,7 +578,7 @@ describe.skipIf(SHOULD_SKIP_E2E || SKIP_ACCOUNT_STATS)( throw new Error("E2E_API_KEY is not available for testing"); } - const appId = E2E_API_KEY.split(".")[0]; + const appId = E2E_API_KEY.split(".", 1)[0]; const now = Date.now(); const oneHourAgo = now - 60 * 60 * 1000; diff --git a/test/helpers/e2e-mutable-messages.ts b/test/helpers/e2e-mutable-messages.ts index 1438c867c..7e5de08ae 100644 --- a/test/helpers/e2e-mutable-messages.ts +++ b/test/helpers/e2e-mutable-messages.ts @@ -17,7 +17,7 @@ let ruleCreated = false; function getAppId(): string { if (!E2E_API_KEY) throw new Error("E2E_API_KEY is not set"); - return E2E_API_KEY.split(".")[0] || ""; + return E2E_API_KEY.split(".", 1)[0] || ""; } /** @@ -62,11 +62,11 @@ export async function setupMutableMessagesRule(): Promise { id?: string; mutableMessages?: boolean; }>; - const existing = rules.find( + const ruleExists = rules.some( (r) => r.id === MUTABLE_NAMESPACE && r.mutableMessages === true, ); - if (existing) { + if (ruleExists) { ruleCreated = true; } else { throw new Error( diff --git a/test/helpers/e2e-test-helper.ts b/test/helpers/e2e-test-helper.ts index 63c92c61c..e29f7ffd8 100644 --- a/test/helpers/e2e-test-helper.ts +++ b/test/helpers/e2e-test-helper.ts @@ -84,9 +84,11 @@ export function createAblyClient(): Ably.Rest { } const clientId = getUniqueClientId(); - const _keyPrefix = E2E_API_KEY.split(":")[0]?.split(".")[0] || "unknown-app"; + const _keyPrefix = + E2E_API_KEY.split(":", 1)[0]?.split(".", 1)[0] || "unknown-app"; const _keyId = - E2E_API_KEY.split(":")[0]?.split(".")[1]?.slice(0, 4) || "unknown-key"; + E2E_API_KEY.split(":", 1)[0]?.split(".", 2)[1]?.slice(0, 4) || + "unknown-key"; const client = new Ably.Rest({ key: E2E_API_KEY, @@ -118,9 +120,11 @@ export function createAblyRealtimeClient(): Ably.Realtime { } const clientId = getUniqueClientId(); - const _keyPrefix = E2E_API_KEY.split(":")[0]?.split(".")[0] || "unknown-app"; + const _keyPrefix = + E2E_API_KEY.split(":", 1)[0]?.split(".", 1)[0] || "unknown-app"; const _keyId = - E2E_API_KEY.split(":")[0]?.split(".")[1]?.slice(0, 4) || "unknown-key"; + E2E_API_KEY.split(":", 1)[0]?.split(".", 2)[1]?.slice(0, 4) || + "unknown-key"; const client = new Ably.Realtime({ key: E2E_API_KEY, diff --git a/test/helpers/mock-ably-realtime.ts b/test/helpers/mock-ably-realtime.ts index b4af91104..91119b7aa 100644 --- a/test/helpers/mock-ably-realtime.ts +++ b/test/helpers/mock-ably-realtime.ts @@ -262,15 +262,11 @@ function createMockChannel(name: string): MockRealtimeChannel { }), publish: vi.fn().mockResolvedValue({ serials: ["mock-serial-001"] }), history: vi.fn().mockResolvedValue({ items: [] }), - attach: vi.fn().mockImplementation(async function ( - this: MockRealtimeChannel, - ) { - this.state = "attached"; + attach: vi.fn().mockImplementation(async () => { + channel.state = "attached"; }), - detach: vi.fn().mockImplementation(async function ( - this: MockRealtimeChannel, - ) { - this.state = "detached"; + detach: vi.fn().mockImplementation(async () => { + channel.state = "detached"; }), on: vi.fn((eventOrListener, listener?) => { const event = listener ? eventOrListener : null; diff --git a/test/helpers/mock-config-manager.ts b/test/helpers/mock-config-manager.ts index d89129d77..33ba79cbd 100644 --- a/test/helpers/mock-config-manager.ts +++ b/test/helpers/mock-config-manager.ts @@ -321,7 +321,7 @@ export class MockConfigManager implements ConfigManager { } if (appConfig.apiKey) { - return appConfig.apiKey.split(":")[0]; + return appConfig.apiKey.split(":", 1)[0]; } return undefined; @@ -493,7 +493,7 @@ export class MockConfigManager implements ConfigManager { ...this.config.accounts[alias].apps[appId], apiKey, appName: metadata?.appName, - keyId: metadata?.keyId || apiKey.split(":")[0], + keyId: metadata?.keyId || apiKey.split(":", 1)[0], keyName: metadata?.keyName, }; } diff --git a/test/hooks/command_not_found/did-you-mean.test.ts b/test/hooks/command-not-found/did-you-mean.test.ts similarity index 99% rename from test/hooks/command_not_found/did-you-mean.test.ts rename to test/hooks/command-not-found/did-you-mean.test.ts index 1eb1f26b4..47dced9b2 100644 --- a/test/hooks/command_not_found/did-you-mean.test.ts +++ b/test/hooks/command-not-found/did-you-mean.test.ts @@ -5,7 +5,7 @@ import { fileURLToPath } from "node:url"; import { dirname } from "node:path"; // Import the compiled hook function -import hook from "../../../src/hooks/command_not_found/did-you-mean.js"; +import hook from "../../../src/hooks/command-not-found/did-you-mean.js"; // Helper regex to strip ANSI codes for matching // eslint-disable-next-line no-control-regex diff --git a/test/unit/base/base-command-enhanced.test.ts b/test/unit/base/base-command-enhanced.test.ts index 2c0a9b2b6..1d0ce23a8 100644 --- a/test/unit/base/base-command-enhanced.test.ts +++ b/test/unit/base/base-command-enhanced.test.ts @@ -270,7 +270,7 @@ describe("AblyBaseCommand - Enhanced Coverage", function () { // Verify app ID extraction logic const apiKey = process.env.ABLY_API_KEY; - const appId = apiKey.split(".")[0]; + const appId = apiKey.split(".", 1)[0]; expect(appId).toBe("testApp"); }); diff --git a/test/unit/commands/auth/issue-jwt-token.test.ts b/test/unit/commands/auth/issue-jwt-token.test.ts index 5790ca336..424de9c4b 100644 --- a/test/unit/commands/auth/issue-jwt-token.test.ts +++ b/test/unit/commands/auth/issue-jwt-token.test.ts @@ -33,7 +33,7 @@ describe("auth:issue-jwt-token command", () => { const mockConfig = getMockConfigManager(); const appId = mockConfig.getCurrentAppId()!; const apiKey = mockConfig.getApiKey()!; - const mockKeySecret = apiKey.split(":")[1]; + const mockKeySecret = apiKey.split(":", 2)[1]; const { stdout } = await runCommand( ["auth:issue-jwt-token", "--token-only"], import.meta.url, @@ -52,7 +52,7 @@ describe("auth:issue-jwt-token command", () => { it("should issue a token with custom capability", async () => { const apiKey = getMockConfigManager().getApiKey()!; - const mockKeySecret = apiKey.split(":")[1]; + const mockKeySecret = apiKey.split(":", 2)[1]; const customCapability = '{"chat:*":["publish","subscribe"]}'; const { stdout } = await runCommand( @@ -77,7 +77,7 @@ describe("auth:issue-jwt-token command", () => { it("should issue a token with custom TTL", async () => { const apiKey = getMockConfigManager().getApiKey()!; - const mockKeySecret = apiKey.split(":")[1]; + const mockKeySecret = apiKey.split(":", 2)[1]; const ttl = 7200; // 2 hours const { stdout } = await runCommand( @@ -96,7 +96,7 @@ describe("auth:issue-jwt-token command", () => { it("should issue a token with custom client ID", async () => { const apiKey = getMockConfigManager().getApiKey()!; - const mockKeySecret = apiKey.split(":")[1]; + const mockKeySecret = apiKey.split(":", 2)[1]; const customClientId = "my-custom-client"; const { stdout } = await runCommand( @@ -114,7 +114,7 @@ describe("auth:issue-jwt-token command", () => { it("should issue a token with no client ID when 'none' is specified", async () => { const apiKey = getMockConfigManager().getApiKey()!; - const mockKeySecret = apiKey.split(":")[1]; + const mockKeySecret = apiKey.split(":", 2)[1]; const { stdout } = await runCommand( ["auth:issue-jwt-token", "--client-id", "none", "--token-only"], import.meta.url, @@ -163,7 +163,7 @@ describe("auth:issue-jwt-token command", () => { it("should generate token with default capability of all permissions", async () => { const apiKey = getMockConfigManager().getApiKey()!; - const mockKeySecret = apiKey.split(":")[1]; + const mockKeySecret = apiKey.split(":", 2)[1]; const { stdout } = await runCommand( ["auth:issue-jwt-token", "--token-only"], import.meta.url, @@ -180,7 +180,7 @@ describe("auth:issue-jwt-token command", () => { it("should generate token with default TTL of 1 hour", async () => { const apiKey = getMockConfigManager().getApiKey()!; - const mockKeySecret = apiKey.split(":")[1]; + const mockKeySecret = apiKey.split(":", 2)[1]; const { stdout } = await runCommand( ["auth:issue-jwt-token", "--token-only"], import.meta.url, diff --git a/test/unit/commands/auth/keys/get.test.ts b/test/unit/commands/auth/keys/get.test.ts index 2bbc2318e..c88f86a44 100644 --- a/test/unit/commands/auth/keys/get.test.ts +++ b/test/unit/commands/auth/keys/get.test.ts @@ -90,7 +90,7 @@ describe("auth:keys:get command", () => { const currentKeyId = mockConfig.getKeyId(appId)!; // Build a mock key whose appId.id matches the current key const keyIdPart = currentKeyId.includes(".") - ? currentKeyId.split(".")[1] + ? currentKeyId.split(".", 2)[1] : currentKeyId; mockKeysList(appId, [buildMockKey(appId, keyIdPart)]); @@ -132,7 +132,7 @@ describe("auth:keys:get command", () => { const appId = mockConfig.getCurrentAppId()!; const currentKeyId = mockConfig.getKeyId(appId)!; const keyIdPart = currentKeyId.includes(".") - ? currentKeyId.split(".")[1] + ? currentKeyId.split(".", 2)[1] : currentKeyId; mockKeysList(appId, [buildMockKey(appId, keyIdPart)]); @@ -152,7 +152,7 @@ describe("auth:keys:get command", () => { const appId = mockConfig.getCurrentAppId()!; const currentKeyId = mockConfig.getKeyId(appId)!; const keyIdPart = currentKeyId.includes(".") - ? currentKeyId.split(".")[1] + ? currentKeyId.split(".", 2)[1] : currentKeyId; mockKeysList(appId, [buildMockKey(appId, keyIdPart)]); diff --git a/test/unit/commands/channels/get-message.test.ts b/test/unit/commands/channels/get-message.test.ts index 8bb9d8abb..75c5f71a8 100644 --- a/test/unit/commands/channels/get-message.test.ts +++ b/test/unit/commands/channels/get-message.test.ts @@ -200,7 +200,7 @@ describe("channels:get-message command", () => { ); // The default mock timestamp 1_700_000_000_000 = 2023-11-14T22:13:20.000Z - const firstLine = stdout.split("\n")[0]; + const firstLine = stdout.split("\n", 1)[0]; expect(firstLine).toContain("2023-11-14T22:13:20.000Z"); // No ordinal index like `[1]` should precede the timestamp on the header. expect(firstLine).not.toMatch(/^\s*\[\d+]\s+\[/); diff --git a/test/unit/commands/skills/install.test.ts b/test/unit/commands/skills/install.test.ts index 8b28f9468..65866a96e 100644 --- a/test/unit/commands/skills/install.test.ts +++ b/test/unit/commands/skills/install.test.ts @@ -286,7 +286,7 @@ describe("skills:install command", () => { ); expect(error).toBeUndefined(); - const firstLine = stdout.trim().split("\n")[0]!; + const firstLine = stdout.trim().split("\n", 1)[0]!; const record = JSON.parse(firstLine) as { type: string; success: boolean; diff --git a/test/unit/hooks/interactive-did-you-mean.test.ts b/test/unit/hooks/interactive-did-you-mean.test.ts index d65887614..7b7528c7c 100644 --- a/test/unit/hooks/interactive-did-you-mean.test.ts +++ b/test/unit/hooks/interactive-did-you-mean.test.ts @@ -8,7 +8,7 @@ import { MockInstance, } from "vitest"; // import { Config } from '@oclif/core'; // Unused -import hook from "../../../src/hooks/command_not_found/did-you-mean.js"; +import hook from "../../../src/hooks/command-not-found/did-you-mean.js"; import inquirer from "inquirer"; // import chalk from 'chalk'; // Unused diff --git a/test/unit/services/history-manager.test.ts b/test/unit/services/history-manager.test.ts index 6c7c87c13..e4a58d552 100644 --- a/test/unit/services/history-manager.test.ts +++ b/test/unit/services/history-manager.test.ts @@ -60,7 +60,7 @@ describe("HistoryManager", function () { // These should all be no-ops await manager.saveCommand(""); - await manager.saveCommand(" "); + await manager.saveCommand(" ".repeat(3)); await manager.saveCommand("\t\n"); // If we got here without throwing, the test passes diff --git a/test/unit/utils/slugify.test.ts b/test/unit/utils/slugify.test.ts index 13908b4f5..a9359b1d9 100644 --- a/test/unit/utils/slugify.test.ts +++ b/test/unit/utils/slugify.test.ts @@ -23,7 +23,7 @@ describe("slugifyAccountName", () => { }); it("returns 'default' for whitespace-only string", () => { - expect(slugifyAccountName(" ")).toBe("default"); + expect(slugifyAccountName(" ".repeat(3))).toBe("default"); }); it("prefixes with 'account-' when name starts with a number", () => {