Skip to content

Commit 95247b3

Browse files
committed
chore: upgrade lerna/commitlint/husky/commitlint
1 parent 1cb86b8 commit 95247b3

File tree

7 files changed

+2959
-4945
lines changed

7 files changed

+2959
-4945
lines changed

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn lint-staged

.yarn/plugins/plugin-hook-scripts.cjs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
name: `plugin-hook-scripts`,
3+
factory: (require) => {
4+
/** @type {import('@yarnpkg/core')} */
5+
const {scriptUtils} = require('@yarnpkg/core')
6+
return {
7+
hooks: {
8+
async afterAllInstalled(
9+
/** @type {import('@yarnpkg/core').Project} */ project
10+
) {
11+
const script = 'yarn:afterAllInstalled'
12+
const locator = project.topLevelWorkspace.anchoredLocator
13+
if (await scriptUtils.hasPackageScript(locator, script, {project})) {
14+
await scriptUtils.executePackageScript(locator, script, [], {
15+
project,
16+
})
17+
}
18+
},
19+
},
20+
}
21+
},
22+
}

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ plugins:
44
- checksum: 7930a64ba6239d4502df0204edda913788df1a9614a9056d23b53345d844f6f13526dae71c2be5282071502c3c077db7b1e97bcf019037db3ca35c737cd25b0c
55
path: .yarn/plugins/plugin-dedupe-on-install.cjs
66
spec: "https://raw.githubusercontent.com/ambar/yarn-plugin-dedupe-on-install/main/index.js"
7+
- checksum: 2bf08235ccdfb0b95f511d4f0b0383a14de6c06e0c37e20e61c6ba939b85934542fbc6ff502387858722ac8b10f24c6b0a28a93536b628bd2e9446a491b40f29
8+
path: .yarn/plugins/plugin-hook-scripts.cjs
9+
spec: "https://raw.githubusercontent.com/ambar/yarn-plugin-hook-scripts/main/index.js"

lerna.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,5 @@
1212
],
1313
"version": "1.31.0",
1414
"conventionalCommits": true,
15-
"npmClient": "yarn",
16-
"useWorkspaces": true
15+
"npmClient": "yarn"
1716
}

package.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"zhihu-video-player"
3333
],
3434
"scripts": {
35+
"yarn:afterAllInstalled": "husky",
3536
"lint": "eslint --cache . ",
3637
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
3738
"test:coverage": "yarn test --coverage",
@@ -45,7 +46,7 @@
4546
"start": "yarn start-server"
4647
},
4748
"devDependencies": {
48-
"@commitlint/config-conventional": "^7.5.0",
49+
"@commitlint/config-conventional": "^19.1.0",
4950
"@rollup/plugin-alias": "^5.1.0",
5051
"@rollup/plugin-commonjs": "^25.0.7",
5152
"@rollup/plugin-node-resolve": "^15.2.3",
@@ -56,19 +57,19 @@
5657
"@types/jest": "^27.0.1",
5758
"@typescript-eslint/eslint-plugin": "^7.2.0",
5859
"@typescript-eslint/parser": "^7.2.0",
59-
"commitlint": "^7.5.2",
60+
"commitlint": "^19.2.0",
6061
"es-jest": "^2.1.0",
6162
"eslint": "^8.57.0",
6263
"eslint-config-prettier": "^9.1.0",
6364
"eslint-plugin-import": "^2.29.1",
6465
"eslint-plugin-prettier": "^5.1.3",
6566
"eslint-plugin-react": "^7.34.1",
6667
"eslint-plugin-react-hooks": "^4.6.0",
67-
"husky": "^1.3.1",
68+
"husky": "^9.0.11",
6869
"jest": "^29.7.0",
6970
"jest-environment-jsdom": "^29.7.0",
70-
"lerna": "^3.13.1",
71-
"lint-staged": "^8.1.5",
71+
"lerna": "^8.1.2",
72+
"lint-staged": "^15.2.2",
7273
"prettier": "^3.2.5",
7374
"react": "^18.2.0",
7475
"react-dom": "^18.2.0",
@@ -77,12 +78,6 @@
7778
"rollup-plugin-typescript2": "^0.36.0",
7879
"typescript": "^5.4.2"
7980
},
80-
"husky": {
81-
"hooks": {
82-
"pre-commit": "lint-staged",
83-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
84-
}
85-
},
8681
"lint-staged": {
8782
"*.{json,md,css}": [
8883
"prettier --write",

0 commit comments

Comments
 (0)