diff --git a/commitlint.config.js b/commitlint.config.js index e9e48bec..db40040d 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -1,15 +1,19 @@ -const {utils: {getPackages}} = require('@commitlint/config-lerna-scopes'); +import scopes from "@commitlint/config-lerna-scopes"; -module.exports = { +export default { extends: [ "@commitlint/config-conventional", - "@commitlint/config-lerna-scopes" + "@commitlint/config-lerna-scopes", ], rules: { - "scope-enum": async ctx => - [2, "always", [...(await getPackages(ctx)), + "scope-enum": async (ctx) => [ + 2, + "always", + [ + ...(await scopes.utils.getPackages(ctx)), // Custom scopes - "release" - ]] - } + "release", + ], + ], + }, }; diff --git a/lerna.json b/lerna.json index d0eee03f..636eef18 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,6 @@ } }, "npmClient": "yarn", + "useWorkspaces": true, "version": "independent" } diff --git a/package.json b/package.json index 1d8b6396..19faa217 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "private": true, "devDependencies": { - "@commitlint/cli": "^17.6.3", - "@commitlint/config-conventional": "^17.6.3", - "@commitlint/config-lerna-scopes": "^17.6.3", + "@commitlint/cli": "^19.4.0", + "@commitlint/config-conventional": "^19.2.2", + "@commitlint/config-lerna-scopes": "^19.0.0", "cz-conventional-changelog": "^3.3.0", - "husky": "^8.0.3", - "lerna": "^6.6.1" + "husky": "^9.1.4", + "lerna": "^8.1.8" }, "repository": { "type": "git", @@ -22,6 +22,7 @@ "test:legacy": "lerna run test:legacy", "version": "lerna version" }, + "type": "module", "workspaces": { "packages": [ "packages/*",