diff --git a/package-lock.json b/package-lock.json index af5021b..e986e0e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,14 +10,14 @@ "license": "GPL-3.0-or-later", "devDependencies": { "@ava/typescript": "6.0.0", - "@commitlint/cli": "20.3.0", - "@commitlint/config-conventional": "20.3.0", + "@commitlint/cli": "20.3.1", + "@commitlint/config-conventional": "20.3.1", "@commitlint/lint-19.x": "npm:@commitlint/lint@19.8.1", - "@commitlint/lint-20.x": "npm:@commitlint/lint@20.3.0", + "@commitlint/lint-20.x": "npm:@commitlint/lint@20.3.1", "@commitlint/load-19.x": "npm:@commitlint/load@19.8.1", - "@commitlint/load-20.x": "npm:@commitlint/load@20.3.0", - "@commitlint/rules": "20.3.0", - "@commitlint/types": "20.2.0", + "@commitlint/load-20.x": "npm:@commitlint/load@20.3.1", + "@commitlint/rules": "20.3.1", + "@commitlint/types": "20.3.1", "@types/sinon": "21.0.0", "@vidavidorra/eslint-config": "1.0.3", "@vidavidorra/prettier-config": "1.0.6", @@ -152,17 +152,17 @@ } }, "node_modules/@commitlint/cli": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-20.3.0.tgz", - "integrity": "sha512-HXO8YVfqdBK+MnlX2zqNrv6waGYPs6Ysjm5W2Y0GMagWXwiIKx7C8dcIX9ca+QdHq4WA0lcMnZLQ0pzQh1piZg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-20.3.1.tgz", + "integrity": "sha512-NtInjSlyev/+SLPvx/ulz8hRE25Wf5S9dLNDcIwazq0JyB4/w1ROF/5nV0ObPTX8YpRaKYeKtXDYWqumBNHWsw==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/format": "^20.2.0", - "@commitlint/lint": "^20.3.0", - "@commitlint/load": "^20.3.0", - "@commitlint/read": "^20.2.0", - "@commitlint/types": "^20.2.0", + "@commitlint/format": "^20.3.1", + "@commitlint/lint": "^20.3.1", + "@commitlint/load": "^20.3.1", + "@commitlint/read": "^20.3.1", + "@commitlint/types": "^20.3.1", "tinyexec": "^1.0.0", "yargs": "^17.0.0" }, @@ -174,13 +174,13 @@ } }, "node_modules/@commitlint/config-conventional": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-20.3.0.tgz", - "integrity": "sha512-g1OXVl6E2v0xF1Ru2RpxQ+Vfy7XUcUsCmLKzGUrhFLS4hSNykje0QSy6djBtzOiOBQCepBrmIlqx/gRlzrSh5A==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-20.3.1.tgz", + "integrity": "sha512-NCzwvxepstBZbmVXsvg49s+shCxlJDJPWxXqONVcAtJH9wWrOlkMQw/zyl+dJmt8lyVopt5mwQ3mR5M2N2rUWg==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/types": "^20.2.0", + "@commitlint/types": "^20.3.1", "conventional-changelog-conventionalcommits": "^7.0.2" }, "engines": { @@ -188,13 +188,13 @@ } }, "node_modules/@commitlint/config-validator": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-20.2.0.tgz", - "integrity": "sha512-SQCBGsL9MFk8utWNSthdxd9iOD1pIVZSHxGBwYIGfd67RTjxqzFOSAYeQVXOu3IxRC3YrTOH37ThnTLjUlyF2w==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-20.3.1.tgz", + "integrity": "sha512-ErVLC/IsHhcvxCyh+FXo7jy12/nkQySjWXYgCoQbZLkFp4hysov8KS6CdxBB0cWjbZWjvNOKBMNoUVqkmGmahw==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/types": "^20.2.0", + "@commitlint/types": "^20.3.1", "ajv": "^8.11.0" }, "engines": { @@ -202,12 +202,12 @@ } }, "node_modules/@commitlint/ensure": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-20.2.0.tgz", - "integrity": "sha512-+8TgIGv89rOWyt3eC6lcR1H7hqChAKkpawytlq9P1i/HYugFRVqgoKJ8dhd89fMnlrQTLjA5E97/4sF09QwdoA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-20.3.1.tgz", + "integrity": "sha512-h664FngOEd7bHAm0j8MEKq+qm2mH+V+hwJiIE2bWcw3pzJMlO0TPKtk0ATyRAtV6jQw+xviRYiIjjSjfajiB5w==", "license": "MIT", "dependencies": { - "@commitlint/types": "^20.2.0", + "@commitlint/types": "^20.3.1", "lodash.camelcase": "^4.3.0", "lodash.kebabcase": "^4.1.1", "lodash.snakecase": "^4.1.1", @@ -229,13 +229,13 @@ } }, "node_modules/@commitlint/format": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-20.2.0.tgz", - "integrity": "sha512-PhNoLNhxpfIBlW/i90uZ3yG3hwSSYx7n4d9Yc+2FAorAHS0D9btYRK4ZZXX+Gm3W5tDtu911ow/eWRfcRVgNWg==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-20.3.1.tgz", + "integrity": "sha512-jfsjGPFTd2Yti2YHwUH4SPRPbWKAJAwrfa3eNa9bXEdrXBb9mCwbIrgYX38LdEJK9zLJ3AsLBP4/FLEtxyu2AA==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/types": "^20.2.0", + "@commitlint/types": "^20.3.1", "chalk": "^5.3.0" }, "engines": { @@ -243,12 +243,12 @@ } }, "node_modules/@commitlint/is-ignored": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-20.2.0.tgz", - "integrity": "sha512-Lz0OGeZCo/QHUDLx5LmZc0EocwanneYJUM8z0bfWexArk62HKMLfLIodwXuKTO5y0s6ddXaTexrYHs7v96EOmw==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-20.3.1.tgz", + "integrity": "sha512-tWwAoh93QvAhxgp99CzCuHD86MgxE4NBtloKX+XxQxhfhSwHo7eloiar/yzx53YW9eqSLP95zgW2KDDk4/WX+A==", "license": "MIT", "dependencies": { - "@commitlint/types": "^20.2.0", + "@commitlint/types": "^20.3.1", "semver": "^7.6.0" }, "engines": { @@ -256,15 +256,15 @@ } }, "node_modules/@commitlint/lint": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-20.3.0.tgz", - "integrity": "sha512-X19HOGU5nRo6i9DIY0kG0mhgtvpn1UGO1D6aLX1ILLyeqSM5yJyMcrRqNj8SLgeSeUDODhLY9QYsBIG0LdNHkA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-20.3.1.tgz", + "integrity": "sha512-LaOtrQ24+6SfUaWg8A+a+Wc77bvLbO5RIr6iy9F7CI3/0iq1uPEWgGRCwqWTuLGHkZDAcwaq0gZ01zpwZ1jCGw==", "license": "MIT", "dependencies": { - "@commitlint/is-ignored": "^20.2.0", - "@commitlint/parse": "^20.2.0", - "@commitlint/rules": "^20.3.0", - "@commitlint/types": "^20.2.0" + "@commitlint/is-ignored": "^20.3.1", + "@commitlint/parse": "^20.3.1", + "@commitlint/rules": "^20.3.1", + "@commitlint/types": "^20.3.1" }, "engines": { "node": ">=v18" @@ -386,32 +386,32 @@ }, "node_modules/@commitlint/lint-20.x": { "name": "@commitlint/lint", - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-20.3.0.tgz", - "integrity": "sha512-X19HOGU5nRo6i9DIY0kG0mhgtvpn1UGO1D6aLX1ILLyeqSM5yJyMcrRqNj8SLgeSeUDODhLY9QYsBIG0LdNHkA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-20.3.1.tgz", + "integrity": "sha512-LaOtrQ24+6SfUaWg8A+a+Wc77bvLbO5RIr6iy9F7CI3/0iq1uPEWgGRCwqWTuLGHkZDAcwaq0gZ01zpwZ1jCGw==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/is-ignored": "^20.2.0", - "@commitlint/parse": "^20.2.0", - "@commitlint/rules": "^20.3.0", - "@commitlint/types": "^20.2.0" + "@commitlint/is-ignored": "^20.3.1", + "@commitlint/parse": "^20.3.1", + "@commitlint/rules": "^20.3.1", + "@commitlint/types": "^20.3.1" }, "engines": { "node": ">=v18" } }, "node_modules/@commitlint/load": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-20.3.0.tgz", - "integrity": "sha512-amkdVZTXp5R65bsRXRSCwoNXbJHR2aAIY/RGFkoyd63t8UEwqEgT3f0MgeLqYw4hwXyq+TYXKdaW133E29pnGQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-20.3.1.tgz", + "integrity": "sha512-YDD9XA2XhgYgbjju8itZ/weIvOOobApDqwlPYCX5NLO/cPtw2UMO5Cmn44Ks8RQULUVI5fUT6roKvyxcoLbNmw==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/config-validator": "^20.2.0", + "@commitlint/config-validator": "^20.3.1", "@commitlint/execute-rule": "^20.0.0", - "@commitlint/resolve-extends": "^20.2.0", - "@commitlint/types": "^20.2.0", + "@commitlint/resolve-extends": "^20.3.1", + "@commitlint/types": "^20.3.1", "chalk": "^5.3.0", "cosmiconfig": "^9.0.0", "cosmiconfig-typescript-loader": "^6.1.0", @@ -504,16 +504,16 @@ }, "node_modules/@commitlint/load-20.x": { "name": "@commitlint/load", - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-20.3.0.tgz", - "integrity": "sha512-amkdVZTXp5R65bsRXRSCwoNXbJHR2aAIY/RGFkoyd63t8UEwqEgT3f0MgeLqYw4hwXyq+TYXKdaW133E29pnGQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-20.3.1.tgz", + "integrity": "sha512-YDD9XA2XhgYgbjju8itZ/weIvOOobApDqwlPYCX5NLO/cPtw2UMO5Cmn44Ks8RQULUVI5fUT6roKvyxcoLbNmw==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/config-validator": "^20.2.0", + "@commitlint/config-validator": "^20.3.1", "@commitlint/execute-rule": "^20.0.0", - "@commitlint/resolve-extends": "^20.2.0", - "@commitlint/types": "^20.2.0", + "@commitlint/resolve-extends": "^20.3.1", + "@commitlint/types": "^20.3.1", "chalk": "^5.3.0", "cosmiconfig": "^9.0.0", "cosmiconfig-typescript-loader": "^6.1.0", @@ -535,12 +535,12 @@ } }, "node_modules/@commitlint/parse": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-20.2.0.tgz", - "integrity": "sha512-LXStagGU1ivh07X7sM+hnEr4BvzFYn1iBJ6DRg2QsIN8lBfSzyvkUcVCDwok9Ia4PWiEgei5HQjju6xfJ1YaSQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-20.3.1.tgz", + "integrity": "sha512-TuUTdbLpyUNLgDzLDYlI2BeTE6V/COZbf3f8WwsV0K6eq/2nSpNTMw7wHtXb+YxeY9wwxBp/Ldad4P+YIxHJoA==", "license": "MIT", "dependencies": { - "@commitlint/types": "^20.2.0", + "@commitlint/types": "^20.3.1", "conventional-changelog-angular": "^7.0.0", "conventional-commits-parser": "^5.0.0" }, @@ -549,14 +549,14 @@ } }, "node_modules/@commitlint/read": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-20.2.0.tgz", - "integrity": "sha512-+SjF9mxm5JCbe+8grOpXCXMMRzAnE0WWijhhtasdrpJoAFJYd5UgRTj/oCq5W3HJTwbvTOsijEJ0SUGImECD7Q==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-20.3.1.tgz", + "integrity": "sha512-nCmJAdIg3OdNVUpQW0Idk/eF/vfOo2W2xzmvRmNeptLrzFK7qhwwl/kIwy1Q1LZrKHUFNj7PGNpIT5INbgZWzA==", "dev": true, "license": "MIT", "dependencies": { "@commitlint/top-level": "^20.0.0", - "@commitlint/types": "^20.2.0", + "@commitlint/types": "^20.3.1", "git-raw-commits": "^4.0.0", "minimist": "^1.2.8", "tinyexec": "^1.0.0" @@ -566,14 +566,14 @@ } }, "node_modules/@commitlint/resolve-extends": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-20.2.0.tgz", - "integrity": "sha512-KVoLDi9BEuqeq+G0wRABn4azLRiCC22/YHR2aCquwx6bzCHAIN8hMt3Nuf1VFxq/c8ai6s8qBxE8+ZD4HeFTlQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-20.3.1.tgz", + "integrity": "sha512-iGTGeyaoDyHDEZNjD8rKeosjSNs8zYanmuowY4ful7kFI0dnY4b5QilVYaFQJ6IM27S57LAeH5sKSsOHy4bw5w==", "dev": true, "license": "MIT", "dependencies": { - "@commitlint/config-validator": "^20.2.0", - "@commitlint/types": "^20.2.0", + "@commitlint/config-validator": "^20.3.1", + "@commitlint/types": "^20.3.1", "global-directory": "^4.0.1", "import-meta-resolve": "^4.0.0", "lodash.mergewith": "^4.6.2", @@ -584,15 +584,15 @@ } }, "node_modules/@commitlint/rules": { - "version": "20.3.0", - "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-20.3.0.tgz", - "integrity": "sha512-TGgXN/qBEhbzVD13crE1l7YSMJRrbPbUL0OBZALbUM5ER36RZmiZRu2ud2W/AA7HO9YLBRbyx6YVi2t/2Be0yQ==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-20.3.1.tgz", + "integrity": "sha512-/uic4P+4jVNpqQxz02+Y6vvIC0A2J899DBztA1j6q3f3MOKwydlNrojSh0dQmGDxxT1bXByiRtDhgFnOFnM6Pg==", "license": "MIT", "dependencies": { - "@commitlint/ensure": "^20.2.0", + "@commitlint/ensure": "^20.3.1", "@commitlint/message": "^20.0.0", "@commitlint/to-lines": "^20.0.0", - "@commitlint/types": "^20.2.0" + "@commitlint/types": "^20.3.1" }, "engines": { "node": ">=v18" @@ -621,9 +621,9 @@ } }, "node_modules/@commitlint/types": { - "version": "20.2.0", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-20.2.0.tgz", - "integrity": "sha512-KTy0OqRDLR5y/zZMnizyx09z/rPlPC/zKhYgH8o/q6PuAjoQAKlRfY4zzv0M64yybQ//6//4H1n14pxaLZfUnA==", + "version": "20.3.1", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-20.3.1.tgz", + "integrity": "sha512-VmIFV/JkBRhDRRv7N5B7zEUkNZIx9Mp+8Pe65erz0rKycXLsi8Epcw0XJ+btSeRXgTzE7DyOyA9bkJ9mn/yqVQ==", "license": "MIT", "dependencies": { "@types/conventional-commits-parser": "^5.0.0", diff --git a/package.json b/package.json index 23cc355..c8203bf 100644 --- a/package.json +++ b/package.json @@ -67,14 +67,14 @@ }, "devDependencies": { "@ava/typescript": "6.0.0", - "@commitlint/cli": "20.3.0", - "@commitlint/config-conventional": "20.3.0", + "@commitlint/cli": "20.3.1", + "@commitlint/config-conventional": "20.3.1", "@commitlint/lint-19.x": "npm:@commitlint/lint@19.8.1", - "@commitlint/lint-20.x": "npm:@commitlint/lint@20.3.0", + "@commitlint/lint-20.x": "npm:@commitlint/lint@20.3.1", "@commitlint/load-19.x": "npm:@commitlint/load@19.8.1", - "@commitlint/load-20.x": "npm:@commitlint/load@20.3.0", - "@commitlint/rules": "20.3.0", - "@commitlint/types": "20.2.0", + "@commitlint/load-20.x": "npm:@commitlint/load@20.3.1", + "@commitlint/rules": "20.3.1", + "@commitlint/types": "20.3.1", "@types/sinon": "21.0.0", "@vidavidorra/eslint-config": "1.0.3", "@vidavidorra/prettier-config": "1.0.6", diff --git a/src/index.test.ts b/src/index.test.ts index bd68a60..e1e94f9 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -37,6 +37,16 @@ const loadPlugin = test.macro<[keyof typeof versions]>({ test(loadPlugin, '19.x'); test(loadPlugin, '20.x'); +/** + * The type of the `RulesConfig` have changed in [commitlint v20.3.1]( + * https://github.com/conventional-changelog/commitlint/releases/tag/v20.3.1), + * and are no longer compatible with those from v19. Specifically the types of + * the `scope-case` and `scope-enum` rules have been changed to also accept a + * rule object. While the individual versions are able process this test without + * runtime or type errors, the combined signature causes type errors. To keep + * the test, a relatively long one, the same for both versions, the type of the + * rule config is cast. + */ const lintUsingPluginRules = test.macro<[keyof typeof versions]>({ async exec(t, version) { // eslint-disable-next-line @typescript-eslint/await-thenable @@ -52,6 +62,7 @@ const lintUsingPluginRules = test.macro<[keyof typeof versions]>({ for await (const config of configs) { const report = await versions[version].lint( 'chore: basic commit message', + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument { [rule]: [ 2, @@ -60,7 +71,7 @@ const lintUsingPluginRules = test.macro<[keyof typeof versions]>({ ? async () => config.ruleOutcome : () => config.ruleOutcome, ], - }, + } as unknown as any, {plugins: {'function-rules': plugin}}, );