@chappibunny/repolens 0.4.2 → 0.4.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 +9 -0
- package/package.json +1 -1
- package/src/migrate.js +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to RepoLens will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.4.3
|
|
6
|
+
|
|
7
|
+
### 🐛 Bug Fixes
|
|
8
|
+
- **Migration Tool**: Fixed over-aggressive npm install removal
|
|
9
|
+
- Now only removes `npm install/ci` from legacy `cd tools/repolens` multi-line blocks
|
|
10
|
+
- Preserves legitimate dependency installation steps in release workflows
|
|
11
|
+
- Fixes YAML corruption that broke workflows with standalone npm ci/install steps
|
|
12
|
+
- Added test case to verify legitimate npm install steps are preserved
|
|
13
|
+
|
|
5
14
|
## 0.4.2
|
|
6
15
|
|
|
7
16
|
### 🐛 Bug Fixes
|
package/package.json
CHANGED
package/src/migrate.js
CHANGED
|
@@ -43,11 +43,16 @@ function detectLegacyPatterns(content) {
|
|
|
43
43
|
function migrateWorkflowContent(content) {
|
|
44
44
|
let migrated = content;
|
|
45
45
|
|
|
46
|
-
// Remove cd tools/repolens commands
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
// Remove cd tools/repolens commands and associated npm install in the same run block
|
|
47
|
+
// This handles the legacy pattern: run: | cd tools/repolens; npm install; npx repolens publish
|
|
48
|
+
if (/cd\s+tools\/repolens/i.test(migrated)) {
|
|
49
|
+
// Remove cd command
|
|
50
|
+
migrated = migrated.replace(/cd\s+tools\/repolens\s*\n?/gi, "");
|
|
51
|
+
|
|
52
|
+
// Only remove npm install/ci if it appears in what looks like a multi-line run block
|
|
53
|
+
// after we've removed the cd command (indicates it was part of the legacy pattern)
|
|
54
|
+
migrated = migrated.replace(/(run:\s*\|[^\n]*\n(?:\s+[^\n]*\n)*?\s+)npm\s+(?:ci|install)\s*\n/g, "$1");
|
|
55
|
+
}
|
|
51
56
|
|
|
52
57
|
// Update npx repolens to npx @chappibunny/repolens@latest
|
|
53
58
|
migrated = migrated.replace(/npx\s+repolens\s+/g, "npx @chappibunny/repolens@latest ");
|