@pob/root 13.1.0 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/bin/postinstall/install-husky.js +30 -9
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [13.3.0](https://github.com/christophehurpeau/pob/compare/@pob/root@13.2.0...@pob/root@13.3.0) (2024-09-29)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **deps:** update dependency @commitlint/cli to v19.5.0 ([#2223](https://github.com/christophehurpeau/pob/issues/2223)) ([e3a93eb](https://github.com/christophehurpeau/pob/commit/e3a93eb130a069b08a04feee6a19deb04794261a))
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **deps:** update dependency @commitlint/cli to v19.4.1 ([#2198](https://github.com/christophehurpeau/pob/issues/2198)) ([78c52e8](https://github.com/christophehurpeau/pob/commit/78c52e8eef2ef2c953c890192da5dc19649c10bc))
|
|
15
|
+
* **deps:** update dependency lint-staged to v15.2.10 ([#2207](https://github.com/christophehurpeau/pob/issues/2207)) ([b47f2f4](https://github.com/christophehurpeau/pob/commit/b47f2f4497f2a1b43d7bc42f6bad11a3e966a24c))
|
|
16
|
+
* disable yarn config set in hooks ([8c4c881](https://github.com/christophehurpeau/pob/commit/8c4c8815f4607ab2f1ca3d98da1c28861b7e8148))
|
|
17
|
+
|
|
18
|
+
Version bump for dependency: yarn-version
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## [13.2.0](https://github.com/christophehurpeau/pob/compare/@pob/root@13.1.0...@pob/root@13.2.0) (2024-08-15)
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* improve git hooks ([6e8cc6b](https://github.com/christophehurpeau/pob/commit/6e8cc6bdddf155f5b0651201990e358c87af6d18))
|
|
26
|
+
|
|
6
27
|
## [13.1.0](https://github.com/christophehurpeau/pob/compare/@pob/root@13.0.0...@pob/root@13.1.0) (2024-08-14)
|
|
7
28
|
|
|
8
29
|
### Bug Fixes
|
|
@@ -69,7 +69,13 @@ export default function installHusky({ pkg, pm }) {
|
|
|
69
69
|
fs.mkdirSync(path.resolve(".husky"));
|
|
70
70
|
} catch {}
|
|
71
71
|
|
|
72
|
-
const {
|
|
72
|
+
const {
|
|
73
|
+
lockfile,
|
|
74
|
+
pmExec,
|
|
75
|
+
installOnDiffCommand,
|
|
76
|
+
beforeDiffCommand = "",
|
|
77
|
+
afterDiffCommand = "",
|
|
78
|
+
} = (() => {
|
|
73
79
|
if (pm.name === "yarn") {
|
|
74
80
|
return {
|
|
75
81
|
lockfile: "yarn.lock",
|
|
@@ -79,6 +85,21 @@ export default function installHusky({ pkg, pm }) {
|
|
|
79
85
|
? "--immutable"
|
|
80
86
|
: "--prefer-offline --pure-lockfile --ignore-optional"
|
|
81
87
|
}`,
|
|
88
|
+
// cause issues with git because of formatting issue with prettier.
|
|
89
|
+
// beforeDiffCommand: isYarnBerry
|
|
90
|
+
// ? `yarn config set logFilters --json '[
|
|
91
|
+
// {"code": "YN0002","level": "discard"},
|
|
92
|
+
// {"code": "YN0007","level": "discard"},
|
|
93
|
+
// {"code": "YN0008","level": "discard"},
|
|
94
|
+
// {"code": "YN0013","level": "discard"},
|
|
95
|
+
// {"code": "YN0018","level": "discard"},
|
|
96
|
+
// {"code": "YN0060","level": "discard"},
|
|
97
|
+
// {"code": "YN0061","level": "discard"}
|
|
98
|
+
// ]' > /dev/null`
|
|
99
|
+
// : "",
|
|
100
|
+
// afterDiffCommand: isYarnBerry
|
|
101
|
+
// ? "yarn config unset logFilters > /dev/null"
|
|
102
|
+
// : "",
|
|
82
103
|
};
|
|
83
104
|
}
|
|
84
105
|
if (pm.name === "npm") {
|
|
@@ -105,21 +126,21 @@ export default function installHusky({ pkg, pm }) {
|
|
|
105
126
|
writeHook("pre-commit", `${pmExec} pob-root-lint-staged`);
|
|
106
127
|
|
|
107
128
|
if (isYarnPnp) {
|
|
129
|
+
// https://yarnpkg.com/features/zero-installs
|
|
108
130
|
ensureHookDeleted("post-checkout");
|
|
109
131
|
ensureHookDeleted("post-merge");
|
|
110
132
|
ensureHookDeleted("post-rewrite");
|
|
111
133
|
} else {
|
|
112
|
-
const runInstallOnDiff = (
|
|
134
|
+
const runInstallOnDiff = (additionalConditionInstall = "") => {
|
|
113
135
|
return `
|
|
114
|
-
if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- ${lockfile})" ]; then
|
|
115
|
-
${installOnDiffCommand} || true
|
|
136
|
+
if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- ${lockfile})" ]${additionalConditionInstall}; then
|
|
137
|
+
${beforeDiffCommand ? `${beforeDiffCommand}\n ` : ""}${installOnDiffCommand} || true${afterDiffCommand ? `\n ${afterDiffCommand}` : ""}
|
|
116
138
|
fi`;
|
|
117
|
-
}
|
|
139
|
+
};
|
|
118
140
|
|
|
119
|
-
|
|
120
|
-
writeHook("post-
|
|
121
|
-
writeHook("post-
|
|
122
|
-
writeHook("post-rewrite", runInstallOnDiff);
|
|
141
|
+
writeHook("post-checkout", runInstallOnDiff());
|
|
142
|
+
writeHook("post-merge", runInstallOnDiff());
|
|
143
|
+
writeHook("post-rewrite", runInstallOnDiff(' | [ "$1" = "rebase" ]'));
|
|
123
144
|
}
|
|
124
145
|
|
|
125
146
|
const prePushHook = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pob/root",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.0",
|
|
4
4
|
"description": "root package",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Christophe Hurpeau <christophe@hurpeau.com> (https://christophe.hurpeau.com)",
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
"pob": {},
|
|
70
70
|
"prettier": "@pob/root/prettier-config",
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@commitlint/cli": "19.
|
|
72
|
+
"@commitlint/cli": "19.5.0",
|
|
73
73
|
"@pob/pretty-eslint-config": "7.0.0",
|
|
74
74
|
"@pob/pretty-pkg": "9.0.0",
|
|
75
75
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
76
76
|
"cosmiconfig": "^9.0.0",
|
|
77
77
|
"husky": "~9.1.0",
|
|
78
78
|
"json5": "^2.2.2",
|
|
79
|
-
"lint-staged": "15.2.
|
|
80
|
-
"pob-dependencies": "14.
|
|
79
|
+
"lint-staged": "15.2.10",
|
|
80
|
+
"pob-dependencies": "14.2.0",
|
|
81
81
|
"prettier": "3.3.3",
|
|
82
82
|
"repository-check-dirty": "8.0.0",
|
|
83
83
|
"semver": "^7.3.7",
|
|
84
84
|
"which-pm-runs": "1.1.0",
|
|
85
|
-
"yarn-version": "3.
|
|
85
|
+
"yarn-version": "3.2.0"
|
|
86
86
|
}
|
|
87
87
|
}
|