@ornikar/repo-config 7.2.2 → 7.2.3
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 +11 -0
- package/lib/postinstall/install-husky.js +10 -7
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [7.2.3](https://github.com/ornikar/shared-configs/compare/@ornikar/repo-config@7.2.2...@ornikar/repo-config@7.2.3) (2022-02-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **repo-config:** cd package location [no issue] ([#647](https://github.com/ornikar/shared-configs/issues/647)) ([bbfea60](https://github.com/ornikar/shared-configs/commit/bbfea6042e64cec11deb119699c63e8e330b2e3d))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [7.2.2](https://github.com/ornikar/shared-configs/compare/@ornikar/repo-config@7.2.1...@ornikar/repo-config@7.2.2) (2022-02-04)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -101,28 +101,31 @@ module.exports = function installHusky({ pkg, pm }) {
|
|
|
101
101
|
} else {
|
|
102
102
|
const runYarnInstallOnDiff = `
|
|
103
103
|
if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- yarn.lock)" ]; then
|
|
104
|
-
${
|
|
104
|
+
${[
|
|
105
105
|
// https://yarnpkg.com/features/zero-installs
|
|
106
106
|
isYarnPnp
|
|
107
107
|
? ''
|
|
108
108
|
: `yarn install ${
|
|
109
109
|
isYarnBerry ? '--immutable --immutable-cache' : '--prefer-offline --pure-lockfile --ignore-optional'
|
|
110
|
-
} || true
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
} || true`,
|
|
111
|
+
runCleanCache ? `${pmExec} clean:cache` : '',
|
|
112
|
+
]
|
|
113
|
+
.filter(Boolean)
|
|
114
|
+
.join('\n ')}
|
|
113
115
|
fi`;
|
|
114
116
|
|
|
115
117
|
let postHookContent = runYarnInstallOnDiff;
|
|
116
118
|
const packageLocations = getPackagesLocations(pkg);
|
|
117
119
|
|
|
118
120
|
packageLocations.forEach((packageLocation) => {
|
|
119
|
-
const cdToPackageLocation = packageLocation === '.' ? '' : `cd ${packageLocation}
|
|
121
|
+
const cdToPackageLocation = packageLocation === '.' ? '' : `cd ${packageLocation}`;
|
|
122
|
+
const cdToRoot = packageLocation === '.' ? '' : `cd ${path.relative(packageLocation, '.')}`;
|
|
120
123
|
|
|
121
124
|
const gemfilePath = path.join(packageLocation, 'Gemfile.lock');
|
|
122
125
|
if (fs.existsSync(gemfilePath)) {
|
|
123
126
|
postHookContent += `
|
|
124
127
|
if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- ${gemfilePath})" ]; then
|
|
125
|
-
${cdToPackageLocation
|
|
128
|
+
${[cdToPackageLocation, 'bundle install --path vendor/bundle || true', cdToRoot].filter(Boolean).join('\n ')}
|
|
126
129
|
fi
|
|
127
130
|
`;
|
|
128
131
|
}
|
|
@@ -131,7 +134,7 @@ fi
|
|
|
131
134
|
if (fs.existsSync(podfilePath)) {
|
|
132
135
|
postHookContent += `
|
|
133
136
|
if [ -n "$(git diff HEAD@{1}..HEAD@{0} -- ${podfilePath})" ]; then
|
|
134
|
-
${cdToPackageLocation
|
|
137
|
+
${[cdToPackageLocation, 'yarn pod-install || true', cdToRoot].filter(Boolean).join('\n ')}
|
|
135
138
|
fi
|
|
136
139
|
`;
|
|
137
140
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ornikar/repo-config",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"description": "🔧 repo config",
|
|
5
5
|
"repository": "ornikar/shared-configs",
|
|
6
6
|
"license": "ISC",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"which-pm-runs": "^1.0.0",
|
|
26
26
|
"yarn-deduplicate": "3.1.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "364c303cb30967ced7c94bcdcc5ca07d66c379ac"
|
|
29
29
|
}
|